[LTP] [PATCH 3/4] fanotify24: Add test for FAN_PRE_ACCESS and FAN_DENY_ERRNO
Jan Kara
jack@suse.cz
Mon Feb 10 16:43:43 CET 2025
On Mon 10-02-25 16:13:15, Amir Goldstein wrote:
> Fork the test fanotify24 from test fanotify03, replacing the
> permission event FAN_ACCESS_PERM with the new pre-content event
> FAN_PRE_ACCESS.
>
> The test is changed to use class FAN_CLASS_PRE_CONTENT, which is
> required for FAN_PRE_ACCESS and this class also enabled the response
> with cutomer error code FAN_DENY_ERRNO.
>
> Unlike FAN_ACCESS_PERM, FAN_PRE_ACCESS is also created on write()
> system call. The test case expected results are adjusted to
> respond with the default error (EPERM) to open() and write() and
> to respond with custom errors (EIO, EBUSY) to read() and execve().
>
> Not all fs support pre-content events, so run on all filesystems
> to excercise FAN_PRE_ACCESS on all supported filesystems.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Looks good to me. I was just wondering whether some bits like
generate_events(), mark setup, child setup, main test loop could not be
factored out into a helper functions used by both old and new tests?
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
More information about the ltp
mailing list