提交 eb1dea7f 编写于 作者: Q Qingtang Zhou 提交者: Lucas Meneghel Rodrigues

qemu.tests.multi_disk: Fix github issue #438

This is a bug which was introduced in
a1c46d139b79ad7f27ab2dee6f6ff58ac9de65d1

This is no 'qtree' keyword in the output of any
version of qemu, thus the method to check if
qemu supports qtree in that commit would disable
qtree check for every qemu binary.

This commit tries to run the 'info qtree' command
directly, if everything goes well, it means we
have qtree support.
Reported-by: NMike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: NQingtang Zhou <qzhou@redhat.com>
上级 faa64e6b
......@@ -5,7 +5,7 @@ multi_disk test for Autotest framework.
"""
import logging, re, random, string
from autotest.client.shared import error, utils
from virttest import qemu_qtree, env_process
from virttest import qemu_qtree, env_process, qemu_monitor
_RE_RANGE1 = re.compile(r'range\([ ]*([-]?\d+|n).*\)')
_RE_RANGE2 = re.compile(r',[ ]*([-]?\d+|n)')
......@@ -202,7 +202,12 @@ def run_multi_disk(test, params, env):
re_str = params["re_str"]
black_list = params["black_list"].split()
if "qtree" in str(vm.monitor.human_monitor_cmd("help", debug=False)):
have_qtree = True
out = vm.monitor.human_monitor_cmd("qtree", debug=False)
if "unknown command" in str(out):
have_qtree = False
if have_qtree:
error.context("Verifying qtree vs. test params")
err = 0
qtree = qemu_qtree.QtreeContainer()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册