From 3c3dbf9ba57015bce19370d37773779f323e1a8a Mon Sep 17 00:00:00 2001 From: liudanning Date: Fri, 13 May 2022 16:22:43 +0800 Subject: [PATCH] kernel_linux_build: modify some sched_rtg and cpuisolation testcases Signed-off-by: liudanning --- .../bin/cpuisolation_t/testcases/bin/cpuisolation05.sh | 2 +- .../bin/sched_rtg_t/testcases/bin/sched_rtg02.sh | 10 ++++------ .../bin/sched_rtg_t/testcases/bin/sched_rtg03.sh | 6 ++---- .../bin/sched_rtg_t/testcases/bin/sched_rtg04.sh | 4 ++-- 4 files changed, 9 insertions(+), 13 deletions(-) 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 6193c39..4a73b1f 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 5b33c31..af76934 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 @@ -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 correction, 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!" 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 fc7a8bc..fee0c97 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 correction, 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 6cce5ec..3d3b60f 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 -- Gitee