diff options
Diffstat (limited to 'tests/basic')
-rw-r--r-- | tests/basic/afr/arbiter.t | 4 | ||||
-rw-r--r-- | tests/basic/afr/sparse-file-self-heal.t | 4 | ||||
-rw-r--r-- | tests/basic/ec/ec.t | 4 | ||||
-rwxr-xr-x | tests/basic/file-snapshot.t | 5 | ||||
-rwxr-xr-x | tests/basic/tier/tier.t | 2 |
5 files changed, 9 insertions, 10 deletions
diff --git a/tests/basic/afr/arbiter.t b/tests/basic/afr/arbiter.t index 8a983fb0577..91d8d531125 100644 --- a/tests/basic/afr/arbiter.t +++ b/tests/basic/afr/arbiter.t @@ -13,7 +13,7 @@ TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2} TEST $CLI volume start $V0 TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 --entry-timeout=0 $M0; TEST ! stat $M0/.meta/graphs/active/$V0-replicate-0/options/arbiter-count -TEST umount $M0 +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 TEST $CLI volume stop $V0 TEST $CLI volume delete $V0 @@ -66,5 +66,5 @@ EXPECT 0 afr_get_pending_heal_count $V0 TEST cat $M0/file TEST getfattr -n user.name $M0/file TEST `echo append>> $M0/file` -TEST umount $M0 +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 cleanup diff --git a/tests/basic/afr/sparse-file-self-heal.t b/tests/basic/afr/sparse-file-self-heal.t index a362494d95e..b3b2f119702 100644 --- a/tests/basic/afr/sparse-file-self-heal.t +++ b/tests/basic/afr/sparse-file-self-heal.t @@ -54,7 +54,7 @@ EXPECT_WITHIN $HEAL_TIMEOUT "0" afr_get_pending_heal_count $V0 #If the file system of bricks is XFS and speculative preallocation is on, #dropping cahce should be done to free speculatively pre-allocated blocks #by XFS. -( cd $M0 ; umount $M0 ) # fail but drops kernel cache +drop_cache $M0 big_md5sum_0=$(md5sum $B0/${V0}0/big | awk '{print $1}') small_md5sum_0=$(md5sum $B0/${V0}0/small | awk '{print $1}') @@ -124,7 +124,7 @@ EXPECT_WITHIN $HEAL_TIMEOUT "0" afr_get_pending_heal_count $V0 #If the file system of bricks is XFS and speculative preallocation is on, #dropping cahce should be done to free speculatively pre-allocated blocks #by XFS. -( cd $M0 ; umount $M0 ) # fail but drops kernel cache +drop_cache $M0 big_md5sum_0=$(md5sum $B0/${V0}0/big | awk '{print $1}') small_md5sum_0=$(md5sum $B0/${V0}0/small | awk '{print $1}') diff --git a/tests/basic/ec/ec.t b/tests/basic/ec/ec.t index 773d8af3084..b07006545b9 100644 --- a/tests/basic/ec/ec.t +++ b/tests/basic/ec/ec.t @@ -221,7 +221,7 @@ TEST setup_perm_file $M0 sleep 2 # Unmount/remount so that create/write and truncate don't see cached data. -TEST umount $M0 +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 TEST $GFS -s $H0 --volfile-id $V0 $M1 EXPECT_WITHIN $CHILD_UP_TIMEOUT "8" ec_child_up_count $V0 0 @@ -235,7 +235,7 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field $V0 'Status' EXPECT_WITHIN $CHILD_UP_TIMEOUT "10" ec_child_up_count $V0 0 # Unmount/remount again, same reason as before. -TEST umount $M1 +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1 TEST $GFS -s $H0 --volfile-id $V0 $M0 EXPECT_WITHIN $CHILD_UP_TIMEOUT "10" ec_child_up_count $V0 0 diff --git a/tests/basic/file-snapshot.t b/tests/basic/file-snapshot.t index f61de379fcf..f07ce074cdf 100755 --- a/tests/basic/file-snapshot.t +++ b/tests/basic/file-snapshot.t @@ -39,9 +39,8 @@ echo '1234567890' > $M0/data-file2 TEST dd if=$M0/data-file2 of=$M0/big-file conv=notrunc; TEST setfattr -n trusted.glusterfs.block-snapshot-create -v image2 $M0/big-file; -# big-file may still be in kernel page cache, this will fail to umount -# but it will purge vnode and therefore invalidate the cache. -( cd $M0 && umount $M0 ) +# big-file may still be in kernel page cache +drop_cache $M0 TEST setfattr -n trusted.glusterfs.block-snapshot-goto -v image1 $M0/big-file; TEST dd if=$M0/big-file of=$M0/out-file1 bs=11 count=1; diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t index 2a5f7486d7f..851d8b66dad 100755 --- a/tests/basic/tier/tier.t +++ b/tests/basic/tier/tier.t @@ -110,7 +110,7 @@ sleep 12 uuidgen >> d1/data2.txt # Check promotion on read to slow tier -( cd $M0 ; umount -l $M0 ) # fail but drops kernel cache +drop_cache $M0 cat d1/data3.txt sleep 5 EXPECT_WITHIN $PROMOTE_TIMEOUT "0" file_on_fast_tier d1/data2.txt |