summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2017-02-02 11:41:06 -0500
committerShyamsundar Ranganathan <srangana@redhat.com>2017-02-03 08:46:48 -0500
commit0692e1c8f40333cc85637a85663b353f20f663b9 (patch)
tree5e0e71f9c9b0e43ba177da74f39bc15d41508103 /tests
parent3d4192cb6c35e4ebd0d3e027c5c90599e700bc8a (diff)
tests: use kill_brick instead of kill -9
The system actually handles this OK, but with multiplexing the result of killing the whole process is not what some tests assumed. Backport of: > Change-Id: I89ebf0039ab1369f25b0bfec3710ec4c13725915 > BUG: 1385758 > Reviewed-on: https://review.gluster.org/16528 BUG: 1418091 Change-Id: I39943e27b4b1a5e56142f48dc9ef2cdebe0a9d5b Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: https://review.gluster.org/16534 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/distribute/bug-860663.t2
-rw-r--r--tests/bugs/distribute/bug-862967.t3
-rw-r--r--tests/bugs/glusterfs/bug-856455.t3
-rw-r--r--tests/bugs/glusterfs/bug-867253.t4
-rwxr-xr-xtests/bugs/glusterfs/bug-893378.t4
-rwxr-xr-xtests/bugs/glusterfs/bug-902610.t5
-rw-r--r--tests/bugs/unclassified/bug-874498.t2
7 files changed, 14 insertions, 9 deletions
diff --git a/tests/bugs/distribute/bug-860663.t b/tests/bugs/distribute/bug-860663.t
index 43511945cb9..59b8223ef3f 100644
--- a/tests/bugs/distribute/bug-860663.t
+++ b/tests/bugs/distribute/bug-860663.t
@@ -35,7 +35,7 @@ ORIG_FILE_COUNT=`ls -l $M0 | wc -l`;
TEST [ $ORIG_FILE_COUNT -ge 1000 ]
# Kill a brick process
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`;
+kill_brick $V0 $H0 $B0/${V0}1
TEST $CLI volume rebalance $V0 fix-layout start
diff --git a/tests/bugs/distribute/bug-862967.t b/tests/bugs/distribute/bug-862967.t
index 07b053787ba..09dac376d94 100644
--- a/tests/bugs/distribute/bug-862967.t
+++ b/tests/bugs/distribute/bug-862967.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
cleanup;
@@ -36,7 +37,7 @@ chown 1:1 $M0/dir;
# Kill a brick process
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`;
+kill_brick $V0 $H0 $B0/${V0}1
# change dir ownership
NEW_UID=36;
NEW_GID=36;
diff --git a/tests/bugs/glusterfs/bug-856455.t b/tests/bugs/glusterfs/bug-856455.t
index 25a30bfda48..d02b39bda8e 100644
--- a/tests/bugs/glusterfs/bug-856455.t
+++ b/tests/bugs/glusterfs/bug-856455.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
cleanup;
@@ -35,7 +36,7 @@ EXPECT $BRICK_COUNT query_pathinfo $M0/f00d;
# Kill a brick process and then query for pathinfo
# for directories pathinfo should list backend patch from available (up) subvolumes
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`;
+kill_brick $V0 $H0 ${B0}/${V0}1
EXPECT `expr $BRICK_COUNT - 1` query_pathinfo $M0/f00d;
diff --git a/tests/bugs/glusterfs/bug-867253.t b/tests/bugs/glusterfs/bug-867253.t
index acbbdf8c1e7..c2c6c2ab629 100644
--- a/tests/bugs/glusterfs/bug-867253.t
+++ b/tests/bugs/glusterfs/bug-867253.t
@@ -36,7 +36,7 @@ TEST mount_nfs $H0:/$V0 $M0 nolock,noac;
touch $M0/files{1..1000};
# Kill a brick process
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}0.pid`;
+kill_brick $V0 $H0 $B0/${V0}0
drop_cache $M0
@@ -47,7 +47,7 @@ NEW_FILE_COUNT=`echo $?`;
TEST $CLI volume start $V0 force
# Kill a brick process
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`;
+kill_brick $V0 $H0 $B0/${V0}1
drop_cache $M0
diff --git a/tests/bugs/glusterfs/bug-893378.t b/tests/bugs/glusterfs/bug-893378.t
index 72a23f99e26..444dafb44bc 100755
--- a/tests/bugs/glusterfs/bug-893378.t
+++ b/tests/bugs/glusterfs/bug-893378.t
@@ -1,6 +1,8 @@
#!/bin/bash
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
cleanup;
BRICK_COUNT=3
@@ -59,7 +61,7 @@ then
get_cached_brick
CACHED=$?
# Kill a brick process
- kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}$CACHED.pid`;
+ kill_brick $V0 $H0 $B0/${V0}$CACHED
fi
## trigger a lookup
diff --git a/tests/bugs/glusterfs/bug-902610.t b/tests/bugs/glusterfs/bug-902610.t
index 656bf50137e..b45e92b8a3b 100755
--- a/tests/bugs/glusterfs/bug-902610.t
+++ b/tests/bugs/glusterfs/bug-902610.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
cleanup;
@@ -54,8 +55,8 @@ TEST glusterfs -s $H0 --volfile-id $V0 $M0 --entry-timeout=0 --attribute-timeout
TEST ls -l $M0
## kill 2 bricks to bring down available subvol < spread count
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}2.pid`;
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}3.pid`;
+kill_brick $V0 $H0 $B0/${V0}2
+kill_brick $V0 $H0 $B0/${V0}3
mkdir $M0/dir1 2>/dev/null
diff --git a/tests/bugs/unclassified/bug-874498.t b/tests/bugs/unclassified/bug-874498.t
index f362fd601eb..a2a9f376bbe 100644
--- a/tests/bugs/unclassified/bug-874498.t
+++ b/tests/bugs/unclassified/bug-874498.t
@@ -14,7 +14,7 @@ TEST $CLI volume start $V0;
TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0;
B0_hiphenated=`echo $B0 | tr '/' '-'`
-kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0$B0_hiphenated-brick1.pid` ;
+kill_brick $V0 $H0 $B0/brick1
echo "GLUSTER FILE SYSTEM" > $M0/FILE1
echo "GLUSTER FILE SYSTEM" > $M0/FILE2