All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Matthew Bobrowski <repnop@google.com>
Cc: Jan Kara <jack@suse.cz>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] syscalls/fanotify14: Encode the expected errno in test case
Date: Mon, 25 Jul 2022 14:49:53 +0200	[thread overview]
Message-ID: <Yt6Rcd3NAO1bKwwD@pevik> (raw)
In-Reply-To: <YtcpBkevcBF6iycz@google.com>

> On Tue, Jul 19, 2022 at 11:58:52AM +0200, Amir Goldstein wrote:
> > So we can add test cases for errors other than EINVAL.

> Just one optional nit. We can probably remove the comments which are
> directly above the existing `if (errno == EINVAL)` checks as they're
> specific to one expected errno value, but this is no longer the case
> with ENOTDIR now in some fanotify_init/fanotify_mark cases.

@Amir, I can remove it in this commit before merge (see diff below),
but don't you want to keep this info somewhere?
Or feel free to post new version.

BTW I tested both commits on various kernels and it works as expected
(failing only on 5.17.3 (openSUSE) 5.18.5, (Debian), old kernels TCONF
as expected.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>

> Feel free to add RVB tags.

@Matthew FYI adding it with correct form in the email reply help us maintainers
to get it added automatically via LTP patchwork instance.

Kind regards,
Petr

diff --git a/testcases/kernel/syscalls/fanotify/fanotify14.c b/testcases/kernel/syscalls/fanotify/fanotify14.c
index c99e19706..ce7e4c54c 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify14.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify14.c
@@ -84,11 +84,6 @@ static void do_test(unsigned int number)
 
 	fanotify_fd = fanotify_init(tc->init_flags, O_RDONLY);
 	if (fanotify_fd < 0) {
-		/*
-		 * EINVAL is to be returned to the calling process when
-		 * an invalid notification class is specified in
-		 * conjunction with FAN_REPORT_FID.
-		 */
 		if (errno == tc->expected_errno) {
 			tst_res(TPASS,
 				"fanotify_fd=%d, fanotify_init(%x, O_RDONLY) "
@@ -121,12 +116,6 @@ static void do_test(unsigned int number)
 	ret = fanotify_mark(fanotify_fd, FAN_MARK_ADD | tc->mark_flags,
 				tc->mask, AT_FDCWD, FILE1);
 	if (ret < 0) {
-		/*
-		 * EINVAL is to be returned to the calling process when
-		 * attempting to use INODE_EVENTS without FAN_REPORT_FID
-		 * specified on the notification group, or using
-		 * INODE_EVENTS with mark type FAN_MARK_MOUNT.
-		 */
 		if (errno == tc->expected_errno) {
 			tst_res(TPASS,
 				"ret=%d, fanotify_mark(%d, FAN_MARK_ADD | %x, "

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2022-07-25 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19  9:58 [LTP] [PATCH 0/2] Fanotify tests for v5.19-rc5 Amir Goldstein
2022-07-19  9:58 ` [LTP] [PATCH 1/2] syscalls/fanotify14: Encode the expected errno in test case Amir Goldstein
2022-07-19 21:58   ` Matthew Bobrowski via ltp
2022-07-20 10:53     ` Amir Goldstein
2022-07-25 12:49     ` Petr Vorel [this message]
2022-07-25 15:10       ` Amir Goldstein
2022-07-19  9:58 ` [LTP] [PATCH 2/2] syscalls/fanotify14: Add test cases for events not allowed on non-dir Amir Goldstein
2022-07-19 22:58   ` Matthew Bobrowski via ltp
2022-07-25 12:55     ` 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=Yt6Rcd3NAO1bKwwD@pevik \
    --to=pvorel@suse.cz \
    --cc=jack@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=repnop@google.com \
    /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 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.