]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/qtest/virtio-9p-test.c
tests/9pfs: fix test dir for parallel tests
[mirror_qemu.git] / tests / qtest / virtio-9p-test.c
index c15908f27b3de6d228465d97a172fe9c29ba99f2..6401d4f56460b58b655e761f73eee2097e94a178 100644 (file)
@@ -1076,3 +1076,15 @@ static void register_virtio_9p_test(void)
 }
 
 libqos_init(register_virtio_9p_test);
+
+static void __attribute__((constructor)) construct_9p_test(void)
+{
+    /* make sure test dir for the 'local' tests exists */
+    virtio_9p_create_local_test_dir();
+}
+
+static void __attribute__((destructor)) destruct_9p_test(void)
+{
+    /* remove previously created test dir when test suite completed */
+    virtio_9p_remove_local_test_dir();
+}