[LTP] [PATCH 2/2] fanotify13: Test watching overlayfs with FAN_REPORT_FID

Amir Goldstein amir73il@gmail.com
Tue Nov 21 11:31:42 CET 2023


On Tue, Nov 21, 2023 at 11:59 AM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Amir,
>
> > Hi Amir,
>
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Few notes below.
>
> > > Run test variants watching overlayfs (over all supported fs)
> > > and reporting events with fid.
>
> > > This requires overlayfs support for AT_HANDLE_FID (kernel 6.6) and
> > > even with AT_HANDLE_FID file handles, only inode marks are supported.
>
> > > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > > ---
> > >  testcases/kernel/syscalls/fanotify/fanotify.h | 28 ++++++++++++-----
> > >  .../kernel/syscalls/fanotify/fanotify13.c     | 31 ++++++++++++++++---
> > >  2 files changed, 47 insertions(+), 12 deletions(-)
>
> > > diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
> > > index 78424a350..a8aec6597 100644
> > > --- a/testcases/kernel/syscalls/fanotify/fanotify.h
> > > +++ b/testcases/kernel/syscalls/fanotify/fanotify.h
> > > @@ -79,8 +79,11 @@ static inline int safe_fanotify_mark(const char *file, const int lineno,
> > >  /*
> > >   * Helper function used to obtain fsid and file_handle for a given path.
> > >   * Used by test files correlated to FAN_REPORT_FID functionality.
> > > + *
> > > + * Returns 0 if normal NFS file handles are supported.
> > > + * Returns AT_HANDLE_FID, of only non-decodeable file handles are supported.
> > s/ of / if /
> > I can fix this before merge.
>
> I dared to fix this and s/AT_HADNLE_FID/AT_HANDLE_FID/ and merge.
>

That's great!

> > Also I noticed (not related to this change) that #define AT_HANDLE_FID 0x200
> > added in dc7b1332ab into testcases/kernel/syscalls/fanotify/fanotify.h should
> > have been in include/lapi/fanotify.h (this file is for fallback definitions).
> > Tiny detail, which should be fixed afterwards.
>
> I also merged a cleanup of the fallback definitions.
>
> Thanks for maintaining fanotify tests!
>

Thank you!
Amir.


More information about the ltp mailing list