On Fri, Jun 19, 2020 at 12:38 AM Vivek Goyal <vgoyal@xxxxxxxxxx> wrote: > > On Fri, May 29, 2020 at 07:40:58PM +0300, Amir Goldstein wrote: > > Hi All, > > > > The master branch on the unionmount-testsuite tree [1] has been updated. > > > > Changes in this update: > > - Support user configurable underlying filesystem > > > > So far, unionmount-testsuite used hardcoded paths for layers and > > mount point. Using underlying filesystem other than tmpfs was possible, > > but not very easy to setup. > > > > This update brings the ability for user to configure custom paths > > with a custom filesystem for the underlying layers. > > This is intended to be used for integration with xfstests [2]. > > > > Here is an excerpt from the README: > > --- > > The following environment variables are supported: > > > > UNIONMOUNT_BASEDIR - parent dir of all samefs layers (default: /base) > > Hi Amir, > > I am running these tests with. > > UNIONMOUNT_BASEDIR="/mnt/foo/" I suspect there is a bug with trailing / in UNIONMOUNT_BASEDIR I did not test with trailing / Can you try without it? > > - ./run --ov runs fine. But when I try to run it again it complains > that. > > rm: cannot remove '/mnt/overlayfs//m': Device or resource busy > > So I have to first unmount /mnt/overlayfs/m/ and then run tests > again. > > I think it will be nice if it can clear the environment by itself. > It should. All the tests I tried cleaned up previous test env automatically. The only case where explicit cleanup is needed is before changing context and modifying envvars. > - I am running one the recent kernel (5.7.0+) and following errors > out. > > # ./run --ov --verify > Environment variables: > UNIONMOUNT_BASEDIR=/mnt/overlayfs/ > > *** > *** ./run --ov --samefs --ts=0 open-plain > *** > TEST open-plain.py:10: Open O_RDONLY > /mnt/overlayfs/m/a/foo100: not on union mount > > Will spend more time to figure out what happened. > > - I am planning to use these environment variables and run overlay over > virtiofs tests. Can I do the same thing with xfstests overlay tests. > In README.overlay I see that I need to specify two separate devices. > Can I specify to directories (and not devices) to be used as TEST > and SCRATCH and run overlay test. As far as I can tell, SCRATCH_DEV and TEST_DEV are directories in all those non-block filesystems including virtiofs: _scratch_mkfs() ... case $FSTYP in nfs*|cifs|ceph|overlay|glusterfs|pvfs2|9p|virtiofs) # unable to re-create this fstyp, just remove all files in # $SCRATCH_MNT to avoid EEXIST caused by the leftover files # created in previous runs _scratch_cleanup_files So I think you just need to set SCRATCH_DEV and TEST_DEV to two different directories and you are good to go for running check or check -overlay. Thanks, Amir.