From d2da726fe76e61f4c499421d8d2bd588ca41b770 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Thu, 9 Oct 2014 09:08:57 +0200 Subject: Regression test portability: loopback devices Introduce functions to deal with loopback devices setup, mount and umount. Remove test for xfsprogs for non Linux systems, as loopback devices can be populated with other filesystems (e.g.: FFS for NetBSD) While there, remove mount.nfs test for non Linux systems. At least NetBSD has it in base system as mount_nfs. BUG: 1129939 Change-Id: I816b36e1d3e6933f92acf19d9be8eeaaa333356e Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8914 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/features/weighted-rebalance.t | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tests/features') diff --git a/tests/features/weighted-rebalance.t b/tests/features/weighted-rebalance.t index 3964fb22290..fbda32e50a2 100755 --- a/tests/features/weighted-rebalance.t +++ b/tests/features/weighted-rebalance.t @@ -47,12 +47,12 @@ TEST $CLI volume info TEST mkdir ${B0}/${V0}{1,2} TEST truncate -s $((40*1024*1024)) ${B0}/disk1 -TEST mkfs.xfs -f -i size=512 ${B0}/disk1 -TEST mount -o loop ${B0}/disk1 ${B0}/${V0}1 +TEST MKFS_LOOP -i 512 ${B0}/disk1 +TEST MOUNT_LOOP ${B0}/disk1 ${B0}/${V0}1 TEST truncate -s $((80*1024*1024)) ${B0}/disk2 -TEST mkfs.xfs -f -i size=512 ${B0}/disk2 -TEST mount -o loop ${B0}/disk2 ${B0}/${V0}2 +TEST MKFS_LOOP -i 512 ${B0}/disk2 +TEST MOUNT_LOOP ${B0}/disk2 ${B0}/${V0}2 TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2} EXPECT "$V0" volinfo_field $V0 'Volume Name' @@ -65,7 +65,7 @@ EXPECT 'Started' volinfo_field $V0 'Status' TEST $GFS -s $H0 --volfile-id $V0 $M0 TEST mkdir $M0/dir TEST touch_files -TEST umount $M0 +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 # Check that the larger brick got more of the files. nfiles=$(count_files ${B0}/${V0}2) @@ -82,10 +82,8 @@ nfiles=$(count_files ${B0}/${V0}2) #echo $nfiles $(get_xattr ${B0}/${V0}1) $(get_xattr ${B0}/${V0}2) 3>&2 2>&1 1>&3 3>&- TEST [ $nfiles -le 580 ] -exit 0 - $CLI volume stop $V0 -umount ${B0}/${V0}{1,2} +UMOUNT_LOOP ${B0}/${V0}{1,2} rm -f ${B0}/disk{1,2} cleanup -- cgit