summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2019-04-08 19:18:51 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-04-12 03:54:15 +0000
commita1ce2910522335c2fffaebd941c4aaf861ef04fa (patch)
tree75e19786a971184cb4773e4167be86a4fdefbc45
parentd08144b64642bf05fdee538b2992278a012737d4 (diff)
test: Change glustershd_pid update in .t file
Problem: bug-1650403.t && bug-858215.t are throwing error at the time of access glustershd pidfile Solution: Use ps command to findout glustershd pid Change-Id: I3477345b6220aa039e012e674cba21d741e9abab fixes: bz#1697486 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
-rw-r--r--tests/bugs/core/bug-1650403.t3
-rwxr-xr-xtests/bugs/fuse/bug-858215.t4
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/bugs/core/bug-1650403.t b/tests/bugs/core/bug-1650403.t
index dadf9ddcc4c..43d09bc8bd9 100644
--- a/tests/bugs/core/bug-1650403.t
+++ b/tests/bugs/core/bug-1650403.t
@@ -88,7 +88,8 @@ for i in $(seq 1 $NUM_VOLS); do
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $mnt_point
done
-glustershd_pid=$(cat $GLUSTERD_PIDFILEDIR/glustershd/glustershd.pid || echo -1);
+glustershd_pid=`ps auxwww | grep glustershd | grep -v grep | awk -F " " '{print $2}'`
+TEST [ $glustershd_pid != 0 ]
start=`pmap -x $glustershd_pid | grep total | awk -F " " '{print $4}'`
echo "Memory consumption for glustershd process"
for i in $(seq 1 50); do
diff --git a/tests/bugs/fuse/bug-858215.t b/tests/bugs/fuse/bug-858215.t
index d2719a6e1d4..95999f6ad24 100755
--- a/tests/bugs/fuse/bug-858215.t
+++ b/tests/bugs/fuse/bug-858215.t
@@ -41,8 +41,8 @@ TEST stat $M0/newfile;
TEST rm $M0/newfile;
nfs_pid=$(cat $GLUSTERD_PIDFILEDIR/nfs/nfs.pid || echo -1);
-glustershd_pid=$(cat $GLUSTERD_PIDFILEDIR/glustershd/glustershd.pid || echo -1);
-
+glustershd_pid=`ps auxwww | grep glustershd | grep -v grep | awk -F " " '{print $2}'`
+TEST [ $glustershd_pid != 0 ];
pids=$(pidof glusterfs);
for i in $pids
do