From 0ee9b4a35b979b219528b2a9694bd8e19e2d5f95 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 1 Sep 2023 14:23:54 +0100 Subject: [PATCH] Error out if any kernel panic is seen If, even after reaching userspace, we see a kernel panic, report an error. (I might revert this change if it causes problems.) Fixes: https://gitlab.com/redhat/centos-stream/tests/kernel/kernel-tests/-/issues/1720 --- src/qemu-sanity-check.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qemu-sanity-check.in b/src/qemu-sanity-check.in index 56e93c2..ec6e24f 100644 --- a/src/qemu-sanity-check.in +++ b/src/qemu-sanity-check.in @@ -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" -- 1.8.3.1