aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/tpm-crb-swtpm-test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2022-10-12 10:43:34 +0200
committerThomas Huth <thuth@redhat.com>2022-10-28 09:39:21 +0200
commitdaa8bb57dba5add4929dea6919858a2062101b26 (patch)
treea3ff707a26dca277177dea25550ab5b1fdeb309a /tests/qtest/tpm-crb-swtpm-test.c
parent9d711f19c5608910cdefdad24e23a2e695b312bb (diff)
downloadqemu-daa8bb57dba5add4929dea6919858a2062101b26.zip
qemu-daa8bb57dba5add4929dea6919858a2062101b26.tar.gz
qemu-daa8bb57dba5add4929dea6919858a2062101b26.tar.bz2
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>
Diffstat (limited to 'tests/qtest/tpm-crb-swtpm-test.c')
-rw-r--r--tests/qtest/tpm-crb-swtpm-test.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/qtest/tpm-crb-swtpm-test.c b/tests/qtest/tpm-crb-swtpm-test.c
index 55fdb56..40254f7 100644
--- a/tests/qtest/tpm-crb-swtpm-test.c
+++ b/tests/qtest/tpm-crb-swtpm-test.c
@@ -13,7 +13,6 @@
*/
#include "qemu/osdep.h"
-#include <glib/gstdio.h>
#include "libqtest.h"
#include "qemu/module.h"
@@ -62,9 +61,9 @@ int main(int argc, char **argv)
tpm_crb_swtpm_migration_test);
ret = g_test_run();
- g_rmdir(ts.dst_tpm_path);
+ tpm_util_rmdir(ts.dst_tpm_path);
g_free(ts.dst_tpm_path);
- g_rmdir(ts.src_tpm_path);
+ tpm_util_rmdir(ts.src_tpm_path);
g_free(ts.src_tpm_path);
g_free(ts.uri);