diff options
Diffstat (limited to 'tests/basic')
-rw-r--r-- | tests/basic/ec/nfs.t | 3 | ||||
-rwxr-xr-x | tests/basic/mount.t | 16 | ||||
-rw-r--r-- | tests/basic/nufa.t | 6 | ||||
-rwxr-xr-x | tests/basic/quota.t | 3 | ||||
-rw-r--r-- | tests/basic/uss.t | 3 | ||||
-rw-r--r-- | tests/basic/volume-status.t | 7 |
6 files changed, 28 insertions, 10 deletions
diff --git a/tests/basic/ec/nfs.t b/tests/basic/ec/nfs.t index 53ec30c92b0..b2e51c03af5 100644 --- a/tests/basic/ec/nfs.t +++ b/tests/basic/ec/nfs.t @@ -15,4 +15,7 @@ TEST mount_nfs $H0:/$V0 $N0 TEST dd if=/dev/zero of=$N0/test bs=1024k count=1k +## Before killing daemon to avoid deadlocks +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0 + cleanup diff --git a/tests/basic/mount.t b/tests/basic/mount.t index c77317f37f5..d67bc8ab998 100755 --- a/tests/basic/mount.t +++ b/tests/basic/mount.t @@ -39,21 +39,21 @@ TEST $CLI volume set $V0 performance.stat-prefetch off; TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0; ## Check consistent "rw" option -TEST 'mount -t fuse.glusterfs | grep -E "^$H0:$V0 .+ \(rw,"'; -TEST 'grep -E "^$H0:$V0 .+ ,?rw," /proc/mounts'; +TEST 'mount -t $MOUNT_TYPE_FUSE | grep -E "^$H0:$V0 "|$GREP_MOUNT_OPT_RW'; +TEST 'grep -E "^$H0:$V0 .+ ,?rw,?" /proc/mounts'; ## Mount FUSE with caching disabled (read-only) TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --read-only -s $H0 --volfile-id $V0 $M1; ## Check consistent "ro" option -TEST 'mount -t fuse.glusterfs | grep -E "^$H0:$V0 .+ \(ro,"'; -TEST 'grep -E "^$H0:$V0 .+ ,?ro,.+" /proc/mounts'; +TEST 'mount -t $MOUNT_TYPE_FUSE | grep -E "^$H0:$V0 "|$GREP_MOUNT_OPT_RO'; +TEST 'grep -E "^$H0:$V0 .+ ,?ro(,.+)?" /proc/mounts'; ## Wait for volume to register with rpc.mountd EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available; ## Mount NFS -TEST mount -t nfs -o nolock,soft,intr $H0:/$V0 $N0; +TEST mount_nfs $H0:/$V0 $N0 nolock; ## Test for consistent views between NFS and FUSE mounts @@ -63,11 +63,13 @@ TEST ! touch $M1/newfile; TEST touch $M0/newfile; TEST stat $M1/newfile; TEST stat $N0/newfile; -TEST ! rm $M1/newfile; -TEST rm $N0/newfile; +TEST ! rm -f $M1/newfile; +TEST rm -f $N0/newfile; TEST ! stat $M0/newfile; TEST ! stat $M1/newfile; +## Before killing daemon to avoid deadlocks +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0 ## Finish up TEST $CLI volume stop $V0; diff --git a/tests/basic/nufa.t b/tests/basic/nufa.t index 0d4c229a0fa..4235539c658 100644 --- a/tests/basic/nufa.t +++ b/tests/basic/nufa.t @@ -2,6 +2,7 @@ . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc +. $(dirname $0)/../nfs.rc cleanup; @@ -27,6 +28,9 @@ TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --read-only -s $H0 --volf sleep 5; ## Mount NFS -TEST mount -t nfs -o nolock,soft,intr $H0:/$V0 $N0; +TEST mount_nfs $H0:/$V0 $N0 nolock; + +## Before killing daemon to avoid deadlocks +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0 cleanup; diff --git a/tests/basic/quota.t b/tests/basic/quota.t index 2fef251e485..1d23cfc8688 100755 --- a/tests/basic/quota.t +++ b/tests/basic/quota.t @@ -2,6 +2,7 @@ . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc +. $(dirname $0)/../nfs.rc . $(dirname $0)/../dht.rc cleanup; @@ -97,7 +98,7 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" usage "/test_dir" # though this may change. ## ----------------------------- -TEST mount -t nfs -o nolock,soft,intr $H0:/$V0 $N0; +TEST mount_nfs $H0:/$V0 $N0 nolock; TEST $CLI volume quota $V0 limit-usage /test_dir 100MB TEST $CLI volume quota $V0 limit-usage /test_dir/in_test_dir 150MB diff --git a/tests/basic/uss.t b/tests/basic/uss.t index 8c6a8982eea..ad7fcaf270a 100644 --- a/tests/basic/uss.t +++ b/tests/basic/uss.t @@ -243,4 +243,7 @@ TEST fd_close $fd1; TEST fd_close $fd2; TEST fd_close $fd3; +## Before killing daemon to avoid deadlocks +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0 + cleanup; diff --git a/tests/basic/volume-status.t b/tests/basic/volume-status.t index a91db3cc50a..9b636cfa936 100644 --- a/tests/basic/volume-status.t +++ b/tests/basic/volume-status.t @@ -2,6 +2,7 @@ . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc +. $(dirname $0)/../nfs.rc cleanup; @@ -19,7 +20,7 @@ sleep 2 TEST glusterfs -s $H0 --volfile-id $V0 $M0; ## Mount NFS -TEST mount -t nfs -o vers=3,nolock,soft,intr $H0:/$V0 $N0; +TEST mount_nfs $H0:/$V0 $N0 nolock; TEST $CLI volume status all TEST $CLI volume status $V0 @@ -62,5 +63,9 @@ TEST test_shd_cmds; TEST test_nfs_cmds; TEST test_brick_cmds; + +## Before killing daemon to avoid deadlocks +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0 + cleanup; |