]> Git Repo - qemu.git/blobdiff - tests/test-io-channel-command.c
iotests: Move migration helpers to iotests.py
[qemu.git] / tests / test-io-channel-command.c
index 03cac36a3f16173e65615de55a38e5e331a4c0ba..3bc52661210413776d9d0e5b4fb12dd98084262f 100644 (file)
  *
  */
 
+#include "qemu/osdep.h"
 #include "io/channel-command.h"
 #include "io-channel-helpers.h"
+#include "qapi/error.h"
+#include "qemu/module.h"
 
 #ifndef WIN32
 static void test_io_channel_command_fifo(bool async)
@@ -27,8 +30,8 @@ static void test_io_channel_command_fifo(bool async)
 #define TEST_FIFO "tests/test-io-channel-command.fifo"
     QIOChannel *src, *dst;
     QIOChannelTest *test;
-    char *srcfifo = g_strdup_printf("PIPE:%s,wronly", TEST_FIFO);
-    char *dstfifo = g_strdup_printf("PIPE:%s,rdonly", TEST_FIFO);
+    const char *srcfifo = "PIPE:" TEST_FIFO ",wronly";
+    const char *dstfifo = "PIPE:" TEST_FIFO ",rdonly";
     const char *srcargv[] = {
         "/bin/socat", "-", srcfifo, NULL,
     };
@@ -57,8 +60,6 @@ static void test_io_channel_command_fifo(bool async)
     object_unref(OBJECT(src));
     object_unref(OBJECT(dst));
 
-    g_free(srcfifo);
-    g_free(dstfifo);
     unlink(TEST_FIFO);
 }
 
This page took 0.024571 seconds and 4 git commands to generate.