diff options
author | Ravishankar N <ravishankar@redhat.com> | 2015-05-27 08:45:52 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-27 00:52:04 -0700 |
commit | 7a001525850fc60d24be019e4fba726d3c33ee5e (patch) | |
tree | f6e189796306edc79324170dde4dae2978708f7a /tests/volume.rc | |
parent | 510ed25dc7ce52262a15accc160b8b6ae6d409d1 (diff) |
tests: arbiter.t fix
Backport of http://review.gluster.org/10833
Wait for AFR's children to be up in glustershd process before attempting heal.
Also, grep (version 2.21) is detecting statedump files as binary, causing tests
to succeed incorrectly. Hence adding the -a switch to force it to treat it as a
text file. Thanks to Vijay Bellur for identifying the issue
(http://lists.gnu.org/archive/html/bug-grep/2015-05/msg00000.html) and the
workaround.
Change-Id: Ie3d9591ffaf44baa0cd8c2baa327aed24378e3df
BUG: 1225077
BUG:
Reviewed-on: http://review.gluster.org/10833
Tested-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
(cherry picked from commit b51ee5f8d1f80d66effffc06c1e49099c04014a4)
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/10923
Tested-by: NetBSD Build System
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r-- | tests/volume.rc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/volume.rc b/tests/volume.rc index b71fea4d503..bc34b608891 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -87,7 +87,7 @@ function cleanup_mount_statedump { function snap_client_connected_status { local vol=$1 local fpath=$(generate_mount_statedump $vol) - up=$(grep -A2 xlator.protocol.client.$vol-snapd-client.priv $fpath | tail -1 | cut -f 2 -d'=') + up=$(grep -a -A2 xlator.protocol.client.$vol-snapd-client.priv $fpath | tail -1 | cut -f 2 -d'=') rm -f $fpath echo "$up" } @@ -98,7 +98,7 @@ function _afr_child_up_status { local brick_id=$2 local gen_state_dump=$3 local fpath=$($gen_state_dump $vol) - up=$(grep -B1 trusted.afr.$vol-client-$brick_id $fpath | head -1 | cut -f2 -d'=') + up=$(grep -a -B1 trusted.afr.$vol-client-$brick_id $fpath | head -1 | cut -f2 -d'=') rm -f $fpath echo "$up" } |