diff --git a/shared/cfg/base.cfg b/shared/cfg/base.cfg index 1850b4d2ad..808e78a494 100644 --- a/shared/cfg/base.cfg +++ b/shared/cfg/base.cfg @@ -679,6 +679,10 @@ libvirtd_log_cleanup = "yes" #uperf_protocol = "tcp" #Client profile to run for uperf tests #client_profile_uperf = "shared/deps/uperf/iperf.xml" +#stress_config can have below possible values: +# 1> client_server: stress workloads which requires client server setup: eg:uperf +# 2> standalone: stress workloads which are standalone. eg: stress-ng +# 3> mix: running both client server workload and standalone stress workload in parallel # params to enable/disable sosreport for host/remote host enable_host_sosreport = "no" diff --git a/virttest/utils_test/__init__.py b/virttest/utils_test/__init__.py index c22fe4f71f..47d243502c 100755 --- a/virttest/utils_test/__init__.py +++ b/virttest/utils_test/__init__.py @@ -2157,7 +2157,7 @@ def _unload_stress(): logging.info("stop stress app in guest/host/remote host") utils_misc.wait_for(_unload_stress, self.stress_wait_for_timeout, first=2.0, - text="wait stress app quit", step=1.0) + text="wait stress app quit", step=2.0) def app_running(self): """ @@ -2547,7 +2547,8 @@ def __init__(self, params, env): self.need_profile = int(params.get("need_profile", False)) self.server_cmd = params.get("%s_server_cmd" % self.stress_type) self.client_cmd = params.get("%s_client_cmd" % self.stress_type) - self.custom_pair = params.get("server_clients", "").split() + self.custom_pair = params.get("vm_pair", "").split() + stress_config = params.get("stress_config", "client_server") self.server_vms = [] self.client_vms = [] self.stress_vm = {} @@ -2569,14 +2570,14 @@ def __init__(self, params, env): self.server_vms.append(vm) if vm.name == pair.split("_")[1]: self.client_vms.append(vm) - if (len(set(self.server_vms)) + len(set(self.client_vms))) != len(self.vms): - raise exceptions.TestError( - "Number of server client vms does not match total_vms") - elif len(self.server_vms) != len(self.client_vms): + if stress_config != "mix": + if (len(set(self.server_vms)) + len(set(self.client_vms))) != len(self.vms): + raise exceptions.TestError( + "Number of server client vms does not match total_vms") + if len(self.server_vms) != len(self.client_vms): raise exceptions.TestError( "This test requires server and client vms in 1:1 ratio") - else: - self.pair_vms = zip(self.server_vms, self.client_vms) + self.pair_vms = zip(self.server_vms, self.client_vms) def prepare_profile(self, fpath, pat_repl): """