qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests/9pfs: Force removing of local 9pfs test directory


From: Greg Kurz
Subject: [PATCH] tests/9pfs: Force removing of local 9pfs test directory
Date: Fri, 30 Oct 2020 13:46:34 +0100
User-agent: StGit/0.21

No need to get a complaint from "rm" if some path disappeared for some
reason.

Signed-off-by: Greg Kurz <groug@kaod.org>
---

I remember seeing a "rm: cannot remove 'some-path': No such file or directory"
recently but I can't reproduce it with current master :)
---
 tests/qtest/libqos/virtio-9p.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/libqos/virtio-9p.c b/tests/qtest/libqos/virtio-9p.c
index 6b22fa0e9a49..ab9d88a9b7de 100644
--- a/tests/qtest/libqos/virtio-9p.c
+++ b/tests/qtest/libqos/virtio-9p.c
@@ -62,7 +62,7 @@ static void create_local_test_dir(void)
 static void remove_local_test_dir(void)
 {
     g_assert(local_test_path != NULL);
-    char *cmd = g_strdup_printf("rm -r '%s'\n", local_test_path);
+    char *cmd = g_strdup_printf("rm -fr '%s'\n", local_test_path);
     int res = system(cmd);
     if (res < 0) {
         /* ignore error, dummy check to prevent compiler error */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]