diff --git a/qemu/tests/boot_with_different_vectors.py b/qemu/tests/boot_with_different_vectors.py index fa3d488122203181fc20b6f7ba6e3dc3d0b96e8b..b1ac44ddc20ca85016b9885ba1d3cff6777f019b 100644 --- a/qemu/tests/boot_with_different_vectors.py +++ b/qemu/tests/boot_with_different_vectors.py @@ -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)