summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-1099890.t
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/bugs/bug-1099890.t
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/bugs/bug-1099890.t')
-rw-r--r--tests/bugs/bug-1099890.t19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/bugs/bug-1099890.t b/tests/bugs/bug-1099890.t
index a27d4e74fbf..c4be2cf56ba 100644
--- a/tests/bugs/bug-1099890.t
+++ b/tests/bugs/bug-1099890.t
@@ -17,16 +17,16 @@ TEST pidof glusterd;
TEST truncate -s 100M $B0/brick1
TEST truncate -s 100M $B0/brick2
-TEST L1=`losetup --find --show $B0/brick1`
-TEST mkfs.xfs $L1
+TEST L1=`SETUP_LOOP $B0/brick1`
+TEST MKFS_LOOP $L1
-TEST L2=`losetup --find --show $B0/brick2`
-TEST mkfs.xfs $L2
+TEST L2=`SETUP_LOOP $B0/brick2`
+TEST MKFS_LOOP $L2
TEST mkdir -p $B0/${V0}{1,2}
-TEST mount -t xfs $L1 $B0/${V0}1
-TEST mount -t xfs $L2 $B0/${V0}2
+TEST MOUNT_LOOP $L1 $B0/${V0}1
+TEST MOUNT_LOOP $L2 $B0/${V0}2
# Create a plain distribute volume with 2 subvols.
TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2};
@@ -117,4 +117,9 @@ EXPECT "$V0-client-1" dht_get_linkto_target "$B0/${V0}1/zz"
EXPECT "1" is_dht_linkfile "$B0/${V0}1/zz"
-cleanup;
+force_umount $M0
+$CLI volume stop $V0
+UMOUNT_LOOP ${B0}/${V0}{1,2}
+rm -f ${B0}/brick{1,2}
+
+cleanup