* [LTP] [PATCH] fanotify01: fix test failure when running with nfs TMPDIR
@ 2025-02-15 9:17 Amir Goldstein
2025-02-17 7:17 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Amir Goldstein @ 2025-02-15 9:17 UTC (permalink / raw)
To: Petr Vorel; +Cc: Jan Kara, ltp, Rhythm Mahajan
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] fanotify01: fix test failure when running with nfs TMPDIR
2025-02-15 9:17 [LTP] [PATCH] fanotify01: fix test failure when running with nfs TMPDIR Amir Goldstein
@ 2025-02-17 7:17 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2025-02-17 7:17 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Jan Kara, ltp, Rhythm Mahajan
Hi Amir,
> 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);
I merged with LTP specific flag TERRNO which prints both string and numeric
value for errno:
tst_res(TINFO | TERRNO, "TMPDIR does not support reporting events with fid from multi fs");
Thanks for a fix!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-17 7:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-15 9:17 [LTP] [PATCH] fanotify01: fix test failure when running with nfs TMPDIR Amir Goldstein
2025-02-17 7:17 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.