diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-10-09 09:08:57 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-10-30 01:34:11 -0700 |
commit | d2da726fe76e61f4c499421d8d2bd588ca41b770 (patch) | |
tree | 8a6032e7599d9a5908385bb90d01e74148ab062d /tests/bugs/bug-858488-min-free-disk.t | |
parent | 92c4650ac809ee227c6591397a64269850f3217e (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-858488-min-free-disk.t')
-rw-r--r-- | tests/bugs/bug-858488-min-free-disk.t | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/bugs/bug-858488-min-free-disk.t b/tests/bugs/bug-858488-min-free-disk.t index babb27c4e25..1933f707e9c 100644 --- a/tests/bugs/bug-858488-min-free-disk.t +++ b/tests/bugs/bug-858488-min-free-disk.t @@ -13,13 +13,13 @@ TEST $CLI volume info; ## Lets create partitions for bricks TEST truncate -s 100M $B0/brick1 TEST truncate -s 200M $B0/brick2 -TEST LO1=`losetup --find --show $B0/brick1` -TEST mkfs.xfs $LO1 -TEST LO2=`losetup --find --show $B0/brick2` -TEST mkfs.xfs $LO2 +TEST LO1=`SETUP_LOOP $B0/brick1` +TEST MKFS_LOOP $LO1 +TEST LO2=`SETUP_LOOP $B0/brick2` +TEST MKFS_LOOP $LO2 TEST mkdir -p $B0/${V0}1 $B0/${V0}2 -TEST mount -t xfs $LO1 $B0/${V0}1 -TEST mount -t xfs $LO2 $B0/${V0}2 +TEST MOUNT_LOOP $LO1 $B0/${V0}1 +TEST MOUNT_LOOP $LO2 $B0/${V0}2 ## Lets create volume TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2}; @@ -102,4 +102,7 @@ TEST $CLI volume stop $V0; EXPECT 'Stopped' volinfo_field $V0 'Status'; $CLI volume delete $V0; +UMOUNT_LOOP ${B0}/${V0}{1,2} +rm -f ${B0}/brick{1,2} + cleanup; |