From: Michael Tremer Date: Thu, 10 Jun 2021 17:14:38 +0000 (+0000) Subject: testsuite: Fix creating temporary test directories X-Git-Tag: 0.9.28~1278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95946a55ff93c0d57101e285324026b9ff0d4a81;p=pakfire.git testsuite: Fix creating temporary test directories Signed-off-by: Michael Tremer --- diff --git a/tests/testsuite.c b/tests/testsuite.c index b211b3d27..25e7c7831 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -26,6 +26,7 @@ #include #include +#include struct testsuite ts; @@ -35,8 +36,11 @@ static int test_run(int i, struct test* t) { // Create test root directory snprintf(root, PATH_MAX - 1, "%s/pakfire-test-XXXXXX", TEST_ROOTFS); - char* tmp = mkdtemp(root); - ASSERT(root == tmp); + char* tmp = pakfire_mkdtemp(root); + if (!tmp) { + LOG("Could not create temporary directory %s: %m\n", root); + exit(1); + } LOG("running %s (%s)\n", t->name, root);