Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
78ec15cd
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,发现更多精彩内容 >>
未验证
提交
78ec15cd
编写于
1月 02, 2018
作者:
S
Satheesh Rajendran
提交者:
GitHub
1月 02, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1196 from balamuruhans/migration
migration: check and install tcpdump package
上级
e06f448c
a834f383
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
11 deletion
+16
-11
qemu/tests/migration.py
qemu/tests/migration.py
+16
-11
未找到文件。
qemu/tests/migration.py
浏览文件 @
78ec15cd
...
...
@@ -5,13 +5,13 @@ import re
import
aexpect
from
autotest.client.shared
import
error
from
virttest
import
utils_misc
from
virttest
import
utils_test
from
virttest
import
utils_package
from
virttest
import
error_context
@
error
.
context_aware
@
error
_context
.
context_aware
def
run
(
test
,
params
,
env
):
"""
KVM migration test:
...
...
@@ -63,7 +63,7 @@ def run(test, params, env):
logging
.
info
(
"sleep %ds waiting guest test start."
,
timeout
)
time
.
sleep
(
timeout
)
if
not
bg
.
is_alive
():
raise
error
.
TestF
ail
(
"Failed to start guest test!"
)
test
.
f
ail
(
"Failed to start guest test!"
)
def
guest_stress_deamon
():
"""
...
...
@@ -142,7 +142,7 @@ def run(test, params, env):
failed_msg
+=
" dmesg from guest is: %s
\n
"
%
dmesg
if
failed_msg
:
raise
error
.
TestF
ail
(
failed_msg
)
test
.
f
ail
(
failed_msg
)
login_timeout
=
int
(
params
.
get
(
"login_timeout"
,
360
))
mig_timeout
=
float
(
params
.
get
(
"mig_timeout"
,
"3600"
))
...
...
@@ -173,6 +173,11 @@ def run(test, params, env):
# Start some process in the background (and leave the session open)
background_command
=
params
.
get
(
"migration_bg_command"
,
""
)
# check whether tcpdump is installed
if
"tcpdump"
in
background_command
:
if
not
utils_package
.
package_install
(
"tcpdump"
,
session
):
test
.
cancel
(
"Please install tcpdump to proceed"
)
session
.
sendline
(
background_command
)
time
.
sleep
(
5
)
...
...
@@ -182,8 +187,8 @@ def run(test, params, env):
try
:
check_command
=
params
.
get
(
"migration_bg_check_command"
,
""
)
error
.
context
(
"Checking the background command in the guest
"
"
pre migration"
,
logging
.
info
)
error
_context
.
context
(
"Checking the background command in the
"
"guest
pre migration"
,
logging
.
info
)
session2
.
cmd
(
check_command
,
timeout
=
30
)
session2
.
close
()
...
...
@@ -227,8 +232,8 @@ def run(test, params, env):
logging
.
info
(
"Logged in after migration"
)
# Make sure the background process is still running
error
.
context
(
"Checking the background command in the guest
"
"
post migration"
,
logging
.
info
)
error
_context
.
context
(
"Checking the background command in the
"
"guest
post migration"
,
logging
.
info
)
session2
.
cmd
(
check_command
,
timeout
=
30
)
# Get the output of migration_test_command
...
...
@@ -243,8 +248,8 @@ def run(test, params, env):
utils_misc
.
format_str_for_message
(
reference_output
))
logging
.
info
(
"Output after:"
+
utils_misc
.
format_str_for_message
(
output
))
raise
error
.
TestF
ail
(
"Command '%s' produced different output "
"before and after migration"
%
test_command
)
test
.
f
ail
(
"Command '%s' produced different output "
"before and after migration"
%
test_command
)
finally
:
# Kill the background process
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录