From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: Jan Kara <jack@suse.cz>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 2/2] fanotify14: Improve check for unsupported init flags
Date: Mon, 23 Oct 2023 15:35:21 +0200 [thread overview]
Message-ID: <20231023133521.GD23219@pevik> (raw)
In-Reply-To: <5f74b10f-2a97-9cdc-69c0-5e90f1d5d986@suse.cz>
Hi all,
...
> > > - if (fan_report_target_fid_unsupported && tc->init.flags & FAN_REPORT_TARGET_FID) {
> > > - FANOTIFY_INIT_FLAGS_ERR_MSG(FAN_REPORT_TARGET_FID,
> > > - fan_report_target_fid_unsupported);
> > > + if (tc->init.flags & ~supported_init_flags) {
> > > + tst_res(TCONF, "Unsupported init flags"
> > suggest to preserve the information printed by
> > FANOTIFY_INIT_FLAGS_ERR_MSG, you can use tc->init.desc
> > the for the flag name string.
> tc->init.desc gets printed by the TINFO message at the start of the patch
> chunk. The return value from fanotify_init_flags_supported_on_fs() is not
> preserved anywhere by the new fanotify_get_supported_init_flags() helper
> function so I have nothing to pass as the second argument of
> FANOTIFY_INIT_FLAGS_ERR_MSG().
You were faster than me. I don't know if it's worth to do mapping with function
similar to *tst_strerrno() in lib/errnos.h and print info about unsupported flag
(as string) in fanotify_get_supported_init_flags()).
BTW original error message does not print problematic flag in init (e.g.
FAN_REPORT_DFID_NAME_TARGET), but the corresponding one in the test
(FAN_REPORT_DFID_NAME_TARGET).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-10-23 13:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 15:06 [LTP] [PATCH v3 0/2] Fix fanotify14 Martin Doucha
2023-10-20 15:06 ` [LTP] [PATCH v3 1/2] Add fanotify_get_supported_init_flags() helper function Martin Doucha
2023-10-20 15:55 ` Amir Goldstein
2023-10-23 12:50 ` Petr Vorel
2023-10-20 15:06 ` [LTP] [PATCH v3 2/2] fanotify14: Improve check for unsupported init flags Martin Doucha
2023-10-20 16:05 ` Amir Goldstein
2023-10-23 12:51 ` Martin Doucha
2023-10-23 13:35 ` Petr Vorel [this message]
2023-10-23 13:52 ` Amir Goldstein
2023-10-24 19:19 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231023133521.GD23219@pevik \
--to=pvorel@suse.cz \
--cc=jack@suse.cz \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox