mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
selftests: tpm2: test_smoke: Run only when TPM2 is avaialable.
Since Linux 5.6 tpm_version_major sysfs file is avaialble which gives the TPM version. Using this file the test can be skipped on systems with TPM 1.2. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
This commit is contained in:
parent
5e515e13eb
commit
27141f1950
1 changed files with 2 additions and 0 deletions
|
@ -5,5 +5,7 @@
|
|||
ksft_skip=4
|
||||
|
||||
[ -e /dev/tpm0 ] || exit $ksft_skip
|
||||
read tpm_version < /sys/class/tpm/tpm0/tpm_version_major
|
||||
[ "$tpm_version" == 2 ] || exit $ksft_skip
|
||||
|
||||
python3 -m unittest -v tpm2_tests.SmokeTest 2>&1
|
||||
|
|
Loading…
Add table
Reference in a new issue