summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-07-22 20:24:51 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-07-25 19:05:15 -0700
commitc35dc4fb18e6d942ae773fd1e6ab1636bcdd1788 (patch)
tree29a8e61667a1f13dfe9fcfe9676bd5b55604041d
parentf55e3ac84db9f5da058a66d0a58e1c462d9d1df5 (diff)
tests: Remove hard coding in get_aux
>Change-Id: Ie007d8006a2f2be0187f0c73d46ec6dda2a68a6b >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14988 >Smoke: Gluster Build System <jenkins@build.gluster.org> >Tested-by: Jeff Darcy <jdarcy@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit dac9ec0c015e748c0e7909496cdc636831975e0e) BUG: 1359625 Change-Id: If9927c020202f0707a6d61c66522918e0e8f6d98 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14992 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--tests/volume.rc16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index 6c72dbd05b9..77e080d152a 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -561,11 +561,19 @@ function num_graphs
function get_aux()
{
##Check if a auxiliary mount is there
-df -h 2>&1 | sed 's#/build/install##' | grep -e "[[:space:]]/run/gluster/${V0}$" -e "[[:space:]]/var/run/gluster/${V0}$" -
-
-if [ $? -eq 0 ]
+local rundir=$(gluster --print-statedumpdir)
+local pidfile="${rundir}/${V0}.pid"
+if [ -f $pidfile ];
then
- echo "0"
+ local pid=$(cat ${rundir}/${V0}.pid)
+ pidof glusterfs 2>&1 | grep -w $pid > /dev/null
+
+ if [ $? -eq 0 ]
+ then
+ echo "0"
+ else
+ echo "1"
+ fi
else
echo "1"
fi