diff --git a/test/units/TEST-70-TPM2.pcrlock.sh b/test/units/TEST-70-TPM2.pcrlock.sh index ae809be6712..25f1a2537ed 100755 --- a/test/units/TEST-70-TPM2.pcrlock.sh +++ b/test/units/TEST-70-TPM2.pcrlock.sh @@ -117,10 +117,12 @@ if [[ -n "$SD_STUB" ]]; then [[ "$uki_stdin" == "$uki_pipe" ]] fi -PIN=huhu "$SD_PCRLOCK" make-policy --pcr="$PCRS" --recovery-pin=query -# Repeat immediately (this call will have to reuse the nvindex, rather than create it) -"$SD_PCRLOCK" make-policy --pcr="$PCRS" -"$SD_PCRLOCK" make-policy --pcr="$PCRS" --force +if "$SD_PCRLOCK" is-supported; then + PIN=huhu "$SD_PCRLOCK" make-policy --pcr="$PCRS" --recovery-pin=query + # Repeat immediately (this call will have to reuse the nvindex, rather than create it) + "$SD_PCRLOCK" make-policy --pcr="$PCRS" + "$SD_PCRLOCK" make-policy --pcr="$PCRS" --force +fi img="/tmp/pcrlock.img" truncate -s 20M "$img"