summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-01-21 18:06:25 +0530
committerAnand Avati <avati@redhat.com>2013-01-21 22:03:50 -0800
commitab6ef33d1c0afc4d265440e52f6e0cb5d2ed007d (patch)
tree2e532b65393e851c9de73f428a7902d4607aaa13
parent8d5bb5292d75794838ee37e87a97a01cfc59b932 (diff)
Tests: Added function to get pending heal count from heal-info
Change-Id: I0aed0bb79e45326e3872ae187cb9addd06342a56 BUG: 861015 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4399 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--tests/volume.rc17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index adb2fea61d8..9e6671c3b4b 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -63,20 +63,25 @@ function glustershd_up_status {
function kill_brick()
{
- vol=$1
- host=$2
- brick=$3
+ local vol=$1
+ local host=$2
+ local brick=$3
brick_hiphenated=$(echo $brick | tr '/' '-')
kill -9 `cat /var/lib/glusterd/vols/$vol/run/${host}${brick_hiphenated}.pid`
}
function check_option_help_presence {
- option=$1
+ local option=$1
$CLI volume set help | grep "^Option:" | grep -w $option
}
function afr_get_changelog_xattr {
- file=$1
- xkey=$2
+ local file=$1
+ local xkey=$2
getfattr -n $xkey -e hex $file 2>/dev/null | grep "client-" | cut -f2 -d'='
}
+
+function afr_get_pending_heal_count {
+ local vol=$1
+ gluster volume heal $vol info | grep "Number of entries" | awk '{ sum+=$4} END {print sum}'
+}