diff --git a/generic/tests/cfg/linux_stress.cfg b/generic/tests/cfg/linux_stress.cfg index 1f03944544cc2ec3c765e81c727133a1d87ad9ad..4359464090fc37fe70594b11c2c1efd2355e04df 100644 --- a/generic/tests/cfg/linux_stress.cfg +++ b/generic/tests/cfg/linux_stress.cfg @@ -1,6 +1,6 @@ - linux_stress: only Linux type = linux_stress - stress_time = 60 + stress_duration = 60 # Please specify below params for stress test, or use default value as shown # download_url = http://people.seas.harvard.edu/~apw/stress/stress-1.0.4.tar.gz diff --git a/generic/tests/linux_stress.py b/generic/tests/linux_stress.py index 6d7549f3fa934409c12bf4fd2ff9546f99733a08..62213db041364b30c69948d8b072873fccae9b2e 100644 --- a/generic/tests/linux_stress.py +++ b/generic/tests/linux_stress.py @@ -23,9 +23,15 @@ def run(test, params, env): vm.verify_alive() stress = utils_test.VMStress(vm, 'stress') stress.load_stress_tool() - stress_time = int(params.get('stress_time')) - if stress_time: - time.sleep(stress_time) + stress_duration = int(params.get('stress_duration', 0)) + # NOTE: stress_duration = 0 ONLY for some legacy test cases using + # autotest stress.control as their sub test. + # Please DO define stress_duration to make sure the clean action + # being performed, if your case can not be controlled by time, + # use utils_test.VMStress() directly + + if stress_duration: + time.sleep(stress_duration) stress.unload_stress() stress.clean() vm.verify_kernel_crash() diff --git a/qemu/tests/cfg/hotplug_mem.cfg b/qemu/tests/cfg/hotplug_mem.cfg index f846a8136641505866da4bc5aba00cb315f0fa77..b8c339713c7927559afdaefde6abfb7b2073dc83 100644 --- a/qemu/tests/cfg/hotplug_mem.cfg +++ b/qemu/tests/cfg/hotplug_mem.cfg @@ -163,8 +163,7 @@ i386, i686: install_path = "C:\Program Files\JAM Software\HeavyLoad" Linux: - sub_type = autotest_control - test_control_file = stress.control + sub_type = linux_stress test_timeout = 1800 variants stage: - before: diff --git a/qemu/tests/cfg/live_snapshot.cfg b/qemu/tests/cfg/live_snapshot.cfg index 27b73853caa2150e849703a6166c060a91f86ab1..48de28429bd2e50151cd5d78269a14fbbd9edbfc 100644 --- a/qemu/tests/cfg/live_snapshot.cfg +++ b/qemu/tests/cfg/live_snapshot.cfg @@ -85,10 +85,7 @@ i386, i686: install_path = "C:\Program Files\JAM Software\HeavyLoad" Linux: - stress_test = autotest_control - test_control_file = stress.control - # Use a low stress to make sure guest can response during stress - control_args = "--cpu 4 --io 4 --vm 2 --vm-bytes 256M" + stress_test = linux_stress test_timeout = 1800 check_cmd = 'pgrep stress' stop_cmd = "killall -g stress" @@ -128,7 +125,6 @@ create_command = "dd if=/dev/urandom of=FILE bs=128k count=100" file_names = "/home/live_snapshot_base /home/live_snapshot_sn1" test_exists_cmd = "test -f FILE" - control_args = "--cpu 1 --vm 1 --vm-bytes 16M" sync_cmd = "sync" - transaction: type = live_snapshot_transaction