[LTP] [PATCH] fanotify01: fix test failure when running with nfs TMPDIR
Amir Goldstein
amir73il@gmail.com
Sat Feb 15 10:17:41 CET 2025
If TMPDIR does not support mount watches due to ENODEV, the failure
to watch multiple fs would be EXDEV and not ENODEV.
Reported-by: Rhythm Mahajan <rhythm.m.mahajan@oracle.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
testcases/kernel/syscalls/fanotify/fanotify01.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify01.c b/testcases/kernel/syscalls/fanotify/fanotify01.c
index c7e759166..38f5a0791 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify01.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify01.c
@@ -375,8 +375,9 @@ 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);
}
}
--
2.34.1
More information about the ltp
mailing list