static QPCIBus *pcibus = NULL;
static QGuestAllocator guest_malloc;
-static char tmp_path[] = "/tmp/qtest.XXXXXX";
-static char debug_path[] = "/tmp/qtest-blkdebug.XXXXXX";
+static char *tmp_path;
+static char *debug_path;
static QTestState *ide_test_start(const char *cmdline_fmt, ...)
{
int ret;
/* Create temporary blkdebug instructions */
- fd = mkstemp(debug_path);
+ fd = g_file_open_tmp("qtest-blkdebug.XXXXXX", &debug_path, NULL);
g_assert(fd >= 0);
close(fd);
/* Create a temporary raw image */
- fd = mkstemp(tmp_path);
+ fd = g_file_open_tmp("qtest.XXXXXX", &tmp_path, NULL);
g_assert(fd >= 0);
ret = ftruncate(fd, TEST_IMAGE_SIZE);
g_assert(ret == 0);
/* Cleanup */
unlink(tmp_path);
+ g_free(tmp_path);
unlink(debug_path);
+ g_free(debug_path);
return ret;
}