aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/hello_world/run_qemu_hello_world.sh7
-rwxr-xr-xtest/run_qemu_boot_test.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/test/hello_world/run_qemu_hello_world.sh b/test/hello_world/run_qemu_hello_world.sh
index 36f7c76..9ca35d3 100755
--- a/test/hello_world/run_qemu_hello_world.sh
+++ b/test/hello_world/run_qemu_hello_world.sh
@@ -36,6 +36,7 @@ spawn $QEMU_BIN -bios skiboot.lid $QEMU_ARGS -kernel $SKIBOOT_ZIMAGE -nographic
expect {
timeout { send_user "\nTimeout waiting for hello world\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
+"Could not load OPAL firmware" { send_user "\nSkiboot is too large for this Qemu, skipping\n"; exit 4; }
"Machine Check Stop" { exit 1;}
"Hello World!"
}
@@ -46,6 +47,12 @@ EOF
) 2>&1 > $t
r=$?
+if [ $r -eq 4 ]; then
+ echo "Qemu is too old and can't load a skiboot.lid this big"
+ rm $T
+ exit 0
+fi
+
if [ $r != 0 ]; then
cat $t
exit $r
diff --git a/test/run_qemu_boot_test.sh b/test/run_qemu_boot_test.sh
index ad28b33..791a750 100755
--- a/test/run_qemu_boot_test.sh
+++ b/test/run_qemu_boot_test.sh
@@ -39,6 +39,7 @@ spawn $QEMU_BIN $QEMU_ARGS -bios skiboot.lid -kernel $SKIBOOT_ZIMAGE
expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
+"Could not load OPAL firmware" { send_user "\nSkiboot is too large for this Qemu, skipping\n"; exit 4; }
"Machine Check Stop" { exit 1; }
"Trying to write privileged spr 338" { send_user "\nUpgrade Qemu: needs PCR register\n"; exit 3 }
"Welcome to Petitboot"
@@ -50,6 +51,12 @@ EOF
) 2>&1 > $T
E=$?
+if [ $E -eq 4 ]; then
+ echo "Qemu is too old and can't load a skiboot.lid this big"
+ rm $T
+ exit 0
+fi
+
if [ $E -eq 3 ]; then
echo "WARNING: Qemu test not run; upgrade QEMU to one that supports PCR register";
rm $T