From 094b06c520498477804ef9ff8166ec0541d98c21 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 22 Aug 2013 12:34:26 -0700 Subject: 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 Reviewed-on: http://review.gluster.org/5694 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- tests/bugs/bug-979365.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/bugs/bug-979365.t b/tests/bugs/bug-979365.t index f5d9efd54..e94dc9aa8 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 -- cgit