Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
e6f86f9a
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,发现更多精彩内容 >>
未验证
提交
e6f86f9a
编写于
4月 22, 2020
作者:
X
Xu Han
提交者:
GitHub
4月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2183 from leidwang/boot_order_check_q35
Fixed bug about boot_order_check when run it with q35
上级
fa31e236
884af75a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
3 deletion
+10
-3
qemu/tests/boot_order_check.py
qemu/tests/boot_order_check.py
+9
-3
qemu/tests/cfg/boot_order_check.cfg
qemu/tests/cfg/boot_order_check.cfg
+1
-0
未找到文件。
qemu/tests/boot_order_check.py
浏览文件 @
e6f86f9a
...
...
@@ -5,6 +5,7 @@ import time
from
avocado.utils
import
process
from
virttest
import
error_context
from
virttest
import
utils_misc
@
error_context
.
context_aware
...
...
@@ -29,13 +30,16 @@ def run(test, params, env):
device_found
=
dev
break
elif
dev
[
'class_info'
][
'desc'
]
==
'PCI bridge'
:
device_found
=
_get_device
(
dev
[
'pci_bridge'
][
'devices'
],
pci_bridge_devices
=
dev
[
'pci_bridge'
].
get
(
'devices'
)
if
not
pci_bridge_devices
:
continue
device_found
=
_get_device
(
pci_bridge_devices
,
dev_id
)
if
device_found
:
break
return
device_found
def
_get_pci_addr_by_devid
(
vm
,
dev_id
):
def
_get_pci_addr_by_devid
(
dev_id
):
dev_addr
=
''
dev_addr_fmt
=
'%02d:%02d.%d'
pci_info
=
vm
.
monitor
.
info
(
'pci'
,
debug
=
False
)
...
...
@@ -71,6 +75,7 @@ def run(test, params, env):
process
.
system
(
"ifconfig %s down"
%
nic
.
ifname
)
vm
.
resume
()
devices_load_timeout
=
int
(
params
.
get
(
"devices_load_timeout"
,
10
))
timeout
=
int
(
params
.
get
(
"login_timeout"
,
240
))
bootorder_type
=
params
.
get
(
"bootorder_type"
)
...
...
@@ -83,7 +88,8 @@ def run(test, params, env):
for
nic
in
vm
.
virtnet
:
boot_index
=
params
[
'bootindex_%s'
%
nic
.
nic_name
]
pci_addr
=
_get_pci_addr_by_devid
(
vm
,
nic
.
device_id
)
pci_addr
=
utils_misc
.
wait_for
(
lambda
:
_get_pci_addr_by_devid
(
nic
.
device_id
),
timeout
=
devices_load_timeout
)
if
not
pci_addr
:
test
.
fail
(
"Cannot get the pci address of %s."
%
nic
.
nic_name
)
list_nic_addr
.
append
((
pci_addr
,
boot_index
))
...
...
qemu/tests/cfg/boot_order_check.cfg
浏览文件 @
e6f86f9a
...
...
@@ -6,6 +6,7 @@
kill_vm = yes
boot_menu = on
enable_sga = yes
devices_load_timeout = 10
# we have QEMU machine with three NICs (virtio, e1000, rtl8139)
# and two disks (default, IDE). firmware should try to boot from the bootindex=1
# first. If this fails, it should try the bootindex=2 next, and so on.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录