[LTP] [PATCH 1/5] syscalls/inotify12: Introduce test for inotify mask flags

Petr Vorel pvorel@suse.cz
Mon Jun 13 17:48:06 CEST 2022


Hi Amir,

...
> +/*\
> + * [Description]
> + * Test special inotify mask flags.
> + *
> + * Regression test for kernel commit a32e697cda27:
> + *
> + *     inotify: show inotify mask flags in proc fdinfo

For our documentation it's better to be formatted like:
 * Regression test for kernel commit:
 * a32e697cda27 ("inotify: show inotify mask flags in proc fdinfo")

because spaces before text make it formatted as code.
No need to repost, I'll fix it before merge.

...
> +static struct tcase {
> +	const char *tname;
> +	unsigned int mask;
> +	int expect_events;
> +} tcases[] = {
> +	{
> +		"Watch for multi events",
> +		IN_MODIFY,
> +		2,
> +	},
> +	{
> +		"Watch for single event",
> +		IN_MODIFY | IN_ONESHOT,
> +		1,
> +	},
> +	{
> +		"Watch for events on linked file",
> +		IN_MODIFY | IN_EXCL_UNLINK,
> +		1,
> +	},
> +};
> +
> +int fd_notify;
nit: this should be static
(make check or make check-inotify12 is your friend).
Again, no need to repost, I'll fix it before merge.

Code itself looks pretty good as always, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list