All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfstests-bld: improve overlayfs testing
@ 2016-11-06 10:23 Amir Goldstein
  2016-11-06 10:23 ` [PATCH 1/2] test-appliance: add xfs/reflink config Amir Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Amir Goldstein @ 2016-11-06 10:23 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Miklos Szeredi, Darrick J . Wong, linux-unionfs, fstests

Hi Ted,

Following are the changes to xfstests-bld I have been using to test overlayfs.

xfstests master branch just got updated with several fixes to overlay/* tests.
One overlayfs bug that was caught by generic/375 was fixed for 4.9-rc4 and one
that was caught by generic/157 is queued on overlayfs-next branch.

With these changes to test-appliance, one can test drive overlayfs clone-up
over xfs with reflink support. Xfs with reflink support was merged to 4.9-rc1
and relevant xfsprogs changes are queued on xfsprogs for-next branch.
Overlayfs clone-up is queued on overlayfs-next branch.

Decided to have a little fun and send this one out to you also via github PR.

Thanks for setting up xfstests-bld.
It has been a great help in bringing up my test env.

Amir.

Amir Goldstein (2):
  test-appliance: add xfs/reflink config
  test-appliance: add support for overlayfs over xfs

 .../test-appliance/files/root/fs/overlay/config    | 44 ++++++++++++++++++----
 .../test-appliance/files/root/fs/xfs/cfg/reflink   |  3 ++
 kvm-xfstests/util/parse_cli                        |  2 +-
 3 files changed, 40 insertions(+), 9 deletions(-)
 create mode 100644 kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/reflink

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] test-appliance: add xfs/reflink config
  2016-11-06 10:23 [PATCH 0/2] xfstests-bld: improve overlayfs testing Amir Goldstein
@ 2016-11-06 10:23 ` Amir Goldstein
  2016-11-06 10:23 ` [PATCH 2/2] test-appliance: add support for overlayfs over xfs Amir Goldstein
  2016-11-07 17:29 ` [PATCH 0/2] xfstests-bld: improve overlayfs testing Theodore Ts'o
  2 siblings, 0 replies; 4+ messages in thread
From: Amir Goldstein @ 2016-11-06 10:23 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Miklos Szeredi, Darrick J . Wong, linux-unionfs, fstests

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/reflink | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/reflink

diff --git a/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/reflink b/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/reflink
new file mode 100644
index 0000000..f4e9ecb
--- /dev/null
+++ b/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/reflink
@@ -0,0 +1,3 @@
+SIZE=small
+export XFS_MKFS_OPTIONS="-m rmapbt=1,reflink=1"
+TESTNAME="XFS reflink"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] test-appliance: add support for overlayfs over xfs
  2016-11-06 10:23 [PATCH 0/2] xfstests-bld: improve overlayfs testing Amir Goldstein
  2016-11-06 10:23 ` [PATCH 1/2] test-appliance: add xfs/reflink config Amir Goldstein
@ 2016-11-06 10:23 ` Amir Goldstein
  2016-11-07 17:29 ` [PATCH 0/2] xfstests-bld: improve overlayfs testing Theodore Ts'o
  2 siblings, 0 replies; 4+ messages in thread
From: Amir Goldstein @ 2016-11-06 10:23 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Miklos Szeredi, Darrick J . Wong, linux-unionfs, fstests

When PRIMARY_FSTYPE is set to xfs, format overlayfs
underlying device as xfs with reflink support, because
clone-up is so much nicer then copy-up.

This requires using the for-next (for 4.9) branch of
xfsprogs.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 .../test-appliance/files/root/fs/overlay/config    | 44 ++++++++++++++++++----
 kvm-xfstests/util/parse_cli                        |  2 +-
 2 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/kvm-xfstests/test-appliance/files/root/fs/overlay/config b/kvm-xfstests/test-appliance/files/root/fs/overlay/config
index 4420cfe..63ae06f 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/overlay/config
+++ b/kvm-xfstests/test-appliance/files/root/fs/overlay/config
@@ -4,18 +4,32 @@
 
 DEFAULT_MKFS_OPTIONS=""
 
+function __fsck()
+{
+	local dev="$1"
+
+	case "$FSTESTTYP" in
+	    ext4)
+		/sbin/e2fsck -fy "$dev"
+		;;
+	    xfs)
+		xfs_repair "$dev"
+		;;
+	esac
+}
+
 function check_filesystem()
 {
 	umount $SM_TST_DEV >& /dev/null
-	/sbin/e2fsck -fy "$SM_TST_DEV"
+	__fsck "$SM_TST_DEV"
 	ret="$?"
-	mount -t ext4 $SM_TST_DEV $SM_TST_MNT
+	mount -t $FSTESTTYP $SM_TST_DEV $SM_TST_MNT
 	echo e2fsck exited with status "$ret"
 
 	umount $SM_SCR_DEV >& /dev/null
-	/sbin/e2fsck -fy "$SM_SCR_DEV"
+	__fsck "$SM_SCR_DEV"
 	ret2="$?"
-	mount -t ext4 $SM_SCR_DEV $SM_SCR_MNT
+	mount -t $FSTESTTYP $SM_SCR_DEV $SM_SCR_MNT
 	echo e2fsck exited with status "$ret2"
 
 	if test "$ret" -eq 0 ; then
@@ -24,16 +38,30 @@ function check_filesystem()
 	return "$ret"
 }
 
+function __mkfs()
+{
+	local dev="$1"
+
+	case "$FSTESTTYP" in
+	    ext4)
+		/sbin/mke2fs -F -q -t ext4 "$dev"
+		;;
+	    xfs)
+		mkfs.xfs -f -m rmapbt=1,reflink=1 "$dev"
+		;;
+	esac
+}
+
 function format_filesystem()
 {
 	umount $SM_TST_DEV >& /dev/null
-	/sbin/mke2fs -F -q -t ext4 $SM_TST_DEV
-	mount -t ext4 $SM_TST_DEV $SM_TST_MNT
+	__mkfs $SM_TST_DEV
+	mount -t $FSTESTTYP $SM_TST_DEV $SM_TST_MNT
 	mkdir -p $SM_TST_MNT/ovl $SM_TST_MNT/testarea
 	      
 	umount $SM_SCR_DEV >& /dev/null
-	/sbin/mke2fs -F -q -t ext4 $SM_SCR_DEV
-	mount -t ext4 $SM_SCR_DEV $SM_SCR_MNT
+	__mkfs $SM_SCR_DEV
+	mount -t $FSTESTTYP $SM_SCR_DEV $SM_SCR_MNT
 	mkdir -p $SM_SCR_MNT/ovl $SM_SCR_MNT/testarea
 
 	return 0
diff --git a/kvm-xfstests/util/parse_cli b/kvm-xfstests/util/parse_cli
index a170931..ea747be 100644
--- a/kvm-xfstests/util/parse_cli
+++ b/kvm-xfstests/util/parse_cli
@@ -59,7 +59,7 @@ print_help ()
 validate_test_name()
 {
     case "$1" in
-	btrfs*|cifs*|ext4*|generic*|shared*|udf*|xfs*) ;;
+	btrfs*|cifs*|ext4*|generic*|shared*|udf*|xfs*|overlay*) ;;
 	*)
 	    echo -e "Invalid test name: $1\n"
 	    print_help
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] xfstests-bld: improve overlayfs testing
  2016-11-06 10:23 [PATCH 0/2] xfstests-bld: improve overlayfs testing Amir Goldstein
  2016-11-06 10:23 ` [PATCH 1/2] test-appliance: add xfs/reflink config Amir Goldstein
  2016-11-06 10:23 ` [PATCH 2/2] test-appliance: add support for overlayfs over xfs Amir Goldstein
@ 2016-11-07 17:29 ` Theodore Ts'o
  2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2016-11-07 17:29 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: Miklos Szeredi, Darrick J . Wong, linux-unionfs, fstests

On Sun, Nov 06, 2016 at 12:23:15PM +0200, Amir Goldstein wrote:
> Hi Ted,
> 
> Following are the changes to xfstests-bld I have been using to test overlayfs.
> 
> xfstests master branch just got updated with several fixes to overlay/* tests.
> One overlayfs bug that was caught by generic/375 was fixed for 4.9-rc4 and one
> that was caught by generic/157 is queued on overlayfs-next branch.
> 
> With these changes to test-appliance, one can test drive overlayfs clone-up
> over xfs with reflink support. Xfs with reflink support was merged to 4.9-rc1
> and relevant xfsprogs changes are queued on xfsprogs for-next branch.
> Overlayfs clone-up is queued on overlayfs-next branch.
> 
> Decided to have a little fun and send this one out to you also via github PR.

Thanks, merged.

> Thanks for setting up xfstests-bld.
> It has been a great help in bringing up my test env.

Great, I'm glad it's been useful for you!

						- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-07 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-06 10:23 [PATCH 0/2] xfstests-bld: improve overlayfs testing Amir Goldstein
2016-11-06 10:23 ` [PATCH 1/2] test-appliance: add xfs/reflink config Amir Goldstein
2016-11-06 10:23 ` [PATCH 2/2] test-appliance: add support for overlayfs over xfs Amir Goldstein
2016-11-07 17:29 ` [PATCH 0/2] xfstests-bld: improve overlayfs testing Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.