[LTP] [PATCH v2 2/7] fanotify: Print more details on error from fanotify_flags_supported_on_fs()
Amir Goldstein
amir73il@gmail.com
Thu Nov 30 11:12:31 CET 2023
On Thu, Nov 30, 2023 at 11:37 AM Jan Kara <jack@suse.cz> wrote:
>
> Print more details about failing calls from
> fanotify_flags_supported_on_fs().
>
> Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> ---
> testcases/kernel/syscalls/fanotify/fanotify.h | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
> index f34440e0bd41..3b8838e8dd68 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify.h
> +++ b/testcases/kernel/syscalls/fanotify/fanotify.h
> @@ -195,7 +195,9 @@ static inline int fanotify_flags_supported_on_fs(unsigned int init_flags,
> if (errno == ENOSYS)
> tst_brk(TCONF, "fanotify not configured in kernel");
> if (errno != EINVAL)
> - tst_brk(TBROK | TERRNO, "fanotify_init() failed");
> + tst_brk(TBROK | TERRNO,
> + "fanotify_init(%x, O_RDONLY) failed",
> + init_flags);
> return -1;
> }
>
> @@ -204,8 +206,9 @@ static inline int fanotify_flags_supported_on_fs(unsigned int init_flags,
> rval = strcmp(fname, OVL_MNT) ? -2 : -3;
> } else if (errno != EINVAL) {
> tst_brk(TBROK | TERRNO,
> - "fanotify_mark (%d, FAN_MARK_ADD, ..., AT_FDCWD, %s) failed",
> - fd, fname);
> + "fanotify_mark (%d, FAN_MARK_ADD | %x, %llx, AT_FDCWD, %s) failed",
> + fd, mark_flags, (unsigned long long)event_flags,
> + fname);
> } else {
> rval = -1;
> }
> --
> 2.35.3
>
More information about the ltp
mailing list