[Skiboot] [PATCH 7/7] test/qemu: skip qemu test if 'old' qemu without PCR

Stewart Smith stewart at linux.ibm.com
Tue May 29 16:18:10 AEST 2018


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 at linux.ibm.com>
---
 test/run_qemu-jessie-debian-installer_boot_test.sh | 7 +++++++
 test/run_qemu_boot_test.sh                         | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/test/run_qemu-jessie-debian-installer_boot_test.sh b/test/run_qemu-jessie-debian-installer_boot_test.sh
index 60648585aacb..12f2e2361970 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 c3a793376e21..370388c4c139 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
-- 
2.17.0



More information about the Skiboot mailing list