kernel_linux_build: modify some sched_rtg and cpuisolation testcases

Signed-off-by: liudanning <liudanning@h-partners.com>
This commit is contained in:
liudanning
2022-05-16 14:52:25 +08:00
parent 805fc7bb53
commit c709d0c44a
4 changed files with 10 additions and 14 deletions
@@ -45,7 +45,7 @@ do_test()
tst_res TINFO "Start CPU trace catching test ..."
bytrace -t 10 -b 32000 --overwrite sched ace app disk ohos graphic sync \
workq ability >/data/mynewtrace.ftrace &
workq ability > cputrace.ftrace &
sleep 5
for i in $(seq 1 8);do
sh create_process.sh 40
@@ -33,7 +33,7 @@ do_setup()
{
aa start -b ohos.samples.ecg -a ohos.samples.ecg.default
sleep 1
PID=`ps -ef | grep ohos.samples.ecg | grep -v grep | awk '{print $2}'`
PID=$(ps -ef | grep ohos.samples.ecg | grep -v grep | awk '{print $2}')
}
do_test()
@@ -43,10 +43,8 @@ do_test()
tst_res TINFO "Start process $PID sched RTG interface test ..."
cur_rtgid=$(cat $sched_group_id)
if [ cur_rtgid -eq 2 ]; then
tst_res TINFO "process $PID already in rtgid 2, remove it firstly..."
echo 0 > $sched_group_id
fi
tst_res TINFO "process $PID already in rtgid $sched_group_id, remove it firstly..."
echo 0 > $sched_group_id
set_check_rtgid -1 $PID 1 0
@@ -83,9 +81,9 @@ set_check_rtgid()
local _cur_rtgid=$(cat $_sched_group_id)
if [ $_cur_rtgid -eq $_expect_rtgid ]; then
tst_res TPASS "process $_pid rtgid equal to expected value."
tst_res TPASS "process $_pid rtgid $_cur_rtgid equal to expected value."
else
tst_res TFAIL "process $_pid rtgid not equal to expected value!"
tst_res TFAIL "process $_pid rtgid $_cur_rtgid unexpected value $_expect_rtgid!"
fi
}
@@ -41,10 +41,8 @@ do_test()
tst_res TINFO "Start sched RTG /proc/sched_rtg_debug interface test ..."
cur_rtgid=$(cat $sched_group_id)
if [ cur_rtgid -eq 2 ]; then
tst_res TINFO "process $PID already in rtgid 2, remove it firstly..."
echo 0 > $sched_group_id
fi
tst_res TINFO "process $PID already in rtgid $sched_group_id, remove it firstly..."
echo 0 > $sched_group_id
set_check_rtgid_debug 2 $PID 0 2
@@ -49,10 +49,10 @@ do_test()
local sched_group_id=/proc/$PID/sched_group_id
tst_res TINFO "Start sched RTG trace catching test ..."
bytrace -t 10 -b 32000 --overwrite sched ace app disk ohos graphic sync workq ability >/data/mynewtrace.ftrace &
bytrace -t 10 -b 32000 --overwrite sched ace app disk ohos graphic sync workq ability > rtgtrace.ftrace &
tst_res TINFO "Checking sched RTG trace ..."
sleep 3
for i in $(seq 1 20);do
for i in $(seq 1 50);do
echo 0 > $sched_group_id
echo 2 > $sched_group_id
done