From 584dc8fb34cf81d68d17588c9bbe4bf1e7ddc3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Wed, 2 Oct 2024 11:22:11 +0200 Subject: [PATCH] Test --- src/pins/tpm1/tests/tpm1-common-test-functions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pins/tpm1/tests/tpm1-common-test-functions b/src/pins/tpm1/tests/tpm1-common-test-functions index 7f55b038..a515ba39 100644 --- a/src/pins/tpm1/tests/tpm1-common-test-functions +++ b/src/pins/tpm1/tests/tpm1-common-test-functions @@ -38,6 +38,7 @@ export -n TSS_TCSD_PORT export -n TSS_TCSD_HOST function on_exit() { + exit_status=$? popd || error "Unable to change directory" if [ ! -d "$TESTDIR" ] || ! rm -rf "$TESTDIR"; then echo "Delete temporary files failed!" >&2 @@ -48,6 +49,9 @@ function on_exit() { # Cleanup sw emulation [ -n "$TCSD_PID" ] && kill $TCSD_PID >/dev/null 2>&1 [ -n "$SWTPM_SOCKET_PID" ] && kill $SWTPM_SOCKET_PID >/dev/null 2>&1 + sleep 1 + ps axf + exit "${exit_status}" } if ! TESTDIR="$(mktemp -d)"; then echo "Creating a temporary dir for TPM files failed!" >&2