linux/tools/testing/selftests/tpm2
Ahmed Salem 170ec11935 selftests: tpm2: test_smoke: use POSIX-conformant expression operator
Use POSIX-conformant expression operator symbol '='.

The use of the non POSIX-conformant symbol '==' would work
in bash, but not in sh where the unexpected operator error
would result in test_smoke.sh being skipped.

Instead of changing the shebang to use bash, which may not be
available on all systems, use the POSIX-conformant expression
symbol '=' to test for equality.

Without this patch:
===================
 # make -j8 TARGETS=tpm2 kselftest
 # selftests: tpm2: test_smoke.sh
 # ./test_smoke.sh: 9: [: 2: unexpected operator
 ok 1 selftests: tpm2: test_smoke.sh # SKIP

With this patch:
================
 # make -j8 TARGETS=tpm2 kselftest
 # selftests: tpm2: test_smoke.sh
 # Ran 9 tests in 9.236s
 ok 1 selftests: tpm2: test_smoke.sh

Link: https://lore.kernel.org/r/37ztyakgrrtgvec344mg7mspchwjpxxtsprtjidso3pwkmm4f4@awsa5mzgqmtb
Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-04-08 14:56:13 -06:00
..
.gitignore selftests: tpm2: create a dedicated .gitignore 2025-04-08 14:56:13 -06:00
Makefile
settings
test_async.sh selftests: tpm2: redirect python unittest logs to stdout 2024-07-31 11:42:22 -06:00
test_smoke.sh selftests: tpm2: test_smoke: use POSIX-conformant expression operator 2025-04-08 14:56:13 -06:00
test_space.sh selftests: tpm2: redirect python unittest logs to stdout 2024-07-31 11:42:22 -06:00
tpm2.py
tpm2_tests.py