selftests: tpm: Use 'test -e' instead of 'test -f'

'test -f' is suitable only for *regular* files. Use 'test -e' instead.

Cc: Nikita Sobolev <Nikita.Sobolev@synopsys.com>
Cc: linux-integrity@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Fixes: 5627f9cffe ("Kernel selftests: Add check if TPM devices are supported")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
Jarkko Sakkinen 2020-06-23 00:20:21 +03:00 committed by Shuah Khan
parent 5be206eaac
commit 88a16840f4
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
[ -f /dev/tpm0 ] || exit $ksft_skip
[ -e /dev/tpm0 ] || exit $ksft_skip
python -m unittest -v tpm2_tests.SmokeTest
python -m unittest -v tpm2_tests.AsyncTest

View File

@ -4,6 +4,6 @@
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
[ -f /dev/tpmrm0 ] || exit $ksft_skip
[ -e /dev/tpmrm0 ] || exit $ksft_skip
python -m unittest -v tpm2_tests.SpaceTest