ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: LTP List <ltp@lists.linux.it>, Matthew Bobrowski <repnop@google.com>
Subject: Re: [LTP] [PATCH 3/5] syscalls/fanotify10: Watch directory that is not the mount path
Date: Tue, 14 Jun 2022 14:10:49 +0300	[thread overview]
Message-ID: <CAOQ4uxitmPwwGHiAonZjyqJKG=+SvzraGG9ot1=a2iNrcscAAQ@mail.gmail.com> (raw)
In-Reply-To: <20220614102609.matiab5wmhc43nm4@quack3.lan>

On Tue, Jun 14, 2022 at 1:26 PM Jan Kara <jack@suse.cz> wrote:
>
> On Mon 13-06-22 17:38:24, Amir Goldstein wrote:
> > Move the test file into a test directory, so we won't set a mark
> > on the mount path when watching the children of a directory.
> >
> > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>
> One question below...
>
> > diff --git a/testcases/kernel/syscalls/fanotify/fanotify10.c b/testcases/kernel/syscalls/fanotify/fanotify10.c
> > index 067dd65ae..efef25135 100644
> > --- a/testcases/kernel/syscalls/fanotify/fanotify10.c
> > +++ b/testcases/kernel/syscalls/fanotify/fanotify10.c
> > @@ -74,16 +74,19 @@ static int filesystem_mark_unsupported;
> >
> >  #define MOUNT_PATH "fs_mnt"
> >  #define MNT2_PATH "mntpoint"
> > +#define DIR_NAME "testdir"
> >  #define FILE_NAME "testfile"
> >  #define FILE2_NAME "testfile2"
> >  #define TEST_APP "fanotify_child"
> >  #define TEST_APP2 "fanotify_child2"
> > -#define FILE_PATH MOUNT_PATH"/"FILE_NAME
> > -#define FILE2_PATH MOUNT_PATH"/"FILE2_NAME
> > +#define DIR_PATH MOUNT_PATH"/"DIR_NAME
> > +#define FILE_PATH DIR_PATH"/"FILE_NAME
> > +#define FILE2_PATH DIR_PATH"/"FILE2_NAME
> >  #define FILE_EXEC_PATH MOUNT_PATH"/"TEST_APP
> >  #define FILE2_EXEC_PATH MOUNT_PATH"/"TEST_APP2
> > -#define FILE_MNT2 MNT2_PATH"/"FILE_NAME
> > -#define FILE2_MNT2 MNT2_PATH"/"FILE2_NAME
> > +#define DIR_MNT2 MNT2_PATH"/"DIR_NAME
> > +#define FILE_MNT2 DIR_MNT2"/"FILE_NAME
> > +#define FILE2_MNT2 DIR_MNT2"/"FILE2_NAME
> >  #define FILE_EXEC_PATH2 MNT2_PATH"/"TEST_APP
> >  #define FILE2_EXEC_PATH2 MNT2_PATH"/"TEST_APP2
> >
> > @@ -239,50 +242,50 @@ static struct tcase {
> >       },
> >       {
> >               "ignore events on children of directory created on a specific file",
> > -             MNT2_PATH, FANOTIFY_INODE,
> > -             FILE_PATH, FANOTIFY_INODE,
> > +             DIR_MNT2, FANOTIFY_INODE,
> > +             DIR_PATH, FANOTIFY_INODE,
> >               FAN_EVENT_ON_CHILD,
> >               FILE_PATH, 0, FAN_OPEN
> >       },
>
> I'm somewhat confused here why you remove the FILE_PATH test here... In all
> the other tests you just replace MNT2_PATH with DIR_PATH which makes sense.
>

Good question.
I guess while doing the conversion, I realized that the test case definition
was wrong, so I fixed it and forgot to mention it in the commit message.

The test case (#17) should be placing an ignored mask on a directory
(DIR_PATH) with FAN_EVENT_ON_CHILD and see that the event on
a child (FILE_PATH) is ignored.

But what the test case was doing is setting an ignored mask
with FAN_EVENT_ON_CHILD on the child (FILE_PATH).

Petr,

Do you want to add this to the commit message?
Or split to a separate patch?

Thanks,
Amir.

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

  reply	other threads:[~2022-06-14 11:11 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 14:38 [LTP] [PATCH 0/5] Fanotify tests for FAN_MARK_EVICTABLE Amir Goldstein
2022-06-13 14:38 ` [LTP] [PATCH 1/5] syscalls/inotify12: Introduce test for inotify mask flags Amir Goldstein
2022-06-13 14:58   ` Amir Goldstein
2022-06-13 15:23     ` Petr Vorel
2022-06-13 16:03       ` Amir Goldstein
2022-06-13 16:05         ` Petr Vorel
2022-06-13 15:48   ` Petr Vorel
2022-06-14 10:19   ` Jan Kara
2022-06-14 11:28     ` Petr Vorel
2022-06-13 14:38 ` [LTP] [PATCH 2/5] syscalls/fanotify23: Introduce FAN_MARK_EVICTABLE test Amir Goldstein
2022-06-14 10:19   ` Jan Kara
2022-06-16  8:36   ` Petr Vorel
2022-06-16  8:50     ` Amir Goldstein
2022-06-16 13:28       ` Petr Vorel
2022-06-13 14:38 ` [LTP] [PATCH 3/5] syscalls/fanotify10: Watch directory that is not the mount path Amir Goldstein
2022-06-14 10:26   ` Jan Kara
2022-06-14 11:10     ` Amir Goldstein [this message]
2022-06-16 13:31       ` Petr Vorel
2022-06-16 13:46         ` Amir Goldstein
2022-06-16 16:57           ` Petr Vorel
2022-06-13 14:38 ` [LTP] [PATCH 4/5] syscalls/fanotify10: Mount cycle between test cases Amir Goldstein
2022-06-14 10:47   ` Jan Kara
2022-06-13 14:38 ` [LTP] [PATCH 5/5] syscalls/fanotify10: Add test cases for evictable ignore mark Amir Goldstein
2022-06-14 13:04   ` Jan Kara
2022-06-30  6:27   ` Jan Stancek
2022-06-30  8:20     ` Amir Goldstein
2022-07-07 12:49       ` Jan Stancek
2022-07-09 10:09         ` Amir Goldstein
2022-07-12  8:19           ` Jan Stancek
2022-08-24 15:24             ` Jan Kara
2022-08-24 18:13               ` Amir Goldstein
2022-08-25  9:33                 ` Jan Kara
2022-08-25 12:53               ` Jan Stancek
2022-08-25 13:47                 ` Amir Goldstein
2022-08-25 14:03                   ` Jan Kara

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='CAOQ4uxitmPwwGHiAonZjyqJKG=+SvzraGG9ot1=a2iNrcscAAQ@mail.gmail.com' \
    --to=amir73il@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).