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 158e44d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pins/tpm1/tests/tpm1-common-test-functions
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ 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
if [ -n "$SWTPM_SOCKET_PID" ]; then
kill $SWTPM_SOCKET_PID >/dev/null 2>&1
sleep .5
# swtpm does not always terminate gracefully, so kill it
kill -9 $SWTPM_SOCKET_PID >/dev/null 2>&1
fi
}
if ! TESTDIR="$(mktemp -d)"; then
echo "Creating a temporary dir for TPM files failed!" >&2
Expand Down

0 comments on commit 158e44d

Please sign in to comment.