> > > IOW, either I need to specify base dir, so that lower and upper can > > > be setup by testsuite automatically. Or I need to specify lower and > > > upper and then base should not matter. > > > > > > What am I missing. > > > > > > > Not much, as it stands, with option --samefs, UNIONMOUNT_BASEDIR > > is used and without --samefs UNIONMOUNT_LOWERDIR and > > UNIONMOUNT_UPPERDIR used instead. > > > > I agree that this a bit lame and non intuitive way to configure. > > The reason for explicit --samefs option (vs. providing upper and lower > > root from same fs) is, again, for the test sanity checks which differ > > for is_samefs() case. > > > > I think what I will do is I will get rid of UNIONMOUNT_UPPERDIR > > because this name is a bit confusing. It is not the overlay upperdir, > > it is the grandfather of upperdir/workdir. So I might as well call > > this config UNIONMOUNT_BASEDIR and use it also as the parent > > of lowerdir in --samefs tests. > > How about calling upper/work root as UNIONMOUNT_UPPER_WORK_ROOT instead. > That's more intuitive as oppsed to BASEDIR. But I understand that due > to legacy reasons there must be many other assumptions in the code so > it might not be trivial. > This naming might have made sense with existing meaning of UNIONMOUNT_UPPERDIR, but the new idea is to throw that a way and have UNIONMOUNT_BASEDIR as the base dir for lower/upper/work. This is similar to OVL_BASE_TEST_DIR and OVL_BASE_SCRATCH_MNT vars in xfstests. > What will help though, that document these options well, so that > those who don't read the code and still understand use different > config options. > Sure, I added those to README, will try to elaborate. > > > > The config UNIONMOUNT_LOWERDIR will remain, but it will only > > be relevant to tests without --samefs. > > > > IOW, you won't need the fstab bind mount trick and you won't need > > to use the magic suffix "lower_layer" anymore. You could set: > > UNIONMOUNT_BASEDIR=/mnt/virtiofs > > > > to run --ov --samefs --verify tests. > > If I specify UNIONMOUNT_BASEDIR, then --samefs should be implied? > This might have made sense with the meaning of UNIONMOUNT_BASEDIR as it is in current posting, but with intended change, I suppose an empty UNIONMOUNT_LOWERDIR could mean --samefs. When both --samefs and UNIONMOUNT_LOWERDIR are specified, I'll throw a warning that UNIONMOUNT_LOWERDIR is ignored. Thanks, Amir.