summaryrefslogtreecommitdiffstats
path: root/tests/features
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-10-09 09:08:57 +0200
committerVijay Bellur <vbellur@redhat.com>2014-10-30 01:34:11 -0700
commitd2da726fe76e61f4c499421d8d2bd588ca41b770 (patch)
tree8a6032e7599d9a5908385bb90d01e74148ab062d /tests/features
parent92c4650ac809ee227c6591397a64269850f3217e (diff)
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 <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8914 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/features')
-rwxr-xr-xtests/features/weighted-rebalance.t14
1 files changed, 6 insertions, 8 deletions
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