selftests: tpm: fixes
Subsystems (4)
cover selftests: tpm: fixes
A few fixes for tools/testing/selftests/tpm.
Jarkko Sakkinen (3):
Revert "tpm: selftest: cleanup after unseal with wrong auth/policy
test"
selftests: tpm: Use 'test -e' instead of 'test -f'
selftests: tpm: Use /bin/sh instead of /bin/bash
tools/testing/selftests/tpm2/test_smoke.sh | 9 ++------- tools/testing/selftests/tpm2/test_space.sh | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/3 Revert "tpm: selftest: cleanup after unseal with wrong auth/policy test"
The reverted commit illegitly uses tpm2-tools. External dependencies are absolutely forbidden from these tests. There is also the problem that clearing is not necessarily wanted behavior if the test/target computer is not used only solely for testing.
--- tools/testing/selftests/tpm2/test_smoke.sh | 5 ----- 1 file changed, 5 deletions(-)
tools/testing/selftests/tpm2/test_smoke.sh +0 -5
@@ -8,8 +8,3 @@ ksft_skip=4 python -m unittest -v tpm2_tests.SmokeTest python -m unittest -v tpm2_tests.AsyncTest - -CLEAR_CMD=$(which tpm2_clear) -if [ -n $CLEAR_CMD ]; then - tpm2_clear -T device -fi
Signature · 1 line
2.25.1
PATCH 2/3 selftests: tpm: Use 'test -e' instead of 'test -f'
In reply to Jarkko Sakkinen'test -f' is suitable only for *regular* files. Use 'test -e' instead.
--- tools/testing/selftests/tpm2/test_smoke.sh | 2 +- tools/testing/selftests/tpm2/test_space.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/tpm2/test_smoke.sh +1 -1
@@ -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
tools/testing/selftests/tpm2/test_space.sh +1 -1
@@ -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
Signature · 1 line
2.25.1
PATCH 3/3 selftests: tpm: Use /bin/sh instead of /bin/bash
In reply to Jarkko SakkinenIt's better to use /bin/sh instead of /bin/bash in order to run the tests in the BusyBox shell.
--- tools/testing/selftests/tpm2/test_smoke.sh | 2 +- tools/testing/selftests/tpm2/test_space.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/tpm2/test_smoke.sh +1 -1
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) # Kselftest framework requirement - SKIP code is 4.
tools/testing/selftests/tpm2/test_space.sh +1 -1
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) # Kselftest framework requirement - SKIP code is 4.
Signature · 1 line
2.25.1
Shuah Khan
maintainerQuoted 8 lines · Jarkko Sakkinen
A few fixes for
tools/testing/selftests/tpm.Jarkko Sakkinen (3):
Revert "tpm: selftest: cleanup after unseal with wrong auth/policy
test"
selftests: tpm: Use 'test -e' instead of 'test -f'
selftests: tpm: Use/bin/shinstead of/bin/bash
Quoted 4 lines
tools/testing/selftests/tpm2/test_smoke.sh | 9 ++------- tools/testing/selftests/tpm2/test_space.sh | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-)
Applied to linux-kselftest fixes for Linux 5.8-rc4
thanks,
-- Shuah
Quoted 9 lines · Shuah Khan
Quoted 8 lines · Jarkko Sakkinen
A few fixes for
tools/testing/selftests/tpm.Jarkko Sakkinen (3):
Revert "tpm: selftest: cleanup after unseal with wrong auth/policy
test"
selftests: tpm: Use 'test -e' instead of 'test -f'
selftests: tpm: Use/bin/shinstead of/bin/bash
Quoted 6 lines
Quoted 4 lines
tools/testing/selftests/tpm2/test_smoke.sh | 9 ++------- tools/testing/selftests/tpm2/test_space.sh | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-)Applied to linux-kselftest fixes for Linux 5.8-rc4
Thank you.
/Jarkko