summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-02-16 20:10:24 +0530
committerVijay Bellur <vbellur@redhat.com>2013-03-03 06:19:26 -0800
commite776deed24645cc52b0fab46d566c91b4163adc1 (patch)
treedc7b4067639daa93faba74ea8bb2bd0dde0d692f /tests/volume.rc
parent9a847dac1e73a4994e50273c056e276719b863c9 (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/4529 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@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)