Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 5627f9cffee7 ("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>

authored by

Jarkko Sakkinen and committed by
Shuah Khan
88a16840 5be206ea

+2 -2
+1 -1
tools/testing/selftests/tpm2/test_smoke.sh
··· 4 4 # Kselftest framework requirement - SKIP code is 4. 5 5 ksft_skip=4 6 6 7 - [ -f /dev/tpm0 ] || exit $ksft_skip 7 + [ -e /dev/tpm0 ] || exit $ksft_skip 8 8 9 9 python -m unittest -v tpm2_tests.SmokeTest 10 10 python -m unittest -v tpm2_tests.AsyncTest
+1 -1
tools/testing/selftests/tpm2/test_space.sh
··· 4 4 # Kselftest framework requirement - SKIP code is 4. 5 5 ksft_skip=4 6 6 7 - [ -f /dev/tpmrm0 ] || exit $ksft_skip 7 + [ -e /dev/tpmrm0 ] || exit $ksft_skip 8 8 9 9 python -m unittest -v tpm2_tests.SpaceTest