[LTP] fanotify01 test fails on nfsv3& nfsv4

Amir Goldstein amir73il@gmail.com
Thu Feb 13 16:00:49 CET 2025


On Thu, Feb 13, 2025 at 2:29 PM Rhythm Mahajan
<rhythm.m.mahajan@oracle.com> wrote:
>
> Hi,
>
> fanotify01 test fails on nfsv3& nfsv4 for mainline 6.14 kernels.
>
>
>
> mkdir /tmpdir
>
> yum install nfs-utils  -y
>
> echo "/media *(rw,no_root_squash,sync)" >/etc/exports
>
> systemctl start nfs-server.service
>
> mount -o rw,nfsvers=3 127.0.0.1:/media /tmpdir
>
>
>
> cd /opt/ltp
>
> ./runltp -d /tmpdir  -s fanotify01
>
>
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
> fanotify01.c:340: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected ENODEV: EXDEV (18)
>
>
>
> We have been seeing this failure since 6.9
>
>
>
> The test no longer fails with the revert of the commit
>
> 359047c97 fanotify01: Test setting two marks on different filesystems
>
> https://github.com/linux-test-project/ltp/commit/359047c97
>
>
>
> Could you please confirm if this is a test case issue or a kernel issue?

Test issue for the case where
"TMPDIR does not support reporting events with fid from multi fs"
for reasons other than EXDEV (i.e. btrfs subvol).

Can you test this patch.

Thanks,
Amir.

--- a/testcases/kernel/syscalls/fanotify/fanotify01.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify01.c
@@ -375,7 +375,7 @@ static void setup(void)
        }

        if (fanotify_flags_supported_on_fs(FAN_REPORT_FID,
FAN_MARK_MOUNT, FAN_OPEN, ".")) {
-               inode_mark_fid_xdev = errno;
-               tst_res(TINFO, "TMPDIR does not support reporting
events with fid from multi fs");
+               inode_mark_fid_xdev = (errno == ENODEV) ? EXDEV : errno;
+               tst_res(TINFO, "TMPDIR does not support reporting
events with fid from multi fs"
+                               " (errno = %d)", errno);
        }
 }


More information about the ltp mailing list