Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
b8ca158b
T
tp-qemu
项目概览
openeuler
/
tp-qemu
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b8ca158b
编写于
10月 18, 2017
作者:
X
Xu Han
提交者:
GitHub
10月 18, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1092 from kimi1978wy/1489738
multi_nics_stress: add dhclient to get new added nics ip
上级
01cc6741
b5801737
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
8 deletion
+11
-8
qemu/tests/cfg/multi_nics_stress.cfg
qemu/tests/cfg/multi_nics_stress.cfg
+3
-3
qemu/tests/multi_nics_stress.py
qemu/tests/multi_nics_stress.py
+8
-5
未找到文件。
qemu/tests/cfg/multi_nics_stress.cfg
浏览文件 @
b8ca158b
...
...
@@ -4,12 +4,10 @@
kill_vm = yes
flexible_nic_index = yes
image_snapshot = yes
hostpassword = redhat
# nic1 is for control, nic2 is for data connection
vms = "vm1 vm2 vm3 vm4 vm5"
netperf_client = vm1
netperf_server = "vm2 vm3 vm4 vm5"
nics_vm1 =
'nic1 nic2 nic3 nic4'
nics_vm1 =
"nic1 nic2 nic3 nic4"
test_protocols = "TCP_STREAM TCP_MAERTS TCP_SENDFILE UDP_STREAM TCP_RR TCP_CRR UDP_RR"
netperf_sessions = 1
package_sizes = 1500
...
...
@@ -24,3 +22,5 @@
server_path_win = "c:\\"
client_path_win = "c:\\"
test_protocols = "TCP_STREAM TCP_MAERTS UDP_STREAM TCP_RR TCP_CRR UDP_RR"
Linux:
dhcp_cmd = "for nic in `ls /sys/class/net|grep -v lo`;do arp -a|grep -v $nic && dhclient -v $nic;done"
qemu/tests/multi_nics_stress.py
浏览文件 @
b8ca158b
...
...
@@ -12,7 +12,8 @@ from virttest import utils_test
def
launch_netperf_client
(
server_ips
,
netperf_clients
,
test_option
,
test_duration
,
netperf_para_sess
,
netperf_cmd_prefix
):
test_duration
,
netperf_para_sess
,
netperf_cmd_prefix
):
"""
start netperf client in guest.
"""
...
...
@@ -58,14 +59,12 @@ def run(test, params, env):
netperf_client
=
params
.
get
(
"netperf_client"
)
guest_username
=
params
.
get
(
"username"
,
""
)
guest_password
=
params
.
get
(
"password"
,
""
)
host_password
=
params
.
get
(
"hostpassword"
,
"redhat"
)
shell_client
=
params
.
get
(
"shell_client"
)
shell_port
=
params
.
get
(
"shell_port"
)
os_type
=
params
.
get
(
"os_type"
)
shell_prompt
=
params
.
get
(
"shell_prompt"
,
"^root@.*[\#\$]\s*$|#"
)
linesep
=
params
.
get
(
"shell_linesep"
,
"
\n
"
).
decode
(
'string_escape'
)
status_test_command
=
params
.
get
(
"status_test_command"
,
"echo $?"
)
host_ip
=
utils_net
.
get_host_ip_address
(
params
)
ping_count
=
int
(
params
.
get
(
"ping_count"
,
10
))
compile_option_client
=
params
.
get
(
"compile_option_client"
,
""
)
compile_option_server
=
params
.
get
(
"compile_option_server"
,
""
)
...
...
@@ -114,13 +113,18 @@ def run(test, params, env):
client_vm
=
env
.
get_vm
(
client
)
client_vm
.
verify_alive
()
client_ctl
=
client_vm
.
wait_for_login
(
timeout
=
login_timeout
)
if
params
.
get
(
"dhcp_cmd"
):
status
,
output
=
client_ctl
.
cmd_status_output
(
params
[
"dhcp_cmd"
],
timeout
=
600
)
if
status
:
logging
.
warn
(
"Failed to execute dhcp-command, output:
\n
%s"
%
output
)
error
.
context
(
"Stop fireware on netperf client guest."
,
logging
.
info
)
client_ctl
.
cmd
(
"service iptables stop; iptables -F"
,
ignore_all_errors
=
True
)
client_ip
=
client_vm
.
get_address
()
client_ips
.
append
(
client_ip
)
client_ctl_mac
=
server_vm
.
get_mac_address
()
params_client_nic
=
params
.
object_params
(
client
)
nics_count
=
len
(
params_client_nic
.
get
(
"nics"
,
""
).
split
())
if
nics_count
>
1
:
...
...
@@ -228,7 +232,6 @@ def run(test, params, env):
netperf_sessions
=
params
.
get
(
"netperf_sessions"
,
"1"
)
p_sizes
=
params
.
get
(
"package_sizes"
)
netperf_cmd_prefix
=
params
.
get
(
"netperf_cmd_prefix"
,
""
)
netperf_pkg_size
=
params
.
get
(
"netperf_pkg_size"
,
""
)
error
.
context
(
"Start netperf clients."
,
logging
.
info
)
for
protocol
in
test_protocols
.
split
():
error
.
context
(
"Testing %s protocol"
%
protocol
,
logging
.
info
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录