Error out if any kernel panic is seen
[qemu-sanity-check.git] / src / qemu-sanity-check.in
index 56e93c2..ec6e24f 100644 (file)
@@ -230,6 +230,15 @@ if [ "$verbose" = "yes" ]; then
     cat "$test_output"
 fi
 
+# Check if there was a kernel panic.  Note that oops=panic is set
+# which will force a reboot for any oops condition.
+if grep -sq "Kernel panic - not syncing" "$test_output"; then
+    cat "$test_output"
+    echo "$0: error: test $kernel on $qemu: kernel panic seen"
+    rm "$test_output"
+    exit 1
+fi
+
 # Verify that userspace was reached.
 if ! grep -sq "initrd started up OK" "$test_output"; then
     cat "$test_output"