From 2c65cdfd6484dc073241c46de041da2ab380bc09 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 22 Jan 2013 14:46:48 +0530 Subject: Tests: Add utils to get index-path, index-count Change-Id: I6eebae4b419f92212a30ce5e0dfc889a4541a4ce BUG: 861015 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4408 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- tests/volume.rc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/volume.rc b/tests/volume.rc index 2cae421ae5b..9ecb24d405c 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -114,3 +114,13 @@ function afr_get_pending_heal_count { local vol=$1 gluster volume heal $vol info | grep "Number of entries" | awk '{ sum+=$4} END {print sum}' } + +function afr_get_index_path { + local brick_path=$1 + echo "$brick_path/.glusterfs/indices/xattrop" +} + +function afr_get_num_indices_in_brick { + local brick_path=$1 + echo $(ls $(afr_get_index_path $brick_path) | grep -v xattrop | wc -l) +} -- cgit