Skip to content

Commit

Permalink
Merge branch 'for-fix-tpm-1.2' of https://github.com/penvirus/bootrr
Browse files Browse the repository at this point in the history
…into HEAD
  • Loading branch information
staging-kernelci-org committed Feb 15, 2023
2 parents 6422f92 + 78b3ff4 commit 49b1738
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion helpers/assert_tpm_bringup
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ TPM_DEV="/dev/tpm0"
if test -c $TPM_DEV && which tpm2_getcap
then
export TPM2TOOLS_TCTI="device:$TPM_DEV"
timeout ${TIMEOUT} tpm2_getcap commands && test_report_exit pass
output=$(timeout ${TIMEOUT} tpm2_getcap commands 2>&1)
if [ $? -eq 0 ]; then
test_report_exit pass
fi

# The error message on TPM 1.2:
# Unsupported device. The device is a TPM 1.2
if echo $output | grep -q "TPM 1.2"; then
test_report_exit skip
fi
else
test_report_exit skip
fi
Expand Down

0 comments on commit 49b1738

Please sign in to comment.