summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-979365.t
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-08-22 12:34:26 -0700
committerAnand Avati <avati@redhat.com>2013-08-22 23:18:35 -0700
commit094b06c520498477804ef9ff8166ec0541d98c21 (patch)
treeddcd89970ee31f7df56257387ee93670b41e490c /tests/bugs/bug-979365.t
parent19fa9b4d6ee47e0f204b04abf9bc3adabbd9f0d4 (diff)
bug-979365.t: fix wrong expectation of encountering fsync
After the append-write detection patch, FSYNCs may or may not be issued depeneding on the order in which writes reach the server (in the presence of write-behind). Fix the test case to understand this non-deterministic behavior. Change-Id: I1dc3453a6dd4a12a66551948eb8311d789ac2ecf BUG: 927146 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5694 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'tests/bugs/bug-979365.t')
-rwxr-xr-xtests/bugs/bug-979365.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/bugs/bug-979365.t b/tests/bugs/bug-979365.t
index f5d9efd5487..e94dc9aa8a2 100755
--- a/tests/bugs/bug-979365.t
+++ b/tests/bugs/bug-979365.t
@@ -23,7 +23,12 @@ TEST kill_brick $V0 $H0 $B0/${V0}0
TEST dd of=$M0/a if=/dev/zero bs=1M count=10
#fsyncs take a while to complete.
sleep 5
-TEST [[ $(num_fsyncs) -ne 0 ]]
+
+# There can be zero or more fsyncs, depending on the order
+# in which the writes reached the server, in turn deciding
+# whether they were treated as "appending" writes or not.
+
+TEST [[ $(num_fsyncs) -ge 0 ]]
#Stop the volume to erase the profile info of old operations
TEST $CLI volume profile $V0 stop
TEST $CLI volume stop $V0