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

Murphy Zhou xzhou@redhat.com
Thu May 16 11:14:30 CEST 2019


On Wed, May 15, 2019 at 03:39:40PM +0200, Petr Vorel wrote:
> 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.

Great catch! I missed this when copying setup_overlay from readahead02.
inotify tests are different from this.

Thanks!
m

> 
> + more info at 1st patch.
> 
> Kind regards,
> Petr


More information about the ltp mailing list