提交 7bfb8fb4 编写于 作者: H Haotong Chen

usb_common: added error checking in dmesg for linux guest

Signed-off-by: NHaotong Chen <hachen@redhat.com>
上级 faea3dbc
......@@ -129,6 +129,14 @@ def verify_usb_device_in_guest(params, session, devs):
return False
return True
if params.get("os_type") == "linux":
logging.info("checking if there is I/O error in dmesg")
output = session.cmd_output("dmesg | grep -i usb",
float(params["cmd_timeout"]))
for line in output.splitlines():
if "error" in line or "ERROR" in line:
return (False, "error found in guest's dmesg: %s " % line)
res = utils_misc.wait_for(_verify_guest_usb,
float(params["cmd_timeout"]),
step=5.0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册