tests/qtest/cxl-test: Remove temporary directories after testing
authorThomas Huth <thuth@redhat.com>
Wed, 12 Oct 2022 09:14:35 +0000 (11:14 +0200)
committerThomas Huth <thuth@redhat.com>
Fri, 28 Oct 2022 07:39:21 +0000 (09:39 +0200)
The cxl-test leaves some temporary directories behind. Let's
clean them up now!

Message-Id: <20221012091435.893570-1-thuth@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/cxl-test.c

index cbe0fb549b5cf1ba63503997b7f8c5df4176dff2..61f25a72b67bf4ef1e8549691a91d12ec87f058e 100644 (file)
@@ -101,6 +101,7 @@ static void cxl_t3d(void)
 
     qtest_start(cmdline->str);
     qtest_end();
+    rmdir(tmpfs);
 }
 
 static void cxl_1pxb_2rp_2t3d(void)
@@ -115,6 +116,7 @@ static void cxl_1pxb_2rp_2t3d(void)
 
     qtest_start(cmdline->str);
     qtest_end();
+    rmdir(tmpfs);
 }
 
 static void cxl_2pxb_4rp_4t3d(void)
@@ -130,6 +132,7 @@ static void cxl_2pxb_4rp_4t3d(void)
 
     qtest_start(cmdline->str);
     qtest_end();
+    rmdir(tmpfs);
 }
 #endif /* CONFIG_POSIX */