summary refs log tree commit diff stats
path: root/tests/qtest/libqtest.c
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2022-08-24 17:39:40 +0800
committerThomas Huth <thuth@redhat.com>2022-08-25 15:16:13 +0200
commit3c239aa77ed19521992a0b14594907adc0d79a6c (patch)
treee798c032e6bb092cbd61d3e9b810dab725a45b94 /tests/qtest/libqtest.c
parenta47ea61de593a8243a66caba9d436040ecae25d5 (diff)
downloadfocaccia-qemu-3c239aa77ed19521992a0b14594907adc0d79a6c.tar.gz
focaccia-qemu-3c239aa77ed19521992a0b14594907adc0d79a6c.zip
tests/qtest: Use g_mkdtemp()
Windows does not provide a mkdtemp() API, but glib does.
Replace mkdtemp() call with the glib version.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220824094029.1634519-3-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/libqtest.c')
-rw-r--r--tests/qtest/libqtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index ad6860d774..7c9fc07de4 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -393,7 +393,7 @@ QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd)
     char *sock_path, sock_dir[] = "/tmp/qtest-serial-XXXXXX";
     QTestState *qts;
 
-    g_assert_true(mkdtemp(sock_dir) != NULL);
+    g_assert_true(g_mkdtemp(sock_dir) != NULL);
     sock_path = g_strdup_printf("%s/sock", sock_dir);
 
     sock_fd_init = init_socket(sock_path);