diff mbox series

[kvm-unit-tests,1/4] scripts: Fix premature_failure() check with newer versions of QEMU

Message ID 20191211094221.7030-2-thuth@redhat.com (mailing list archive)
State New, archived
Headers show
Series Improvements for the x86 tests | expand

Commit Message

Thomas Huth Dec. 11, 2019, 9:42 a.m. UTC
QEMU recently changed its output if it could not open a kernel file
from "could not load kernel ..." to "could not open kernel ...", see
QEMU commit 350f5233d755 ("hw/i386/pc: avoid an assignment in if
condition in x86_load_linux()"). Thus we have to adapt our script
that looks for this string accordingly.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 scripts/runtime.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index fbad0bd..eb60890 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -18,7 +18,7 @@  premature_failure()
     local log="$(eval $(get_cmdline _NO_FILE_4Uhere_) 2>&1)"
 
     echo "$log" | grep "_NO_FILE_4Uhere_" |
-        grep -q -e "could not load kernel" -e "error loading" &&
+        grep -q -e "could not \(load\|open\) kernel" -e "error loading" &&
         return 1
 
     RUNTIME_log_stderr <<< "$log"