Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
96d03fff
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,发现更多精彩内容 >>
提交
96d03fff
编写于
3月 02, 2017
作者:
X
Xueqiang Wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu.test: login guest with "nic_index=1" when run sub test "driver_load"
Signed-off-by:
N
Xueqiang Wei
<
xuwei@redhat.com
>
上级
6c27d062
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
12 deletion
+29
-12
multi_host_migration/tests/cfg/multi_host.cfg
multi_host_migration/tests/cfg/multi_host.cfg
+1
-0
multi_host_migration/tests/migration_multi_host_with_stress.py
..._host_migration/tests/migration_multi_host_with_stress.py
+28
-12
未找到文件。
multi_host_migration/tests/cfg/multi_host.cfg
浏览文件 @
96d03fff
...
...
@@ -484,6 +484,7 @@
#serial_login = yes
#not_login_after_mig = yes
bg_stress_test = driver_load
mig_timeout = 1500
repeats = 20
nics += " nic2"
virtio_net:
...
...
multi_host_migration/tests/migration_multi_host_with_stress.py
浏览文件 @
96d03fff
...
...
@@ -42,8 +42,15 @@ def run(test, params, env):
self
.
dsthost
=
self
.
params
.
get
(
"hosts"
)[
1
]
self
.
is_src
=
params
[
"hostid"
]
==
self
.
srchost
self
.
vms
=
params
[
"vms"
].
split
()
self
.
login_timeout
=
int
(
params
.
get
(
"login_timeout"
,
360
))
self
.
need_cleanup
=
params
.
get
(
"need_cleanup"
,
"yes"
)
==
"yes"
self
.
driver_load_cmd
=
params
.
get
(
"driver_load_cmd"
)
if
self
.
driver_load_cmd
:
self
.
nic_index
=
1
self
.
login_timeout
=
120
else
:
self
.
nic_index
=
0
self
.
login_timeout
=
int
(
params
.
get
(
"login_timeout"
,
240
))
self
.
bg
=
None
def
migration_scenario
(
self
):
def
clean_up
(
vm
):
...
...
@@ -51,28 +58,37 @@ def run(test, params, env):
"killall -9 stress"
)
logging
.
info
(
"Kill the background test in guest."
)
session
=
vm
.
wait_for_login
(
timeout
=
self
.
login_timeout
)
s
=
session
.
cmd_status
(
kill_bg_stress_cmd
)
if
s
:
raise
error
.
TestFail
(
"Failed to kill the background"
" test in guest."
)
session
=
vm
.
wait_for_login
(
timeout
=
self
.
login_timeout
,
nic_index
=
self
.
nic_index
)
if
self
.
params
.
get
(
"bg_stress_test"
)
==
"driver_load"
:
if
self
.
bg
and
self
.
bg
.
is_alive
():
self
.
bg
.
join
()
output
=
session
.
cmd_output
(
"ipconfig || ifconfig"
)
logging
.
info
(
"Guest network status:
\n
%s"
%
output
)
session
.
cmd
(
self
.
driver_load_cmd
)
else
:
s
,
o
=
session
.
cmd_status_output
(
kill_bg_stress_cmd
)
if
s
:
raise
error
.
TestFail
(
"Failed to kill the background"
" test in guest: %s"
%
o
)
session
.
close
()
@
error
.
context_aware
def
start_worker
(
mig_data
):
logging
.
info
(
"Try to login guest before migration test."
)
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
session
=
vm
.
wait_for_login
(
timeout
=
self
.
login_timeout
)
bg_stress_test
=
self
.
params
.
get
(
"bg_stress_test"
)
session
=
vm
.
wait_for_login
(
timeout
=
self
.
login_timeout
,
nic_index
=
self
.
nic_index
)
error
.
context
(
"Do stress test before migration."
,
logging
.
info
)
bg_stress_test
=
params
.
get
(
"bg_stress_test"
)
check_running_cmd
=
params
.
get
(
"check_running_cmd"
)
bg
=
utils
.
InterruptedThread
(
utils_test
.
run_virt_sub_test
,
args
=
(
test
,
params
,
env
,),
kwargs
=
{
"sub_type"
:
bg_stress_test
})
self
.
bg
=
utils
.
InterruptedThread
(
utils_test
.
run_virt_sub_test
,
args
=
(
test
,
params
,
env
,),
kwargs
=
{
"sub_type"
:
bg_stress_test
})
bg
.
start
()
self
.
bg
.
start
()
def
check_running
():
return
session
.
cmd_status
(
check_running_cmd
)
==
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录