From cd072b61841c19ec942871e3f06519d2a938814b Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 27 Sep 2016 07:51:48 +0530 Subject: tests: Fix races in open-behind.t Problems: 1) flush-behind is on by default, so just because write completes doesn't mean it will be on the disk, it could still be in write-behind's cache. This leads to failure where if you write from one mount and expect it to be there on the other mount, sometimes it won't be there. 2) Sometimes the graph switch is not completing by the time we issue read which is leading to opens not being sent on brick leading to failures. Fixes: 1) Disable flush-behind 2) Add new functions to check the new graph is there and connected to bricks before 'cat' is executed. BUG: 1379511 Change-Id: I0faed684e0dc70cfd2258ce6fdaed655ee915ae6 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/15575 Smoke: Gluster Build System Reviewed-by: Raghavendra G NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- tests/volume.rc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc index aa614c50489..f9725b2cba1 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -150,6 +150,12 @@ function afr_child_up_status_meta { grep "child_up\[$child\]" $mnt/.meta/graphs/active/$repl/private | awk '{print $3}' } +function client_connected_status_meta { + local mnt=$1 + local client=$2 + grep "connected" $mnt/.meta/graphs/active/$client/private | awk '{print $3}' +} + function afr_child_up_status { local vol=$1 #brick_id is (brick-num in volume info - 1) -- cgit