[LTP] [PATCH v2 2/2] OVL_MNT: put overlayfs lower, upper, work, mnt dir in a separated mountpoint

Petr Vorel pvorel@suse.cz
Wed May 15 15:39:40 CEST 2019


Hi Murphy,

> --- a/testcases/kernel/syscalls/execveat/execveat03.c
...
> -	/* Setup an overlay mount with lower file */
> -	SAFE_MKDIR("lower", 0755);
> -	SAFE_MKDIR("upper", 0755);
> -	SAFE_MKDIR("work", 0755);
> -	SAFE_MKDIR(OVL_MNT, 0755);
> -	ret = mount("overlay", OVL_MNT, "overlay", 0,
> -		    "lowerdir=lower,upperdir=upper,workdir=work");
> -	if (ret < 0) {
> -		if (errno == ENODEV) {
> -			tst_brk(TCONF,
> -				"overlayfs is not configured in this kernel.");
> -		}
> -		tst_brk(TBROK | TERRNO, "overlayfs mount failed");
> -	}
> -	ovl_mounted = 1;
> +	if (setup_overlay(1) == 0)
> +		ovl_mounted = 1;
Here you change test behavior on ENODEV.

+ more info at 1st patch.

Kind regards,
Petr


More information about the ltp mailing list