[LTP] [PATCH v3 09/11] Add statmount04 test

Cyril Hrubis chrubis@suse.cz
Wed Jul 10 16:42:31 CEST 2024


Hi!
> > +static void cleanup(void)
> > +{
> > +	if (tst_is_mounted(DIR_C))
> > +		SAFE_UMOUNT(DIR_C);
> > +
> > +	if (tst_is_mounted(DIR_B))
> > +		SAFE_UMOUNT(DIR_B);
> > +
> > +	if (tst_is_mounted(DIR_A))
> > +		SAFE_UMOUNT(DIR_A);
> 
> Again I wouldn't bet that umounting once is enough here. If my mental
> image is right we have stacked several mounts on each directory.
> 
> I wonder how many cycled would this code do?
> 
> 	while (tst_is_mounted(DIR_A))
> 		SAFE_UMOUNT(DIR_A);

Scratch that, we are bind mounting only once, so it should be correct.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list