DSKCHG = 0x80,
};
-static char test_image[] = "/tmp/qtest.XXXXXX";
+static char *test_image;
#define assert_bit_set(data, mask) g_assert_cmphex((data) & (mask), ==, (mask))
#define assert_bit_clear(data, mask) g_assert_cmphex((data) & (mask), ==, 0)
int ret;
/* Create a temporary raw image */
- fd = mkstemp(test_image);
+ fd = g_file_open_tmp("qtest.XXXXXX", &test_image, NULL);
g_assert(fd >= 0);
ret = ftruncate(fd, TEST_IMAGE_SIZE);
g_assert(ret == 0);
/* Cleanup */
qtest_end();
unlink(test_image);
+ g_free(test_image);
return ret;
}