From: Michael Tremer Date: Tue, 9 Aug 2022 12:53:20 +0000 (+0000) Subject: tests: Cleanup temporary directories X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=788da09a5110f93218ba1690222ad78197ed25cd;p=people%2Fstevee%2Fpakfire.git tests: Cleanup temporary directories Signed-off-by: Michael Tremer --- diff --git a/tests/testsuite.c b/tests/testsuite.c index 01e7aacc..cd4efe01 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -33,11 +33,10 @@ struct testsuite ts; static int test_run(int i, struct test* t) { - char root[PATH_MAX]; + char root[PATH_MAX] = TEST_ROOTFS "/pakfire-test-XXXXXX"; int r; // Create test root directory - snprintf(root, PATH_MAX - 1, "%s/pakfire-test-XXXXXX", TEST_ROOTFS); char* tmp = pakfire_mkdtemp(root); if (!tmp) { LOG("Could not create temporary directory %s: %m\n", root); @@ -68,7 +67,7 @@ static int test_run(int i, struct test* t) { } // Cleanup root - // TODO + pakfire_rmtree(root, 0); return r; }