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

Cyril Hrubis chrubis@suse.cz
Thu Nov 22 17:06:08 CET 2018


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?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list