From: Amir Goldstein Date: Wed, 2 Jun 2021 09:23:06 +0000 (+0300) Subject: test/test_syscalls.c: fix test failure on xfs src dir (#611) X-Git-Tag: fuse-3.10.4~4 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8852a22399b015c784b509308bc9dd25b65a539f;p=qemu-gpiodev%2Flibfuse.git 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 --- 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; }