mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-15 23:16:51 +07:00
5627f9cffe
TPM2 tests set uses /dev/tpm0 and /dev/tpmrm0 without check if they are available. In case, when these devices are not available test fails, but expected behaviour is skipped test. Signed-off-by: Nikita Sobolev <Nikita.Sobolev@synopsys.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
16 lines
337 B
Bash
Executable File
16 lines
337 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
|
|
|
|
# Kselftest framework requirement - SKIP code is 4.
|
|
ksft_skip=4
|
|
|
|
[ -f /dev/tpm0 ] || exit $ksft_skip
|
|
|
|
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
|