summaryrefslogtreecommitdiffstats
path: root/tests/bugs/snapshot
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-07-20 15:04:01 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-07-20 08:21:49 -0700
commitbe69510e670cb5ee893399ca1d7e7d2a60a9483c (patch)
tree2baa6ed87ebe01417b269e4fdc54072bda36a6d6 /tests/bugs/snapshot
parentd724a87e682cf14a3f2a85888cad5c5db203fb5b (diff)
tests: Fix spurious failure of tests/bugs/glusterd/bug-1111041.t
On a faster machine the ps check was returning two pids, including the glusterfsd process's pid, right after that, process forked. Hence removing that ps, as for the scope of this test, verifying the snapd pid from the status command itself is enough. Change-Id: I8bd8fc4ea406d96e3a47f952cfe44560b615dbe6 BUG: 1358195 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14963 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/bugs/snapshot')
-rw-r--r--tests/bugs/snapshot/bug-1111041.t32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/bugs/snapshot/bug-1111041.t b/tests/bugs/snapshot/bug-1111041.t
new file mode 100644
index 00000000000..9188880912c
--- /dev/null
+++ b/tests/bugs/snapshot/bug-1111041.t
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+. $(dirname $0)/../../fileio.rc
+. $(dirname $0)/../../nfs.rc
+
+cleanup;
+
+function is_snapd_running {
+ $CLI volume status $1 | grep "Snapshot Daemon" | wc -l;
+}
+
+TEST glusterd;
+
+TEST pidof glusterd;
+
+TEST $CLI volume create $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1
+
+TEST $CLI volume start $V0;
+
+EXPECT "0" is_snapd_running $v0
+
+TEST $CLI volume set $V0 features.uss enable;
+
+EXPECT "1" is_snapd_running $V0
+
+SNAPD_PID=$($CLI volume status $V0 | grep "Snapshot Daemon" | awk {'print $8'});
+
+TEST [ $SNAPD_PID -gt 0 ]
+
+cleanup ;