Skip to content

Commit

Permalink
test/qemu: skip qemu test if 'old' qemu without PCR
Browse files Browse the repository at this point in the history
3d01958 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>
  • Loading branch information
stewartsmith committed May 29, 2018
1 parent 2865ced commit 021f6f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/run_qemu-jessie-debian-installer_boot_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions test/run_qemu_boot_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 021f6f3

Please sign in to comment.