未验证 提交 c6fc01b5 编写于 作者: Q Qianqian Zhu 提交者: GitHub

Merge pull request #1540 from rayx/pci_devices_test_timing_issue

pci_devices: run "info qtree" after the guest boots up
...@@ -8,7 +8,6 @@ import logging ...@@ -8,7 +8,6 @@ import logging
import random import random
import re import re
import six import six
import time
from virttest import env_process from virttest import env_process
from virttest import error_context from virttest import error_context
...@@ -356,11 +355,12 @@ def run(test, params, env): ...@@ -356,11 +355,12 @@ def run(test, params, env):
vm = env.get_vm(params["main_vm"]) vm = env.get_vm(params["main_vm"])
# PCI devices are initialized by firmware, which might require some time # PCI devices are initialized by firmware, which might require some time
# to setup. Wait 5s before getting the qtree. # to setup. Wait until the guest boots up.
time.sleep(5) error_context.context("Verify VM booted properly.", logging.info)
qtree = qemu_qtree.QtreeContainer() session = vm.wait_for_login()
error_context.context("Verify qtree vs. qemu devices", logging.info) error_context.context("Verify qtree vs. qemu devices", logging.info)
qtree = qemu_qtree.QtreeContainer()
_info_qtree = vm.monitor.info('qtree', False) _info_qtree = vm.monitor.info('qtree', False)
qtree.parse_info_qtree(_info_qtree) qtree.parse_info_qtree(_info_qtree)
info_qdev = process_qdev(vm.devices) info_qdev = process_qdev(vm.devices)
...@@ -374,9 +374,6 @@ def run(test, params, env): ...@@ -374,9 +374,6 @@ def run(test, params, env):
logging.error(err) logging.error(err)
errors += "qdev vs. qtree, " errors += "qdev vs. qtree, "
error_context.context("Verify VM booted properly.", logging.info)
session = vm.wait_for_login()
error_context.context("Verify lspci vs. qtree", logging.info) error_context.context("Verify lspci vs. qtree", logging.info)
if params.get('lspci_cmd'): if params.get('lspci_cmd'):
_info_lspci = session.cmd_output(params['lspci_cmd']) _info_lspci = session.cmd_output(params['lspci_cmd'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册