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

Merge pull request #1527 from xiywang/fix_of_bytes_like_obj

qemu_option_check: python3 compatible, add e1000e, remove e1000
......@@ -8,8 +8,13 @@
s390x:
device_name = virtio-net-ccw
- e1000:
RHEL:
only RHEL.6 RHEL.7
no ppc64,ppc64le,s390x
device_name = e1000
- e1000e:
no ppc64,ppc64le,s390x
device_name = e1000e
- rtl8139:
no ppc64,ppc64le,s390x
device_name = rtl8139
......
......@@ -26,7 +26,8 @@ def run(test, params, env):
"""
support_device = process.system_output("%s -device ? 2>&1"
% qemu_binary, timeout=10,
ignore_status=True, shell=True)
ignore_status=True,
shell=True).decode()
if not support_device:
test.cancel("Can not get qemu support device list")
device_list = re.findall(r'name\s+"(.*)",', support_device)
......@@ -42,17 +43,18 @@ def run(test, params, env):
err_msg = "Oops, Your qemu version doesn't support devic '%s', "
err_msg += "make sure you have inputted a correct device name"
test.cancel(err_msg % device_name)
device_support_option = process.run("%s -device %s,? 2>&1" %
(qemu_binary, device_name),
device_support_option = process.system_output("%s -device %s,? 2>&1" %
(qemu_binary,
device_name),
timeout=10,
ignore_status=True, shell=True)
if device_support_option.exit_status:
test.error("Oops, output status is wrong")
if not re.findall(r"%s\.(.*)=(.*)" % device_name,
device_support_option.stdout):
ignore_status=True,
shell=True)
device_support_option = device_support_option.decode().strip()
if not re.findall(r"%s\.(.*)=(.*)" %
device_name, device_support_option):
test.fail("Qemu option check Failed")
logging.info("Qemu options check successful. output is:\n%s" %
device_support_option.stdout)
device_support_option)
device_name = params.get("device_name")
qemu_binary = utils_misc.get_qemu_binary(params)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册