From f7aa2e45a6f5658a04fc7d8f7370e5c3d5b168c0 Mon Sep 17 00:00:00 2001 From: Aihua Liang Date: Thu, 15 Aug 2024 15:06:53 +0800 Subject: [PATCH] blockdev_mirror_stress:not run stress test as a thread When running stress test as a thread, we usually hit resource lock issue, so some processes hang there even though test has finished and vm quit successfully,this will block all the tests in a loop. Signed-off-by: Aihua Liang --- qemu/tests/blockdev_mirror_stress.py | 8 ++------ qemu/tests/cfg/blockdev_mirror_stress.cfg | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/qemu/tests/blockdev_mirror_stress.py b/qemu/tests/blockdev_mirror_stress.py index 887f54b76c..d715291463 100644 --- a/qemu/tests/blockdev_mirror_stress.py +++ b/qemu/tests/blockdev_mirror_stress.py @@ -2,8 +2,6 @@ import time import random -from virttest import utils_test - from provider.storage_benchmark import generate_instance from provider.blockdev_mirror_wait import BlockdevMirrorWaitTest @@ -11,7 +9,7 @@ class BlockdevMirrorStressTest(BlockdevMirrorWaitTest): """Do block-mirror with fio test as background test""" - def fio_thread(self): + def fio_run_bg(self): fio_options = self.params.get("fio_options") if fio_options: self.test.log.info("Start to run fio") @@ -38,9 +36,7 @@ def remove_files_from_system_image(self, tmo=60): session.close() def do_test(self): - bg_test = utils_test.BackgroundTest(self.fio_thread, "") - bg_test.thread.daemon = True - bg_test.start() + self.fio_run_bg() self.test.log.info("sleep random time before mirror during fio") mint = self.params.get_numeric("sleep_min") maxt = self.params.get_numeric("sleep_max") diff --git a/qemu/tests/cfg/blockdev_mirror_stress.cfg b/qemu/tests/cfg/blockdev_mirror_stress.cfg index 80104701e6..8c591786c5 100644 --- a/qemu/tests/cfg/blockdev_mirror_stress.cfg +++ b/qemu/tests/cfg/blockdev_mirror_stress.cfg @@ -18,6 +18,7 @@ fio_timeout = 300 fio_options = '--name=stress --filename=${mnt_on_sys_dsk}/${file_fio} --ioengine=libaio --rw=write --direct=1 ' fio_options += '--bs=4K --size=2G --iodepth=256 --numjobs=256 --runtime=${fio_timeout} --time_based' + fio_options += ' --output=/tmp/fio_report.txt &' sync = full storage_pools = default storage_pool = default