Fix test failure on xfs src dir

Backport upstream commit: 8852a22399b0

Resolves: rhbz#2052712
Signed-off-by: Pavel Reichl <preichl@redhat.com>
This commit is contained in:
Pavel Reichl 2022-02-16 09:29:03 +01:00
parent 81d7a54489
commit f9340000b4
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From 8852a22399b015c784b509308bc9dd25b65a539f Mon Sep 17 00:00:00 2001
From: Amir Goldstein <amir73il@gmail.com>
Date: Wed, 2 Jun 2021 12:23:06 +0300
Subject: [PATCH] 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>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
test/test_syscalls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.35.1

View File

@ -1,12 +1,13 @@
Name: fuse3
Version: 3.10.2
Release: 4%{?dist}
Release: 5%{?dist}
Summary: File System in Userspace (FUSE) v3 utilities
License: GPL+
URL: http://fuse.sf.net
Source0: https://github.com/libfuse/libfuse/archive/fuse-%{version}.tar.gz
Source1: fuse.conf
Patch0: fuse3-gcc11.patch
Patch1: fuse-3.10.4-fix-test-failure.patch
BuildRequires: which
%if ! 0%{?el6}
@ -69,6 +70,7 @@ Common files for FUSE v2 and FUSE v3.
%prep
%setup -n libfuse-fuse-%{version}
%patch0 -p1
%patch1 -p1
%build
export LC_ALL=en_US.UTF-8
@ -158,6 +160,10 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
%endif
%changelog
* Wed Feb 16 2022 Pavel Reichl <preichl@redhat.com> - 3.10.2-5
- Fix test failure
- Fix missing dependency
* Tue Feb 15 2022 Pavel Reichl <preichl@redhat.com> - 3.10.2-4
- Add gating.yaml file