summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun-tests.sh1
-rwxr-xr-xtests/basic/quota-nfs.t14
2 files changed, 14 insertions, 1 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 89305178e9d..798f107372e 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -194,6 +194,7 @@ function is_bad_test ()
{
local name=$1
for bt in ./tests/basic/quota-anon-fd-nfs.t \
+ ./tests/basic/quota-nfs.t \
./tests/basic/tier/tier_lookup_heal.t \
./tests/basic/tier/bug-1214222-directories_miising_after_attach_tier.t \
./tests/bugs/snapshot/bug-1109889.t \
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index f295aaee79b..00c76a49f56 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -17,6 +17,7 @@ TEST $CLI volume create $V0 $H0:$B0/brick1;
EXPECT 'Created' volinfo_field $V0 'Status';
TEST $CLI volume set $V0 network.inode-lru-limit 1
+TEST $CLI volume set $V0 performance.nfs.write-behind off
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';
@@ -34,6 +35,17 @@ TEST $CLI volume quota $V0 soft-timeout 0
TEST $CLI volume quota $V0 hard-timeout 0
TEST $QDD $N0/$deep/newfile_1 256 20
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/file
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/newfile_1
+
+#Unmount and mount to flush the data
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
+TEST mount_nfs $H0:/$V0 $N0
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/file
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/newfile_1
+
# wait for write behind to complete.
EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "15.0MB" quotausage "/"
@@ -42,7 +54,7 @@ TEST ! $QDD $N0/$deep/newfile_2 256 400
TEST rm -f $N0/$deep/newfile_2
## Before killing daemon to avoid deadlocks
-umount_nfs $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
TEST $CLI volume stop $V0
EXPECT "1" get_aux