From ab6ef33d1c0afc4d265440e52f6e0cb5d2ed007d Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 21 Jan 2013 18:06:25 +0530 Subject: Tests: Added function to get pending heal count from heal-info Change-Id: I0aed0bb79e45326e3872ae187cb9addd06342a56 BUG: 861015 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4399 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/volume.rc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'tests') 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}' +} -- cgit