tests/qtest/tpm: Clean up remainders of swtpm
commitdaa8bb57dba5add4929dea6919858a2062101b26
authorThomas Huth <thuth@redhat.com>
Wed, 12 Oct 2022 08:43:34 +0000 (12 10:43 +0200)
committerThomas Huth <thuth@redhat.com>
Fri, 28 Oct 2022 07:39:21 +0000 (28 09:39 +0200)
treea3ff707a26dca277177dea25550ab5b1fdeb309a
parent9d711f19c5608910cdefdad24e23a2e695b312bb
tests/qtest/tpm: Clean up remainders of swtpm

After running "make check", there are remainders of the tpm
tests left in the /tmp directory, slowly filling it up.
Seems like "swtpm" leaves a ".lock" and a "tpm2-00.permall"
file behind, so that the g_rmdir() calls on the temporary
directories fail. Introduce a helper function to remove those
leftovers before doing the g_rmdir().

Message-Id: <20221012084334.794253-1-thuth@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/tpm-crb-swtpm-test.c
tests/qtest/tpm-tis-device-swtpm-test.c
tests/qtest/tpm-tis-swtpm-test.c
tests/qtest/tpm-util.c
tests/qtest/tpm-util.h