From ec6925a379c7bee071df1638bc2751b266cee346 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Fri, 22 Jul 2016 11:40:32 +0530 Subject: snapshot/snapd: Don't display pid when snapd is offline We were previously reading the pidfile, and displaying the pid even if snapd daemon is not running. Now to fix it, we re-assign pid value to -1, if snapd is offline. Change-Id: I4baff8d489fe9380061c52aea006db90fa421cd7 BUG: 1358244 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/14981 Tested-by: Vijay Bellur NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- tests/bugs/snapshot/bug-1111041.t | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 tests/bugs/snapshot/bug-1111041.t (limited to 'tests/bugs/snapshot') diff --git a/tests/bugs/snapshot/bug-1111041.t b/tests/bugs/snapshot/bug-1111041.t old mode 100644 new mode 100755 index 9188880912c..f771d64f2a3 --- a/tests/bugs/snapshot/bug-1111041.t +++ b/tests/bugs/snapshot/bug-1111041.t @@ -29,4 +29,10 @@ SNAPD_PID=$($CLI volume status $V0 | grep "Snapshot Daemon" | awk {'print $8'}); TEST [ $SNAPD_PID -gt 0 ] +kill -9 $SNAPD_PID + +SNAPD_PID=$($CLI volume status $V0 | grep "Snapshot Daemon" | awk {'print $8'}); + +TEST [ $SNAPD_PID = 'N/A' ] + cleanup ; -- cgit