On Thu, Jun 26, 2025 at 11:57 AM Amir Goldstein amir73il@gmail.com wrote:
On Thu, Jun 26, 2025 at 9:03 AM Naresh Kamboju naresh.kamboju@linaro.org wrote:
Regression in the LTP syscalls/fanotify01 test on the Linux stable-rc 5.4 and 5.10 kernel after upgrading to LTP version 20250530.
- The test passed with LTP version 20250130
- The test fails with LTP version 20250530
Regressions found on stable-rc 5.4 and 5.10 LTP syscalls fanotify01.c fanotify_mark expected EXDEV: ENODEV (19)
Regression Analysis:
- New regression? Yes
- Reproducibility? Yes
Test regression: stable-rc 5.4 and 5.10
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
fanotify01.c:339: TFAIL: fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected EXDEV: ENODEV (19)
The test expected fanotify_mark() to fail with EXDEV, but received ENODEV instead. This indicates a potential mismatch between updated LTP test expectations and the behavior of the 5.4 kernel’s fanotify implementation.
Yap, that's true.
The change to fanotify01:
- db197b7b5 - fanotify01: fix test failure when running with nfs TMPDIR
Depends on this kernel change from v6.8:
- 30ad1938326b - fanotify: allow "weak" fsid when watching a single filesystem
Which fs type is your LTP TMPDIR?
Can you please test this fix:
--- a/testcases/kernel/syscalls/fanotify/fanotify01.c +++ b/testcases/kernel/syscalls/fanotify/fanotify01.c @@ -374,7 +374,21 @@ static void setup(void) }
if (fanotify_flags_supported_on_fs(FAN_REPORT_FID,
FAN_MARK_MOUNT, FAN_OPEN, ".")) {
inode_mark_fid_xdev = (errno == ENODEV) ? EXDEV : errno;
inode_mark_fid_xdev = errno;
if (inode_mark_fid_xdev == ENODEV) {
/*
* The fs on TMPDIR has zero fsid.
* On kernels < v6.8 an inode mark fails with ENODEV.
* On kernels >= v6.8 an inode mark is allowed but multi
* fs inode marks will fail with EXDEV.
* See kernel commit 30ad1938326b
* ("fanotify: allow "weak" fsid when watching
a single filesystem").
*/
if
(fanotify_flags_supported_on_fs(FAN_REPORT_FID, FAN_MARK_INODE, FAN_OPEN, "."))
inode_mark_fid_xdev = errno;
else
inode_mark_fid_xdev = EXDEV;
} tst_res(TINFO | TERRNO, "TMPDIR does not support
reporting events with fid from multi fs"); } }
Please test the attached patch instead. It is simpler and more correct in some configurations.
Thanks, Amir.