diff --git a/test/moduletest/runtest/bin/cpuisolation_t/testcases/bin/cpuisolation05.sh b/test/moduletest/runtest/bin/cpuisolation_t/testcases/bin/cpuisolation05.sh index 6193c39294e0d4279730d181068bd5bcb3e37c9e..4a73b1f561a5cc1710154a20eb3161ebdfdeefde 100644 --- a/test/moduletest/runtest/bin/cpuisolation_t/testcases/bin/cpuisolation05.sh +++ b/test/moduletest/runtest/bin/cpuisolation_t/testcases/bin/cpuisolation05.sh @@ -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 diff --git a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg02.sh b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg02.sh index 5b33c31bb7922e658e365478d952c66eb6367d50..8ab1532584761eb5c4eef30121e482dc5c22110a 100644 --- a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg02.sh +++ b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg02.sh @@ -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 } diff --git a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg03.sh b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg03.sh index fc7a8bce410e21360253440e6819daa3003ca6ab..1fef3be1a0722caf8fe191177d0a6d3614fea76e 100644 --- a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg03.sh +++ b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg03.sh @@ -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 diff --git a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg04.sh b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg04.sh index 6cce5ec2fdc8bd8b9016158ff9fbc8ee63e32f20..3d3b60f554ccaabf7c38a13cca8b2d5f8aee75c3 100644 --- a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg04.sh +++ b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg04.sh @@ -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