Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
7b5b3265
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,发现更多精彩内容 >>
未验证
提交
7b5b3265
编写于
9月 28, 2018
作者:
Q
Qianqian Zhu
提交者:
GitHub
9月 28, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1488 from ybduan/seabios_reboot_timeout
seabios_reboot_timeout: Add seabios new case
上级
799254ae
0d786028
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
77 addition
and
0 deletion
+77
-0
qemu/tests/cfg/seabios_reboot_timeout.cfg
qemu/tests/cfg/seabios_reboot_timeout.cfg
+26
-0
qemu/tests/seabios_reboot_timeout.py
qemu/tests/seabios_reboot_timeout.py
+51
-0
未找到文件。
qemu/tests/cfg/seabios_reboot_timeout.cfg
0 → 100644
浏览文件 @
7b5b3265
- seabios_reboot_timeout:
virt_test_type = qemu
type = seabios_reboot_timeout
boot_menu = on
images += ' stg'
image_name_stg = 'images/stg'
image_size_stg = 200M
force_create_image_stg = yes
remove_image_stg = yes
bootindex_stg = 0
bootindex_image1 = 1
variants:
- time0:
boot_reboot_timeout = 0
- time1000:
boot_reboot_timeout = 1000
- time10000:
boot_reboot_timeout = 10000
- time30000:
boot_reboot_timeout = 30000
- time60000:
boot_reboot_timeout = 60000
- time65535:
boot_reboot_timeout = 65535
- time65536:
boot_reboot_timeout = 65536
qemu/tests/seabios_reboot_timeout.py
0 → 100644
浏览文件 @
7b5b3265
import
re
import
logging
from
virttest
import
error_context
from
virttest
import
utils_misc
@
error_context
.
context_aware
def
run
(
test
,
params
,
env
):
"""
KVM seabios test:
1) Start VM
2) Check if reboot-timeout option works as expected
:param test: QEMU test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
def
get_output
(
session_obj
):
"""
Use the function to short the lines in the scripts
"""
return
session_obj
.
get_stripped_output
()
def
reboot_timeout_check
():
"""
reboot-timeout check
"""
return
re
.
search
(
pattern
,
get_output
(
seabios_session
),
re
.
S
)
error_context
.
context
(
"Start VM"
,
logging
.
info
)
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
.
verify_alive
()
timeout
=
float
(
params
.
get
(
"login_timeout"
,
360
))
seabios_session
=
vm
.
logsessions
[
'seabios'
]
rb_timeout
=
int
(
params
[
"boot_reboot_timeout"
])
if
rb_timeout
<
0
:
test
.
cancel
(
"Do not support rb_timeout = %s"
%
rb_timeout
)
elif
rb_timeout
>
65535
:
rb_timeout
=
65535
rb_timeout
=
rb_timeout
//
1000
pattern
=
"No bootable device.*Retrying in %d seconds"
%
rb_timeout
error_context
.
context
(
"Check reboot-timeout option"
,
logging
.
info
)
if
not
utils_misc
.
wait_for
(
reboot_timeout_check
,
timeout
,
1
):
err
=
"Guest doesn't reboot in %d seconds"
%
rb_timeout
test
.
fail
(
err
)
logging
.
info
(
pattern
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录