Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
oldium committed Oct 2, 2024
1 parent 20c1ad9 commit 584dc8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pins/tpm1/tests/tpm1-common-test-functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 584dc8f

Please sign in to comment.