From 2b5ae915d6dcd6593b5b7554b4b5c38b3bfa441c Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 22 Jul 2016 20:24:51 +0530 Subject: tests: Remove hard coding in get_aux >Change-Id: Ie007d8006a2f2be0187f0c73d46ec6dda2a68a6b >Signed-off-by: Pranith Kumar K >Reviewed-on: http://review.gluster.org/14988 >Smoke: Gluster Build System >Tested-by: Jeff Darcy >CentOS-regression: Gluster Build System >NetBSD-regression: NetBSD Build System >Reviewed-by: Jeff Darcy >(cherry picked from commit dac9ec0c015e748c0e7909496cdc636831975e0e) BUG: 1359369 Change-Id: I56e633244a2154a3565a17fd8e4853cf9045c4f3 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/14991 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Atin Mukherjee --- tests/volume.rc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/volume.rc b/tests/volume.rc index e488aa73b1c..8f2124d8cf0 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -557,11 +557,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 -- cgit