Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to support client-server and standalone stress tool runs #2207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions shared/cfg/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
bssrikanth marked this conversation as resolved.
Show resolved Hide resolved

# params to enable/disable sosreport for host/remote host
enable_host_sosreport = "no"
Expand Down
17 changes: 9 additions & 8 deletions virttest/utils_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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 = {}
Expand All @@ -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):
"""
Expand Down