887953
From 5f8f80190c154bbb159a3cebbb7d3e12014275ed Mon Sep 17 00:00:00 2001
887953
From: Nigel Babu <nbabu@redhat.com>
887953
Date: Mon, 30 Apr 2018 11:28:06 +0530
887953
Subject: [PATCH 512/529] Test fixes for rhgs-3.4 downstream
887953
887953
This patch includes test fixes and two tests are removed
887953
because they're not supported downstream.
887953
887953
Label: DOWNSTREAM ONLY
887953
Change-Id: I99072130cea4780654980837522c76eab38e79d3
887953
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
887953
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
887953
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
887953
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
887953
Reviewed-on: https://code.engineering.redhat.com/gerrit/162177
887953
---
887953
 tests/basic/bd.t                                   | 142 ---------------------
887953
 tests/basic/ec/ec-1468261.t                        |   1 +
887953
 tests/bugs/cli/bug-1169302.t                       |   4 +-
887953
 tests/bugs/core/multiplex-limit-issue-151.t        |   2 +-
887953
 tests/bugs/distribute/bug-882278.t                 |  73 -----------
887953
 tests/bugs/glusterd/brick-mux-fd-cleanup.t         |   3 +
887953
 .../glusterd/bug-1245045-remove-brick-validation.t |  16 ++-
887953
 .../glusterd/bug-1293414-import-brickinfo-uuid.t   |   1 +
887953
 .../bug-1483058-replace-brick-quorum-validation.t  |   9 +-
887953
 tests/bugs/glusterd/bug-1595320.t                  |   2 +-
887953
 .../df-results-post-replace-brick-operations.t     |   3 +
887953
 tests/bugs/posix/bug-990028.t                      |   2 +-
887953
 tests/bugs/readdir-ahead/bug-1439640.t             |   1 +
887953
 .../replicate/bug-1591193-assign-gfid-and-heal.t   |   5 +-
887953
 .../bug-1637802-arbiter-stale-data-heal-lock.t     |   1 +
887953
 tests/bugs/shard/zero-flag.t                       |   1 +
887953
 tests/cluster.rc                                   |  10 ++
887953
 tests/include.rc                                   |   1 +
887953
 18 files changed, 48 insertions(+), 229 deletions(-)
887953
 delete mode 100755 tests/basic/bd.t
887953
 delete mode 100755 tests/bugs/distribute/bug-882278.t
887953
887953
diff --git a/tests/basic/bd.t b/tests/basic/bd.t
887953
deleted file mode 100755
887953
index 63622ed..0000000
887953
--- a/tests/basic/bd.t
887953
+++ /dev/null
887953
@@ -1,142 +0,0 @@
887953
-#!/bin/bash
887953
-
887953
-. $(dirname $0)/../include.rc
887953
-. $(dirname $0)/../volume.rc
887953
-
887953
-function execute()
887953
-{
887953
-        cmd=$1
887953
-        shift
887953
-        ${cmd} $@ >/dev/null 2>&1
887953
-}
887953
-
887953
-function bd_cleanup()
887953
-{
887953
-        execute vgremove -f ${V0}
887953
-        execute pvremove ${ld}
887953
-        execute losetup -d ${ld}
887953
-        execute rm ${BD_DISK}
887953
-        cleanup
887953
-}
887953
-
887953
-function check()
887953
-{
887953
-        if [ $? -ne 0 ]; then
887953
-                echo prerequsite $@ failed
887953
-                bd_cleanup
887953
-                exit
887953
-        fi
887953
-}
887953
-
887953
-SIZE=256 #in MB
887953
-
887953
-bd_cleanup;
887953
-
887953
-## Configure environment needed for BD backend volumes
887953
-## Create a file with configured size and
887953
-## set it as a temporary loop device to create
887953
-## physical volume & VG. These are basic things needed
887953
-## for testing BD xlator if anyone of these steps fail,
887953
-## test script exits
887953
-function configure()
887953
-{
887953
-    GLDIR=`$CLI system:: getwd`
887953
-    BD_DISK=${GLDIR}/bd_disk
887953
-
887953
-    execute truncate -s${SIZE}M ${BD_DISK}
887953
-    check ${BD_DISK} creation
887953
-
887953
-    execute losetup -f
887953
-    check losetup
887953
-    ld=`losetup -f`
887953
-
887953
-    execute losetup ${ld} ${BD_DISK}
887953
-    check losetup ${BD_DISK}
887953
-    execute pvcreate -f ${ld}
887953
-    check pvcreate ${ld}
887953
-    execute vgcreate ${V0} ${ld}
887953
-    check vgcreate ${V0}
887953
-    execute lvcreate --thin ${V0}/pool --size 128M
887953
-}
887953
-
887953
-function volinfo_field()
887953
-{
887953
-    local vol=$1;
887953
-    local field=$2;
887953
-    $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
887953
-}
887953
-
887953
-function volume_type()
887953
-{
887953
-        getfattr -n volume.type $M0/. --only-values --absolute-names -e text
887953
-}
887953
-
887953
-case $OSTYPE in
887953
-NetBSD)
887953
-        echo "Skip test on LVM which is not available on NetBSD" >&2
887953
-        SKIP_TESTS
887953
-        exit 0
887953
-        ;;
887953
-*)      
887953
-        ;;
887953
-esac 
887953
-
887953
-TEST glusterd
887953
-TEST pidof glusterd
887953
-configure
887953
-
887953
-TEST $CLI volume create $V0 ${H0}:/$B0/$V0?${V0}
887953
-EXPECT "$V0" volinfo_field $V0 'Volume Name';
887953
-EXPECT 'Created' volinfo_field $V0 'Status';
887953
-
887953
-## Start volume and verify
887953
-TEST $CLI volume start $V0;
887953
-EXPECT 'Started' volinfo_field $V0 'Status'
887953
-
887953
-TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0;
887953
-EXPECT '1' volume_type
887953
-
887953
-## Create posix file
887953
-TEST touch $M0/posix
887953
-
887953
-TEST touch $M0/lv
887953
-gfid=`getfattr -n glusterfs.gfid.string $M0/lv --only-values --absolute-names`
887953
-TEST setfattr -n user.glusterfs.bd -v "lv:4MB" $M0/lv
887953
-# Check if LV is created
887953
-TEST stat /dev/$V0/${gfid}
887953
-
887953
-## Create filesystem
887953
-sleep 1
887953
-TEST mkfs.ext4 -qF $M0/lv
887953
-# Cloning
887953
-TEST touch $M0/lv_clone
887953
-gfid=`getfattr -n glusterfs.gfid.string $M0/lv_clone --only-values --absolute-names`
887953
-TEST setfattr -n clone -v ${gfid} $M0/lv
887953
-TEST stat /dev/$V0/${gfid}
887953
-
887953
-sleep 1
887953
-## Check mounting
887953
-TEST mount -o loop $M0/lv $M1
887953
-EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
887953
-
887953
-# Snapshot
887953
-TEST touch $M0/lv_sn
887953
-gfid=`getfattr -n glusterfs.gfid.string $M0/lv_sn --only-values --absolute-names`
887953
-TEST setfattr -n snapshot -v ${gfid} $M0/lv
887953
-TEST stat /dev/$V0/${gfid}
887953
-
887953
-# Merge
887953
-sleep 1
887953
-TEST setfattr -n merge -v "$M0/lv_sn" $M0/lv_sn
887953
-TEST ! stat $M0/lv_sn
887953
-TEST ! stat /dev/$V0/${gfid}
887953
-
887953
-
887953
-rm $M0/* -f
887953
-
887953
-EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
887953
-TEST $CLI volume stop ${V0}
887953
-EXPECT 'Stopped' volinfo_field $V0 'Status';
887953
-TEST $CLI volume delete ${V0}
887953
-
887953
-bd_cleanup
887953
diff --git a/tests/basic/ec/ec-1468261.t b/tests/basic/ec/ec-1468261.t
887953
index d687d7b..b2d92fc 100644
887953
--- a/tests/basic/ec/ec-1468261.t
887953
+++ b/tests/basic/ec/ec-1468261.t
887953
@@ -14,6 +14,7 @@ TEST glusterd
887953
 TEST pidof glusterd
887953
 TEST $CLI volume create $V0 disperse 6 redundancy 2 $H0:$B0/${V0}{0..5}
887953
 TEST $CLI volume set $V0 disperse.optimistic-change-log on
887953
+TEST $CLI volume set $V0 disperse.other-eager-lock on
887953
 TEST $CLI volume start $V0
887953
 
887953
 #Mount the volume
887953
diff --git a/tests/bugs/cli/bug-1169302.t b/tests/bugs/cli/bug-1169302.t
887953
index 24355e5..05c006c 100755
887953
--- a/tests/bugs/cli/bug-1169302.t
887953
+++ b/tests/bugs/cli/bug-1169302.t
887953
@@ -40,7 +40,9 @@ cleanup_statedump
887953
 # hostname or IP-address with the connection from the bug-1169302 executable.
887953
 # In our CI it seems not possible to use $H0, 'localhost', $(hostname --fqdn)
887953
 # or even "127.0.0.1"....
887953
-TEST $CLI_3 volume statedump $V0 client $H1:$GFAPI_PID
887953
+sleep 2
887953
+host=`netstat -nap | grep $GFAPI_PID | grep 24007 |  awk '{print $4}' | cut -d: -f1`
887953
+TEST $CLI_3 volume statedump $V0 client $host:$GFAPI_PID
887953
 EXPECT_WITHIN $STATEDUMP_TIMEOUT "Y" path_exists $statedumpdir/glusterdump.$GFAPI_PID*
887953
 
887953
 kill $GFAPI_PID
887953
diff --git a/tests/bugs/core/multiplex-limit-issue-151.t b/tests/bugs/core/multiplex-limit-issue-151.t
887953
index 9511756..c5bbbda 100644
887953
--- a/tests/bugs/core/multiplex-limit-issue-151.t
887953
+++ b/tests/bugs/core/multiplex-limit-issue-151.t
887953
@@ -50,7 +50,7 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT 3 count_brick_pids
887953
 EXPECT_WITHIN $PROCESS_UP_TIMEOUT 7 count_up_bricks
887953
 
887953
 TEST $CLI volume remove-brick $V0 $H0:$B0/brick3 start
887953
-TEST $CLI volume remove-brick $V0 $H0:$B0/brick3 commit
887953
+TEST $CLI volume remove-brick $V0 $H0:$B0/brick3 force
887953
 
887953
 EXPECT_WITHIN $PROCESS_UP_TIMEOUT 3 count_brick_processes
887953
 EXPECT_WITHIN $PROCESS_UP_TIMEOUT 3 count_brick_pids
887953
diff --git a/tests/bugs/distribute/bug-882278.t b/tests/bugs/distribute/bug-882278.t
887953
deleted file mode 100755
887953
index 8cb5147..0000000
887953
--- a/tests/bugs/distribute/bug-882278.t
887953
+++ /dev/null
887953
@@ -1,73 +0,0 @@
887953
-#!/bin/bash
887953
-
887953
-. $(dirname $0)/../../include.rc
887953
-. $(dirname $0)/../../volume.rc
887953
-cleanup
887953
-
887953
-# Is there a good reason to require --fqdn elsewhere?  It's worse than useless
887953
-# here.
887953
-H0=$(hostname -s)
887953
-
887953
-function recreate {
887953
-	# The rm is necessary so we don't get fooled by leftovers from old runs.
887953
-	rm -rf $1 && mkdir -p $1
887953
-}
887953
-
887953
-function count_lines {
887953
-	grep "$1" $2/* | wc -l
887953
-}
887953
-
887953
-TEST glusterd
887953
-TEST pidof glusterd
887953
-TEST $CLI volume info;
887953
-
887953
-## Start and create a volume
887953
-TEST recreate ${B0}/${V0}-0
887953
-TEST recreate ${B0}/${V0}-1
887953
-TEST $CLI volume create $V0 $H0:$B0/${V0}-{0,1}
887953
-TEST $CLI volume set $V0 cluster.nufa on
887953
-
887953
-function volinfo_field()
887953
-{
887953
-    local vol=$1;
887953
-    local field=$2;
887953
-
887953
-    $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
887953
-}
887953
-
887953
-
887953
-## Verify volume is created
887953
-EXPECT "$V0" volinfo_field $V0 'Volume Name';
887953
-EXPECT 'Created' volinfo_field $V0 'Status';
887953
-
887953
-## Start volume and verify
887953
-TEST $CLI volume start $V0;
887953
-EXPECT 'Started' volinfo_field $V0 'Status';
887953
-
887953
-## Mount native
887953
-special_option="--xlator-option ${V0}-dht.local-volume-name=${V0}-client-1"
887953
-TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $special_option $M0
887953
-
887953
-## Create a bunch of test files.
887953
-for i in $(seq 0 99); do
887953
-	echo hello > $(printf $M0/file%02d $i)
887953
-done
887953
-
887953
-## Make sure the files went to the right place.  There might be link files in
887953
-## the other brick, but they won't have any contents.
887953
-EXPECT "0" count_lines hello ${B0}/${V0}-0
887953
-EXPECT "100" count_lines hello ${B0}/${V0}-1
887953
-
887953
-if [ "$EXIT_EARLY" = "1" ]; then
887953
-	exit 0;
887953
-fi
887953
-
887953
-## Finish up
887953
-EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
887953
-TEST $CLI volume stop $V0;
887953
-EXPECT 'Stopped' volinfo_field $V0 'Status';
887953
-
887953
-TEST $CLI volume delete $V0;
887953
-TEST ! $CLI volume info $V0;
887953
-
887953
-cleanup;
887953
diff --git a/tests/bugs/glusterd/brick-mux-fd-cleanup.t b/tests/bugs/glusterd/brick-mux-fd-cleanup.t
887953
index de11c17..2ac7f9c 100644
887953
--- a/tests/bugs/glusterd/brick-mux-fd-cleanup.t
887953
+++ b/tests/bugs/glusterd/brick-mux-fd-cleanup.t
887953
@@ -76,3 +76,6 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
887953
 EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
887953
 
887953
 cleanup
887953
+
887953
+#delay-gen in not present downstream
887953
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
887953
diff --git a/tests/bugs/glusterd/bug-1245045-remove-brick-validation.t b/tests/bugs/glusterd/bug-1245045-remove-brick-validation.t
887953
index 597c40c..a931d29 100644
887953
--- a/tests/bugs/glusterd/bug-1245045-remove-brick-validation.t
887953
+++ b/tests/bugs/glusterd/bug-1245045-remove-brick-validation.t
887953
@@ -3,12 +3,16 @@
887953
 . $(dirname $0)/../../include.rc
887953
 . $(dirname $0)/../../cluster.rc
887953
 
887953
+function peer_count {
887953
+eval \$CLI_$1 peer status | grep 'Peer in Cluster (Connected)' | wc -l
887953
+}
887953
+
887953
 cleanup
887953
 
887953
 TEST launch_cluster 3;
887953
 TEST $CLI_1 peer probe $H2;
887953
 TEST $CLI_1 peer probe $H3;
887953
-EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
887953
 
887953
 TEST $CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0
887953
 TEST $CLI_1 volume start $V0
887953
@@ -21,7 +25,9 @@ TEST ! $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} start
887953
 TEST start_glusterd 2
887953
 EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status_1 $V0 $H2 $B2/${V0}
887953
 
887953
-EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 2
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 3
887953
 
887953
 #volume status should work
887953
 TEST $CLI_2 volume status
887953
@@ -36,7 +42,7 @@ TEST ! $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} commit
887953
 TEST start_glusterd 2
887953
 EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status_1 $V0 $H2 $B2/${V0}
887953
 
887953
-EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
887953
 
887953
 #volume status should work
887953
 TEST $CLI_2 volume status
887953
@@ -44,12 +50,12 @@ TEST $CLI_2 volume status
887953
 TEST $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} stop
887953
 
887953
 kill_glusterd 3
887953
-EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count 1
887953
 
887953
 TEST $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} start
887953
 
887953
 TEST start_glusterd 3
887953
-EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
887953
 
887953
 TEST $CLI_3 volume status
887953
 
887953
diff --git a/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t b/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t
887953
index 9f67e4c..977276e 100755
887953
--- a/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t
887953
+++ b/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t
887953
@@ -24,6 +24,7 @@ EXPECT_WITHIN $PROBE_TIMEOUT 3 peer_count
887953
 TEST ! $CLI_3 peer detach $H1
887953
 TEST ! $CLI_3 peer detach $H2
887953
 
887953
+EXPECT_WITHIN $PROBE_TIMEOUT 3 peer_count
887953
 
887953
 # peer not hosting bricks should be detachable
887953
 TEST $CLI_3 peer detach $H4
887953
diff --git a/tests/bugs/glusterd/bug-1483058-replace-brick-quorum-validation.t b/tests/bugs/glusterd/bug-1483058-replace-brick-quorum-validation.t
887953
index 3dbe28a..2d9e528 100644
887953
--- a/tests/bugs/glusterd/bug-1483058-replace-brick-quorum-validation.t
887953
+++ b/tests/bugs/glusterd/bug-1483058-replace-brick-quorum-validation.t
887953
@@ -45,7 +45,14 @@ TEST start_glusterd 2
887953
 
887953
 EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
887953
 
887953
+# checking peer_count is not enough to call that quorum is regained as
887953
+# peer_count is based on peerinfo->connected where as quorum is calculated based
887953
+# on peerinfo->quorum_contrib. To avoid this spurious race of replace brick
887953
+# commit force to execute and fail before the quorum is regained run the command
887953
+# in EXPECT_WITHIN to ensure that with multiple attempts the command goes
887953
+# through once the quorum is regained.
887953
+
887953
 # Now quorum is met. replace-brick will execute successfuly
887953
-TEST  $CLI_1 volume replace-brick $V0 $H2:$B2/${V0}1 $H1:$B1/${V0}1_new commit force
887953
+EXPECT_WITHIN $PEER_SYNC_TIMEOUT 0 attempt_replace_brick 1 $V0 $H2:$B2/${V0}1 $H1:$B1/${V0}1_new
887953
 
887953
 #cleanup;
887953
diff --git a/tests/bugs/glusterd/bug-1595320.t b/tests/bugs/glusterd/bug-1595320.t
887953
index f41df9d..3a289f3 100644
887953
--- a/tests/bugs/glusterd/bug-1595320.t
887953
+++ b/tests/bugs/glusterd/bug-1595320.t
887953
@@ -25,7 +25,7 @@ TEST pidof glusterd
887953
 
887953
 # Create volume and enable brick multiplexing
887953
 TEST $CLI volume create $V0 $H0:$L1 $H0:$L2 $H0:$L3
887953
-gluster v set all cluster.brick-multiplex on
887953
+TEST $CLI v set all cluster.brick-multiplex on
887953
 
887953
 # Start the volume
887953
 TEST $CLI volume start $V0
887953
diff --git a/tests/bugs/glusterd/df-results-post-replace-brick-operations.t b/tests/bugs/glusterd/df-results-post-replace-brick-operations.t
887953
index 443911c..04f7588 100644
887953
--- a/tests/bugs/glusterd/df-results-post-replace-brick-operations.t
887953
+++ b/tests/bugs/glusterd/df-results-post-replace-brick-operations.t
887953
@@ -53,6 +53,9 @@ total_space=$(df -P $M0 | tail -1 | awk '{ print $2}')
887953
 TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}1/brick1 $H0:$B0/${V0}4/brick1 commit force
887953
 TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}2/brick1 $H0:$B0/${V0}5/brick1 commit force
887953
 
887953
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status $V0 0
887953
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status $V0 1
887953
+
887953
 # check for the size at mount point, it should be same as previous
887953
 total_space_new=$(df -P $M0 | tail -1 | awk '{ print $2}')
887953
 TEST [ $total_space -eq $total_space_new ]
887953
diff --git a/tests/bugs/posix/bug-990028.t b/tests/bugs/posix/bug-990028.t
887953
index c864214..bef36a8 100755
887953
--- a/tests/bugs/posix/bug-990028.t
887953
+++ b/tests/bugs/posix/bug-990028.t
887953
@@ -78,7 +78,7 @@ function links_across_directories()
887953
     TEST [ $LINES = 2 ]
887953
 
887953
     for i in $(seq 1  2); do
887953
-        HL=`getfattr -m "trusted.pgfid.*" -de hex $B0/brick/dir$i/file$i 2>&1 | grep "trusted.pgfid" | cut -d$'\n' -f$i | cut -d'=' -f2`
887953
+        HL=`getfattr -m "trusted.pgfid.*" -de hex $B0/brick/dir$i/file$i 2>&1 | grep "trusted.pgfid" | awk -v n=$i 'NR==n' | cut -d'=' -f2`
887953
         TEST_IN_LOOP [ $HL = "0x00000001" ]
887953
     done
887953
 
887953
diff --git a/tests/bugs/readdir-ahead/bug-1439640.t b/tests/bugs/readdir-ahead/bug-1439640.t
887953
index cc6c829..dcd5407 100755
887953
--- a/tests/bugs/readdir-ahead/bug-1439640.t
887953
+++ b/tests/bugs/readdir-ahead/bug-1439640.t
887953
@@ -8,6 +8,7 @@ cleanup;
887953
 TEST glusterd
887953
 
887953
 TEST $CLI volume create $V0 $H0:$B{0..1}/$V0
887953
+TEST $CLI volume set $V0 readdir-ahead on
887953
 TEST $CLI volume start $V0
887953
 
887953
 TEST ! $CLI volume set $V0 parallel-readdir sdf
887953
diff --git a/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t b/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t
887953
index d3b5f9a..a2abaf6 100644
887953
--- a/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t
887953
+++ b/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t
887953
@@ -108,10 +108,7 @@ TEST stat $M0/file2
887953
 
887953
 # Though file is created on all 3 bricks, lookup will fail as arbiter blames the
887953
 # other 2 bricks and ariter is not 'readable'.
887953
-# TEST ! stat $M0/file3
887953
-# But the checks for failing lookups when quorum is not met is not yet there in
887953
-# rhgs-3.4.0, so stat will succeed.
887953
-TEST  stat $M0/file3
887953
+TEST ! stat $M0/file3
887953
 
887953
 # Launch index heal to complete any pending data/metadata heals.
887953
 TEST $CLI volume heal $V0
887953
diff --git a/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t b/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t
887953
index 91ed39b..d7d1f28 100644
887953
--- a/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t
887953
+++ b/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t
887953
@@ -32,6 +32,7 @@ EXPECT 2 get_pending_heal_count $V0
887953
 # Bring it back up and let heal complete.
887953
 TEST $CLI volume start $V0 force
887953
 EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}2
887953
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status
887953
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
887953
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
887953
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 2
887953
diff --git a/tests/bugs/shard/zero-flag.t b/tests/bugs/shard/zero-flag.t
887953
index 84cb963..1f39787 100644
887953
--- a/tests/bugs/shard/zero-flag.t
887953
+++ b/tests/bugs/shard/zero-flag.t
887953
@@ -14,6 +14,7 @@ TEST glusterd
887953
 TEST pidof glusterd
887953
 TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1,2,3}
887953
 TEST $CLI volume set $V0 features.shard on
887953
+TEST $CLI volume set $V0 features.shard-block-size 4MB
887953
 TEST $CLI volume start $V0
887953
 
887953
 TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0
887953
diff --git a/tests/cluster.rc b/tests/cluster.rc
887953
index c1ff8ab..e258b58 100644
887953
--- a/tests/cluster.rc
887953
+++ b/tests/cluster.rc
887953
@@ -142,6 +142,16 @@ function peer_count() {
887953
     $CLI_1 peer status | grep 'Peer in Cluster (Connected)' | wc -l
887953
 }
887953
 
887953
+function attempt_replace_brick {
887953
+    local cli_no=$1
887953
+    local vol=$2;
887953
+    local src_brick=$3;
887953
+    local dst_brick=$4;
887953
+
887953
+    eval \$CLI_$cli_no volume replace-brick $vol $src_brick $dst_brick commit force;
887953
+    echo $?
887953
+}
887953
+
887953
 function cluster_rebalance_status_field {
887953
         #The rebalance status can be up to 3 words, (e.g.:'fix-layout in progress'), hence the awk-print $7 thru $9.
887953
         #But if the status is less than 3 words, it also prints the next field i.e the run_time_in_secs.(e.g.:'completed 3.00').
887953
diff --git a/tests/include.rc b/tests/include.rc
887953
index aca4c4a..81146f4 100644
887953
--- a/tests/include.rc
887953
+++ b/tests/include.rc
887953
@@ -74,6 +74,7 @@ PROCESS_UP_TIMEOUT=30
887953
 NFS_EXPORT_TIMEOUT=20
887953
 CHILD_UP_TIMEOUT=20
887953
 PROBE_TIMEOUT=60
887953
+PEER_SYNC_TIMEOUT=20
887953
 REBALANCE_TIMEOUT=360
887953
 REOPEN_TIMEOUT=20
887953
 HEAL_TIMEOUT=80
887953
-- 
887953
1.8.3.1
887953