aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2020-10-02 13:00:44 +1000
committerOliver O'Halloran <oohall@gmail.com>2020-10-02 13:04:00 +1000
commitf901fcafae14d38e29f1cc11440086ee678785d0 (patch)
tree09909650377a4152c7b85b04395fd52320eb1c4d /test
parentd29b77d95b7921805a9300f851af071d50d1da5c (diff)
downloadskiboot-f901fcafae14d38e29f1cc11440086ee678785d0.zip
skiboot-f901fcafae14d38e29f1cc11440086ee678785d0.tar.gz
skiboot-f901fcafae14d38e29f1cc11440086ee678785d0.tar.bz2
test: Skip qemu tests if skiboot.lid is too large
With the addition of the secvar patches the GCOV enabled builds now produce a skiboot.lid that greater than 4MB. This is larger than the historical max firmware image size supported by the PowerNV Qemu model so we need to skip the Qemu boot tests in that case. Non-GCOV builds are still well under the limit (2.3MB or so) and mambo tests are not affected, so this shouldn't be a big deal. If the Qemu happens to support a larger image size this should continue to work without issues. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'test')
-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