forked from Minki/linux
Kernel selftests: Add check if TPM devices are supported
TPM2 tests set uses /dev/tpm0 and /dev/tpmrm0 without check if they are available. In case, when these devices are not available test fails, but expected behaviour is skipped test. Signed-off-by: Nikita Sobolev <Nikita.Sobolev@synopsys.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
2e9a972566
commit
5627f9cffe
@ -1,6 +1,11 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
|
||||
|
||||
# Kselftest framework requirement - SKIP code is 4.
|
||||
ksft_skip=4
|
||||
|
||||
[ -f /dev/tpm0 ] || exit $ksft_skip
|
||||
|
||||
python -m unittest -v tpm2_tests.SmokeTest
|
||||
python -m unittest -v tpm2_tests.AsyncTest
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
|
||||
|
||||
# Kselftest framework requirement - SKIP code is 4.
|
||||
ksft_skip=4
|
||||
|
||||
[ -f /dev/tpmrm0 ] || exit $ksft_skip
|
||||
|
||||
python -m unittest -v tpm2_tests.SpaceTest
|
||||
|
Loading…
Reference in New Issue
Block a user