Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
491c88ab
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
491c88ab
编写于
3月 05, 2020
作者:
X
Xu Han
提交者:
GitHub
3月 05, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2092 from ybduan/seabios_basic
seabios_basic: optimize testing procedure
上级
67525eef
92f2c6a0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
10 deletion
+7
-10
qemu/tests/seabios.py
qemu/tests/seabios.py
+7
-10
未找到文件。
qemu/tests/seabios.py
浏览文件 @
491c88ab
...
@@ -2,7 +2,6 @@ import re
...
@@ -2,7 +2,6 @@ import re
import
logging
import
logging
from
virttest
import
error_context
from
virttest
import
error_context
from
virttest
import
utils_misc
from
virttest
import
utils_misc
...
@@ -11,7 +10,7 @@ def run(test, params, env):
...
@@ -11,7 +10,7 @@ def run(test, params, env):
"""
"""
KVM Seabios test:
KVM Seabios test:
1) Start guest with sga bios
1) Start guest with sga bios
2) Check the sg
b
bios messages(optional)
2) Check the sg
a
bios messages(optional)
3) Restart the vm, verify it's reset(optional)
3) Restart the vm, verify it's reset(optional)
4) Display and check the boot menu order
4) Display and check the boot menu order
5) Start guest from the specified boot entry
5) Start guest from the specified boot entry
...
@@ -42,7 +41,7 @@ def run(test, params, env):
...
@@ -42,7 +41,7 @@ def run(test, params, env):
vm
.
create
()
vm
.
create
()
timeout
=
float
(
params
.
get
(
"login_timeout"
,
240
))
timeout
=
float
(
params
.
get
(
"login_timeout"
,
240
))
boot_menu_key
=
params
.
get
(
"boot_menu_key"
,
'
f12
'
)
boot_menu_key
=
params
.
get
(
"boot_menu_key"
,
'
esc
'
)
restart_key
=
params
.
get
(
"restart_key"
)
restart_key
=
params
.
get
(
"restart_key"
)
boot_menu_hint
=
params
.
get
(
"boot_menu_hint"
)
boot_menu_hint
=
params
.
get
(
"boot_menu_hint"
)
boot_device
=
params
.
get
(
"boot_device"
,
""
)
boot_device
=
params
.
get
(
"boot_device"
,
""
)
...
@@ -67,25 +66,23 @@ def run(test, params, env):
...
@@ -67,25 +66,23 @@ def run(test, params, env):
if
restart_key
:
if
restart_key
:
error_context
.
context
(
"Restart vm and check it's ok"
,
logging
.
info
)
error_context
.
context
(
"Restart vm and check it's ok"
,
logging
.
info
)
seabios_text
=
get_output
(
seabios_session
)
seabios_text
=
get_output
(
seabios_session
)
headline
=
seabios_text
.
split
(
"
\n
"
)[
0
]
+
"
\n
"
headline
=
seabios_text
.
split
(
"
\n
"
)[
0
]
+
"
\n
"
headline_count
=
seabios_text
.
count
(
headline
)
headline_count
=
seabios_text
.
count
(
headline
)
vm
.
send_key
(
restart_key
)
vm
.
send_key
(
restart_key
)
if
not
(
boot_menu_hint
and
utils_misc
.
wait_for
(
boot_menu
,
timeout
,
1
)):
test
.
fail
(
"Could not get boot menu message after rebooting"
)
# Send boot menu key in monitor.
vm
.
send_key
(
boot_menu_key
)
def
reboot_check
():
def
reboot_check
():
return
get_output
(
seabios_session
).
count
(
headline
)
>
headline_count
return
get_output
(
seabios_session
).
count
(
headline
)
>
headline_count
if
not
utils_misc
.
wait_for
(
reboot_check
,
timeout
,
1
):
if
not
utils_misc
.
wait_for
(
reboot_check
,
timeout
,
1
):
test
.
fail
(
"Could not restart the vm"
)
test
.
fail
(
"Could not restart the vm"
)
utils_misc
.
wait_for
(
boot_menu_check
,
timeout
,
1
)
if
not
(
boot_menu_hint
and
utils_misc
.
wait_for
(
boot_menu_check
,
timeout
,
1
)):
test
.
fail
(
"Could not get boot menu message after rebooting"
)
# Send boot menu key in monitor.
vm
.
send_key
(
boot_menu_key
)
error_context
.
context
(
"Display and check the boot menu order"
,
logging
.
info
)
error_context
.
context
(
"Display and check the boot menu order"
,
logging
.
info
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录