summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2021-06-02 12:23:06 +0300
committerGitHub <noreply@github.com>2021-06-02 10:23:06 +0100
commit8852a22399b015c784b509308bc9dd25b65a539f (patch)
tree268b4bb8793d79b7247a196f0327bd680dbf881d
parent0b6d97cf5938f6b4885e487c3bd7b02144b1ea56 (diff)
downloadfuse-8852a22399b015c784b509308bc9dd25b65a539f.tar.gz
test/test_syscalls.c: fix test failure on xfs src dir (#611)
rename dir loop test fails when test tmp dir is xfs with an error test_rename_dir_loop() - rename : File exists That is because xfs returns EEXIST for the case of renaming over a non-empty directory. According to rename(2) man page, EEXIST and ENOTEMPTY are both valid error code in this case. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
-rw-r--r--test/test_syscalls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_syscalls.c b/test/test_syscalls.c
index 4fa5c87..cd799ce 100644
--- a/test/test_syscalls.c
+++ b/test/test_syscalls.c
@@ -1624,7 +1624,7 @@ static int test_rename_dir_loop(void)
errno = 0;
res = rename(PATH("a/b"), PATH2("a/d"));
- if (res == 0 || errno != ENOTEMPTY) {
+ if (res == 0 || (errno != ENOTEMPTY && errno != EEXIST)) {
PERROR("rename");
goto fail;
}