Skip to content

Commit 88a1684

Browse files
Jarkko Sakkinenshuahkh
authored andcommitted
selftests: tpm: Use 'test -e' instead of 'test -f'
'test -f' is suitable only for *regular* files. Use 'test -e' instead. Cc: Nikita Sobolev <[email protected]> Cc: [email protected] Cc: [email protected] Fixes: 5627f9c ("Kernel selftests: Add check if TPM devices are supported") Signed-off-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 5be206e commit 88a1684

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/testing/selftests/tpm2/test_smoke.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Kselftest framework requirement - SKIP code is 4.
55
ksft_skip=4
66

7-
[ -f /dev/tpm0 ] || exit $ksft_skip
7+
[ -e /dev/tpm0 ] || exit $ksft_skip
88

99
python -m unittest -v tpm2_tests.SmokeTest
1010
python -m unittest -v tpm2_tests.AsyncTest

tools/testing/selftests/tpm2/test_space.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# Kselftest framework requirement - SKIP code is 4.
55
ksft_skip=4
66

7-
[ -f /dev/tpmrm0 ] || exit $ksft_skip
7+
[ -e /dev/tpmrm0 ] || exit $ksft_skip
88

99
python -m unittest -v tpm2_tests.SpaceTest

0 commit comments

Comments
 (0)