diff --git a/test/moduletest/runtest/bin/enhancedswap_t_init.sh b/test/moduletest/runtest/bin/enhancedswap_t_init.sh index 4dcadcf84433e37a74e5bda1aac22c0eb45b4e43..404136da1d0a60944f17c556dda474b5f3ebd935 100644 --- a/test/moduletest/runtest/bin/enhancedswap_t_init.sh +++ b/test/moduletest/runtest/bin/enhancedswap_t_init.sh @@ -30,12 +30,24 @@ pre_condition() } +uninit_platform() +{ + losetup -d /dev/block/loop7 + echo ${hyperhold_device} > /proc/sys/kernel/hyperhold/device + echo ${hyperhold_enable} > /proc/sys/kernel/hyperhold/enable + echo ${zram0_group} > /sys/block/zram0/group + echo ${zram0_disksize} > /sys/block/zram0/disksize + rm -rf hpdisk + swapoff /dev/block/zram0 + echo 1 > /sys/block/zram0/reset +} + hp_init() { dd if=/dev/random of=hpdisk bs=4096 count=131072 - losetup /dev/block/loop6 hpdisk + losetup /dev/block/loop7 hpdisk hyperhold_device=$(cat /proc/sys/kernel/hyperhold/device) - echo /dev/block/loop6 > /proc/sys/kernel/hyperhold/device + echo /dev/block/loop7 > /proc/sys/kernel/hyperhold/device } hp_enable() @@ -58,14 +70,19 @@ zram_enable() swapon /dev/block/zram0 aa start -b com.ohos.settings -a com.ohos.settings.MainAbility aa start -b ohos.samples.airquality -a ohos.samples.airquality.default - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility aa start -b ohos.samples.flashlight -a ohos.samples.flashlight.default aa start -b ohos.samples.clock -a ohos.samples.clock.default + aa start -b com.ohos.camera -a com.ohos.camera.MainAbility + aa start -b com.ohos.permissionmanager -a com.ohos.permissionmanager.MainAbility + aa start -b ohos.sample.shopping -a com.example.entry.MainAbility + aa start -b ohos.samples.distributedcalc -a ohos.samples.distributedcalc.MainAbility } echo "***************************ESWAP INIT START***************************" free -m +uninit_platform pre_condition hp_init hp_enable diff --git a/test/moduletest/runtest/bin/enhancedswap_t_uninit.sh b/test/moduletest/runtest/bin/enhancedswap_t_uninit.sh index e7a5e60bc5882e91f28f24c3bd8cfb09ae63ec5e..62360248bb9f1f88cd44b5e80af50d747c3fae32 100644 --- a/test/moduletest/runtest/bin/enhancedswap_t_uninit.sh +++ b/test/moduletest/runtest/bin/enhancedswap_t_uninit.sh @@ -27,7 +27,7 @@ uninit_platform() { - losetup -d /dev/block/loop6 + losetup -d /dev/block/loop7 echo ${hyperhold_device} > /proc/sys/kernel/hyperhold/device echo ${hyperhold_enable} > /proc/sys/kernel/hyperhold/enable echo ${zram0_group} > /sys/block/zram0/group diff --git a/test/moduletest/runtest/bin/mem_debug_t/testcases/bin/mem_debug04.sh b/test/moduletest/runtest/bin/mem_debug_t/testcases/bin/mem_debug04.sh index cdfcb09a7938679e4689307590739b3f142ac7c2..fabc90ef40fec4bbd5ddf589ccb38e3278534222 100644 --- a/test/moduletest/runtest/bin/mem_debug_t/testcases/bin/mem_debug04.sh +++ b/test/moduletest/runtest/bin/mem_debug_t/testcases/bin/mem_debug04.sh @@ -56,7 +56,7 @@ do_test() sh ../../../mem_debug_t_init.sh aa start -b com.ohos.settings -a com.ohos.settings.MainAbility aa start -b ohos.samples.airquality -a ohos.samples.airquality.default - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility aa start -b ohos.samples.flashlight -a ohos.samples.flashlight.default aa start -b ohos.samples.clock -a ohos.samples.clock.default diff --git a/test/moduletest/runtest/bin/mem_debug_t_init.sh b/test/moduletest/runtest/bin/mem_debug_t_init.sh index 91474c83fb79ce1b065e6acb2a47de0a052c5e5f..1455628e9000c32428249897bae1e5f8bd7b4a3e 100644 --- a/test/moduletest/runtest/bin/mem_debug_t_init.sh +++ b/test/moduletest/runtest/bin/mem_debug_t_init.sh @@ -58,7 +58,7 @@ zram_enable() swapon /dev/block/zram0 aa start -b com.ohos.settings -a com.ohos.settings.MainAbility aa start -b ohos.samples.airquality -a ohos.samples.airquality.default - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility aa start -b ohos.samples.flashlight -a ohos.samples.flashlight.default aa start -b ohos.samples.clock -a ohos.samples.clock.default } diff --git a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg01.sh b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg01.sh index 429b78b32baac56a41bf0622ab58bf65f5ea1afd..6f273c16c2825321d847804dfb97fe90fb1a7c7e 100644 --- a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg01.sh +++ b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg01.sh @@ -29,7 +29,7 @@ source tst_oh.sh do_setup() { - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility sleep 1 PID=$(ps -ef | grep ohos.samples.ecg | grep -v grep | awk '{print $2}') } @@ -65,7 +65,7 @@ do_test() fi local rtgid3=$(cat $sched_group_id) if [ $rtgid3 -eq 3 ]; then - tst_res TFAIL "process $PID switch rtgid 2 to 3 success unexpected!" + tst_res TFAIL "process $PID switch rtgid 2 to 3 sucess unexpected!" res=$(($res + 1)) fi @@ -96,4 +96,4 @@ do_clean() do_setup do_test do_clean -tst_exit +tst_exit \ No newline at end of file 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 8ab1532584761eb5c4eef30121e482dc5c22110a..631283d2476937276db2c5f7d08b8a144e68dbcc 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 @@ -31,7 +31,7 @@ source tst_oh.sh do_setup() { - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility sleep 1 PID=$(ps -ef | grep ohos.samples.ecg | grep -v grep | awk '{print $2}') } 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 6c53aeb11bfa653ad3d7105042525ce64906699a..d9f1a6a64ea94b4a110e247eca021c091ae81f2f 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 @@ -29,7 +29,7 @@ source tst_oh.sh do_setup() { - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility sleep 1 PID=$(ps -ef | grep ohos.samples.ecg | grep -v grep | awk '{print $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 56996f4302a40e9bf2b51c8cb37efa225b9e8591..0f77902023f8b7201bf665f0ccb08b87701e07f0 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 @@ -31,7 +31,7 @@ do_setup() { cpu_value=$(cat /sys/kernel/debug/tracing/events/rtg/find_rtg_cpu/enable) - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility sleep 1 PID=$(ps -ef | grep ohos.samples.ecg | grep -v grep | awk '{print $2}') echo 1 > /sys/kernel/debug/tracing/events/rtg/find_rtg_cpu/enable diff --git a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg06.sh b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg06.sh index e69d87130c377ada2227e0f5ac33e8641d83ca83..91a301458bd796ca6716e7c6f5810886c8466419 100644 --- a/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg06.sh +++ b/test/moduletest/runtest/bin/sched_rtg_t/testcases/bin/sched_rtg06.sh @@ -65,8 +65,8 @@ stability_test() tst_res TINFO "kill 40 task processes...." ps -ef | grep "create_process" | grep -v "grep" | grep -v ${PPID} | cut -c 9-18 | xargs kill -9 sleep 5 - tst_res TINFO "kill process succeeded." - aa start -b ohos.samples.ecg -a ohos.samples.ecg.default && + tst_res TINFO "kill process successed." + aa start -b ohos.samples.ecg -a ohos.samples.ecg.MainAbility && sleep 1 && PID=$(ps -ef | grep ohos.samples.ecg | grep -v grep | awk '{print $2}') if [ $? -eq 0 ]; then @@ -147,4 +147,4 @@ do_clean() do_setup do_test do_clean -tst_exit +tst_exit \ No newline at end of file