提交 e0fcaab8 编写于 作者: F Feng Yang

Merge pull request #239 from FengYang/test_protocols

Test protocols
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
client_path = /var/tmp/ client_path = /var/tmp/
netperf_test_duration = 360 netperf_test_duration = 360
netperf_para_sessions = 2 netperf_para_sessions = 2
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
check_cmd = "pidof netserver" check_cmd = "pidof netserver"
RHEL.4: RHEL.4:
netperf_link = netperf-2.4.5.tar.bz2 netperf_link = netperf-2.4.5.tar.bz2
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
bg_sub_test = netperf_stress bg_sub_test = netperf_stress
bg_stress_run_flag = netperf_run bg_stress_run_flag = netperf_run
netperf_para_sessions = 2 netperf_para_sessions = 2
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
Windows: Windows:
netperf_server_link_win = "netserver-2.6.0.exe" netperf_server_link_win = "netserver-2.6.0.exe"
netperf_client_link_win = "netperf.exe" netperf_client_link_win = "netperf.exe"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
client_path = /var/tmp/ client_path = /var/tmp/
netperf_test_duration = 600 netperf_test_duration = 600
netperf_para_sessions = 1 netperf_para_sessions = 1
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
netperf_package_sizes = 32 64 128 256 512 1024 2048 4096 8192 16834 netperf_package_sizes = 32 64 128 256 512 1024 2048 4096 8192 16834
Windows: Windows:
netperf_server_link_win = "netserver-2.6.0.exe" netperf_server_link_win = "netserver-2.6.0.exe"
......
- ext_host_netperf_stress:
virt_test_type = qemu
type = netperf_stress
image_snapshot = yes
hostpassword = redhat
#netperf client is the vm, the netperf client is the ext_host
netperf_link = netperf-2.6.0.tar.bz2
server_path = /var/tmp/
client_path = /var/tmp/
netperf_test_duration = 120
netperf_para_sessions = 1
netperf_client = ${vms}
# please update netperf_server according to your env.
netperf_server = 192.168.11.21
test_protocols = TCP_RR TCP_CRR UDP_RR TCP_STREAM TCP_MAERTS TCP_SENDFILE UDP_STREAM
Windows:
netperf_server_link_win = "netserver-2.6.0.exe"
netperf_client_link_win = "netperf.exe"
server_path_win = "c:\\"
client_path_win = "c:\\"
RHEL.4:
netperf_link = netperf-2.4.5.tar.bz2
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
netperf_timeout = 600 netperf_timeout = 600
compile_option_server = --enable-burst compile_option_server = --enable-burst
compile_option_client = --enable-burst compile_option_client = --enable-burst
#test_protocol = TCP_STREAM #test_protocols = TCP_STREAM
variants: variants:
- vhost_on: - vhost_on:
vhost=on vhost=on
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
pkg_md5sum = 9654ffdfd4c4f2c93ce3733cd9ed9236 pkg_md5sum = 9654ffdfd4c4f2c93ce3733cd9ed9236
netperf_test_timeout = 360 netperf_test_timeout = 360
netperf_para_sessions = 6 netperf_para_sessions = 6
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
Windows: Windows:
server_download_link = "c:\\netserver-2.6.0.exe" server_download_link = "c:\\netserver-2.6.0.exe"
server_md5sum = 8f107e9df4f501d20cf46cccc426f4a9 server_md5sum = 8f107e9df4f501d20cf46cccc426f4a9
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
client_path = /var/tmp/ client_path = /var/tmp/
netperf_test_duration = 600 netperf_test_duration = 600
netperf_para_sessions = 1 netperf_para_sessions = 1
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
Windows: Windows:
netperf_server_link_win = "netserver-2.6.0.exe" netperf_server_link_win = "netserver-2.6.0.exe"
netperf_client_link_win = "netperf.exe" netperf_client_link_win = "netperf.exe"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
client_path = /var/tmp/ client_path = /var/tmp/
netperf_test_duration = 120 netperf_test_duration = 120
netperf_para_sessions = 1 netperf_para_sessions = 1
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
Windows: Windows:
netperf_server_link_win = "netserver-2.6.0.exe" netperf_server_link_win = "netserver-2.6.0.exe"
netperf_client_link_win = "netperf.exe" netperf_client_link_win = "netperf.exe"
...@@ -28,16 +28,16 @@ ...@@ -28,16 +28,16 @@
netperf_server = localhost netperf_server = localhost
variants: variants:
- TCP_STREAM: - TCP_STREAM:
test_protocol= TCP_STREAM test_protocols = TCP_STREAM
- TCP_RR: - TCP_RR:
test_protocol= TCP_RR test_protocols = TCP_RR
- TCP_CRR: - TCP_CRR:
test_protocol= TCP_CRR test_protocols = TCP_CRR
- TCP_MAERTS: - TCP_MAERTS:
test_protocol= TCP_MAERTS test_protocols = TCP_MAERTS
- TCP_SENDFILE: - TCP_SENDFILE:
test_protocol= TCP_SENDFILE test_protocols = TCP_SENDFILE
- UDP_STREAM: - UDP_STREAM:
test_protocol= UDP_STREAM test_protocols = UDP_STREAM
- UDP_RR: - UDP_RR:
test_protocol= UDP_RR test_protocols = UDP_RR
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
client_path = /var/tmp/ client_path = /var/tmp/
netperf_test_duration = 600 netperf_test_duration = 600
netperf_para_sessions = 1 netperf_para_sessions = 1
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
netperf_package_sizes = 64 256 1024 4096 16384 65535 netperf_package_sizes = 64 256 1024 4096 16384 65535
Windows: Windows:
netperf_server_link_win = "netserver-2.6.0.exe" netperf_server_link_win = "netserver-2.6.0.exe"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
client_path = /var/tmp/ client_path = /var/tmp/
netperf_test_timeout = 360 netperf_test_timeout = 360
netperf_para_sessions = 6 netperf_para_sessions = 6
test_protocol = TCP_STREAM test_protocols = TCP_STREAM
Windows: Windows:
netperf_server_link_win = "netserver-2.6.0.exe" netperf_server_link_win = "netserver-2.6.0.exe"
netperf_client_link_win = "netperf.exe" netperf_client_link_win = "netperf.exe"
......
...@@ -171,11 +171,12 @@ def run(test, params, env): ...@@ -171,11 +171,12 @@ def run(test, params, env):
# Run netperf with message size defined in range. # Run netperf with message size defined in range.
netperf_test_duration = int(params.get("netperf_test_duration", 60)) netperf_test_duration = int(params.get("netperf_test_duration", 60))
netperf_para_sess = params.get("netperf_para_sessions", "1") netperf_para_sess = params.get("netperf_para_sessions", "1")
test_protocol = params.get("test_protocol", "TCP_STREAM") test_protocols = params.get("test_protocols", "TCP_STREAM")
netperf_cmd_prefix = params.get("netperf_cmd_prefix", "") netperf_cmd_prefix = params.get("netperf_cmd_prefix", "")
netperf_output_unit = params.get("netperf_output_unit", " ") netperf_output_unit = params.get("netperf_output_unit", " ")
netperf_package_sizes = params.get("netperf_package_sizes") netperf_package_sizes = params.get("netperf_package_sizes")
test_option = "-t %s -l %s" % (test_protocol, netperf_test_duration) test_option = params.get("test_option", "")
test_option += " -l %s" % netperf_test_duration
if params.get("netperf_remote_cpu") == "yes": if params.get("netperf_remote_cpu") == "yes":
test_option += " -C" test_option += " -C"
if params.get("netperf_local_cpu") == "yes": if params.get("netperf_local_cpu") == "yes":
...@@ -186,10 +187,13 @@ def run(test, params, env): ...@@ -186,10 +187,13 @@ def run(test, params, env):
stop_time = start_time + netperf_test_duration stop_time = start_time + netperf_test_duration
num = 0 num = 0
s_len = len(server_infos) s_len = len(server_infos)
for protocol in test_protocols.split():
error.context("Testing %s protocol" % protocol, logging.info)
t_option = "%s -t %s" % (test_option, protocol)
for n_client in netperf_clients: for n_client in netperf_clients:
index = num % s_len index = num % s_len
server_ip = server_infos[index]["ip"] server_ip = server_infos[index]["ip"]
n_client.bg_start(server_ip, test_option, n_client.bg_start(server_ip, t_option,
netperf_para_sess, netperf_cmd_prefix, netperf_para_sess, netperf_cmd_prefix,
package_sizes=netperf_package_sizes) package_sizes=netperf_package_sizes)
if utils_misc.wait_for(n_client.is_netperf_running, 10, 0, 1, if utils_misc.wait_for(n_client.is_netperf_running, 10, 0, 1,
...@@ -202,7 +206,6 @@ def run(test, params, env): ...@@ -202,7 +206,6 @@ def run(test, params, env):
# subprocess backgroundly, can set this run flag to False to stop # subprocess backgroundly, can set this run flag to False to stop
# the stress test. # the stress test.
env["netperf_run"] = True env["netperf_run"] = True
for n_client in netperf_clients: for n_client in netperf_clients:
if n_client.is_netperf_running(): if n_client.is_netperf_running():
left_time = stop_time - time.time() left_time = stop_time - time.time()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册