summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-02-16 20:10:24 +0530
committerAnand Avati <avati@redhat.com>2013-02-17 17:03:40 -0800
commit6c848529cb26e6e4a5dc9576283207ab72187974 (patch)
tree3d4ef0d80bc0a1f00b9ba22e0d0b77652c63305e /tests/volume.rc
parent4741b2682084aaac1179310bd3672fde6f312404 (diff)
libglusterfs: Fix memory leaks in fd_lk_insert_and_merge
Change-Id: I666664895fdd7c7199797796819e652557a7ac99 BUG: 834465 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/4525 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index fe4d8306bc6..9debe2b997f 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -39,11 +39,17 @@ function get_mount_process_pid {
ps aux | grep glusterfs | grep -E "volfile-id[ =]/?$vol " | awk '{print $2}' | head -1
}
+function cleanup_statedump {
+ pid=$1
+ rm -f $statedumpdir/*$pid.dump.*
+ #.vimrc friendly comment */
+}
+
function generate_statedump {
local fpath=""
pid=$1
#remove old stale statedumps
- rm -f $statedumpdir/*$pid.dump.*
+ cleanup_statedump $pid
kill -USR1 $pid
#Wait till the statedump is generated
sleep 1
@@ -56,6 +62,11 @@ function generate_mount_statedump {
generate_statedump $(get_mount_process_pid $vol)
}
+function cleanup_mount_statedump {
+ local vol=$1
+ cleanup_statedump $(get_mount_process_pid $vol)
+}
+
function _afr_child_up_status {
local vol=$1
#brick_id is (brick-num in volume info - 1)