From 933e5bd5a7b32394c7a3c6e84543dc48ed24a732 Mon Sep 17 00:00:00 2001 From: Sachin Pandit Date: Tue, 23 Sep 2014 04:53:47 +0530 Subject: test : Fix for spurious failure Problem : Once the features.uss is enabled it does not wait for the process to be created. And if we try to check for the pid of the snapd then it will not be present which causes a failure. Solution : Adding a EXPECT_WITHIN which waits to get the pid until certain time period. Change-Id: If075860173a996f9eee13b346e939686b94ec3f6 BUG: 1145450 Signed-off-by: Sachin Pandit Reviewed-on: http://review.gluster.org/8814 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Vijay Bellur --- tests/snapshot.rc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/snapshot.rc') diff --git a/tests/snapshot.rc b/tests/snapshot.rc index a1657162fd4..5186b77fe04 100755 --- a/tests/snapshot.rc +++ b/tests/snapshot.rc @@ -385,6 +385,12 @@ function snap_config() $cli_index snapshot config | grep "^$var" | sed 's/.*: //' } +function check_if_snapd_exist() { + local pid + pid=$(ps aux | grep "snapd" | grep -v grep | awk '{print $2}') + if [ -n "$pid" ]; then echo "Y"; else echo "N"; fi +} + case $OSTYPE in NetBSD) echo "Skip test on LVM which is not available on NetBSD" >&2 -- cgit