[LTP] [PATCH 1/5] syscalls/fanotify01: check events also on mountpoint mark

Amir Goldstein amir73il@gmail.com
Thu Nov 22 17:57:47 CET 2018

On Thu, Nov 22, 2018 at 6:07 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
> > > I've added SAFE_CLOSE(fd_notify) here so that we do not use all
> > > available file descriptors with large enough -i parameter and pushed.
> > >
> > > I do wonder what is the reason to move the fanotify_init() from setup
> > > the the test_fanotify(), is there a problem with recycling the same fd
> > > for different tests?
> > >
> >
> > Closing fd_notify is an easier and better cleanup between test cases.
> > Otherwise we would need to FAN_MARK_FLUSH all the individual marks
> > that we added.
> Wouldn't that cover more of kernel codepaths? If we reused the fd and
> cleared all the marks we would test that the API for clearing the marks
> works as expected. Or should we write a separate test for that?

I see that fanotify04 exercises FAN_MARK_FLUSH.
Besides it is probably the less common case (??).
Most of the time I imagine that a monitoring program sets a mark
and watches events until it closes the fd.


More information about the ltp mailing list