aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.ibm.com>2018-05-29 16:02:13 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-05-29 16:02:35 +1000
commit021f6f39b9bfb60e1cda5432bfe6430cb9adfed7 (patch)
tree4897357178e4d053410e91ddae02ba58f1100af4 /test
parent2865cedf49bf18a0385eeba715da6edf71ce7678 (diff)
downloadskiboot-021f6f39b9bfb60e1cda5432bfe6430cb9adfed7.zip
skiboot-021f6f39b9bfb60e1cda5432bfe6430cb9adfed7.tar.gz
skiboot-021f6f39b9bfb60e1cda5432bfe6430cb9adfed7.tar.bz2
test/qemu: skip qemu test if 'old' qemu without PCR
3d019581c98153 introduced clearing PCR on reinit cpus, and until (the near future from now) qemu didn't support this register. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/run_qemu-jessie-debian-installer_boot_test.sh7
-rwxr-xr-xtest/run_qemu_boot_test.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/test/run_qemu-jessie-debian-installer_boot_test.sh b/test/run_qemu-jessie-debian-installer_boot_test.sh
index 6064858..12f2e23 100755
--- a/test/run_qemu-jessie-debian-installer_boot_test.sh
+++ b/test/run_qemu-jessie-debian-installer_boot_test.sh
@@ -45,6 +45,7 @@ timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
"Machine Check Stop" { exit 1;}
"Kernel panic - not syncing" { exit 2;}
+"Trying to write privileged spr 338" { send_user "\nUpgrade Qemu: needs PCR register\n"; exit 3 }
"Starting system log daemon"
}
close
@@ -54,6 +55,12 @@ EOF
) 2>&1 >> $T
E=$?
+if [ $E -eq 3 ]; then
+ echo "WARNING: Qemu test not run; upgrade QEMU to one that supports PCR register";
+ rm $T $D
+ exit 0;
+fi
+
if [ $E -eq 0 ]; then
rm $T $D
else
diff --git a/test/run_qemu_boot_test.sh b/test/run_qemu_boot_test.sh
index c3a7933..370388c 100755
--- a/test/run_qemu_boot_test.sh
+++ b/test/run_qemu_boot_test.sh
@@ -38,6 +38,7 @@ expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
"Machine Check Stop" { exit 1; }
+"Trying to write privileged spr 338" { send_user "\nUpgrade Qemu: needs PCR register\n"; exit 3 }
"Welcome to Petitboot"
}
close
@@ -47,6 +48,12 @@ EOF
) 2>&1 > $T
E=$?
+if [ $E -eq 3 ]; then
+ echo "WARNING: Qemu test not run; upgrade QEMU to one that supports PCR register";
+ rm $T
+ exit 0;
+fi
+
if [ $E -eq 0 ]; then
rm $T
else