[LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs

Cyril Hrubis chrubis@suse.cz
Fri Sep 15 10:28:11 CEST 2023


Hi!
> ---
>  lib/tst_fs_setup.c                            |  2 +-
>  testcases/kernel/syscalls/fanotify/fanotify.h | 21 +++++++
>  .../kernel/syscalls/fanotify/fanotify13.c     | 62 +++++++++++++++++--
>  3 files changed, 79 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/tst_fs_setup.c b/lib/tst_fs_setup.c
> index 6b93483de..30673670f 100644
> --- a/lib/tst_fs_setup.c
> +++ b/lib/tst_fs_setup.c
> @@ -42,7 +42,7 @@ int mount_overlay(const char *file, const int lineno, int skip)
>  			tst_res_(file, lineno, TINFO,
>  				TST_FS_SETUP_OVERLAYFS_MSG);
>  		}
> -	} else {
> +	} else if (skip) {
>  		tst_brk_(file, lineno, TBROK | TERRNO,
>  			"overlayfs mount failed");
>  	}

The skip flag should be called strict, at least that is what we usually
name it, but that is very minor.

...

>  static struct tst_test test = {
>  	.test = do_test,
>  	.tcnt = ARRAY_SIZE(test_cases),
> +	.test_variants = 2,
>  	.setup = do_setup,
>  	.cleanup = do_cleanup,
>  	.needs_root = 1,
>  	.mount_device = 1,
> -	.mntpoint = MOUNT_PATH,
> +	.mntpoint = OVL_BASE_MNTPOINT,
>  	.all_filesystems = 1,
>  	.tags = (const struct tst_tag[]) {
>  		{"linux-git", "c285a2f01d69"},

The git hash for the regression test with variant=1 should have been
added here.


The rest looks good to me. With the two minor issues fixed:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

@Peter Vorel Feel free to push the patch with the two fixes applied.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list