Blame SOURCES/fuse-3.10.4-fix-test-failure.patch

8e5a32
From 8852a22399b015c784b509308bc9dd25b65a539f Mon Sep 17 00:00:00 2001
8e5a32
From: Amir Goldstein <amir73il@gmail.com>
8e5a32
Date: Wed, 2 Jun 2021 12:23:06 +0300
8e5a32
Subject: [PATCH] test/test_syscalls.c: fix test failure on xfs src dir (#611)
8e5a32
8e5a32
rename dir loop test fails when test tmp dir is xfs with an error
8e5a32
 test_rename_dir_loop() - rename : File exists
8e5a32
8e5a32
That is because xfs returns EEXIST for the case of renaming over
8e5a32
a non-empty directory.
8e5a32
8e5a32
According to rename(2) man page, EEXIST and ENOTEMPTY are both valid
8e5a32
error code in this case.
8e5a32
8e5a32
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
8e5a32
Signed-off-by: Pavel Reichl <preichl@redhat.com>
8e5a32
---
8e5a32
 test/test_syscalls.c | 2 +-
8e5a32
 1 file changed, 1 insertion(+), 1 deletion(-)
8e5a32
8e5a32
diff --git a/test/test_syscalls.c b/test/test_syscalls.c
8e5a32
index 4fa5c87..cd799ce 100644
8e5a32
--- a/test/test_syscalls.c
8e5a32
+++ b/test/test_syscalls.c
8e5a32
@@ -1624,7 +1624,7 @@ static int test_rename_dir_loop(void)
8e5a32
 
8e5a32
 	errno = 0;
8e5a32
 	res = rename(PATH("a/b"), PATH2("a/d"));
8e5a32
-	if (res == 0 || errno != ENOTEMPTY) {
8e5a32
+	if (res == 0 || (errno != ENOTEMPTY && errno != EEXIST)) {
8e5a32
 		PERROR("rename");
8e5a32
 		goto fail;
8e5a32
 	}
8e5a32
-- 
8e5a32
2.35.1
8e5a32