提交 c80957b1 编写于 作者: X Xiyue Wang

boot_with_different_vectors: cannot find a str in session.cmd_output

1. should use findall to find a str in the output of session.cmd_output
2. match str changed from "IO-APIC-fasteoi" to "IO-APIC  <?>-fasteoi"
Signed-off-by: NXiyue Wang <xiywang@redhat.com>
上级 47de2b4f
......@@ -79,10 +79,11 @@ def run(test, params, env):
error_context.context("Check the cpu interrupt of virito",
logging.info)
cmd = "cat /proc/interrupts |grep virtio"
output = session.cmd_output(cmd)
output = session.cmd_output(cmd).strip()
vectors = int(vectors)
if vectors == 0 or vectors == 1:
if "IO-APIC-fasteoi" not in output:
if not (re.findall("IO-APIC", output) and
re.findall("fasteoi", output)):
msg = "Could not find IO-APIC-fasteoi interrupt"
msg += " when vectors = %d" % vectors
test.fail(msg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册