From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Ts'o Subject: Re: Running xfstests on logical volumes Date: Thu, 15 May 2014 08:53:00 -0400 Message-ID: <20140515125300.GB8194@thunk.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Sankar P , linux-fsdevel@vger.kernel.org To: =?utf-8?B?THVrw6HFoQ==?= Czerner Return-path: Received: from imap.thunk.org ([74.207.234.97]:41701 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751361AbaEOMxD (ORCPT ); Thu, 15 May 2014 08:53:03 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, May 15, 2014 at 12:56:11PM +0200, Luk=C3=A1=C5=A1 Czerner wrote= : > > The volume NSSVOL is a logical device and not an actual device. Whe= n I > > run the xfstests, I get an error: > >=20 > > common/config: Error: $TEST_DEV (NSSVOL) is not a block device or a > > NFS filesystem > >=20 > > How do I resolve this ? Is it possible to test such logical devices= ? >=20 > I do not know of any other way other than modify xfstests sources, > specifically common/rc helpers, common/config checks and possibly > more and update mkfs and fsck routines. xfstests simply expects > block device or NFS, so you'll have to teach it to understand your > file system as well. This is hacky as all hell, but something Vaibhav came up with when testing unionfs was to do the following: # mkdir /root/unionfs_play_area # cd /root/unionfs_play_area # mkdir ro_layer rw_layer unionfs:mnt # export TEST_DIR=3D/root/unionfs_play_area/unionfs:mnt # export TEST_DEV=3D/root/unionfs_play_area/unionfs:mnt # export MOUNT_OPTIONS=3D"-o dirs=3D/root/unionfs_play_area/rw_layer=3Drw:/root/unionfs_play_area/ro= _layer=3Dro" # export TEST_FS_MOUNT_OPTS=3D"-o dirs=3D/root/unionfs_play_area/rw_layer=3Drw:/root/unionfs_play_area/ro= _layer=3Dro" The trick is to use a device name that contains a ':' which makes xfstest treat it as a NFS specification. Then the only other change which me made was pretty trivial: --- check.orig 2014-05-13 10:50:13.000000000 -0700 +++ check 2014-05-12 18:01:12.000000000 -0700 @@ -62,7 +62,7 @@ get_fstyp_arg() { if [ "$1" =3D=3D "-udf" -o "$1" =3D=3D "-xfs" -o "$1" =3D=3D "-= nfs" -o \ - "$1" =3D=3D "-tmpfs" ]; then + "$1" =3D=3D "-unionfs" -o "$1" =3D=3D "-tmpfs" = ]; then echo $1 | cut -c 2- fi } @@ -105,6 +105,7 @@ -udf test UDF -nfs test NFS -tmpfs test TMPFS + -unionfs test UNIONFS -l line mode diff -udiff show unified diff (default) -n show me, do not run tests - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html