diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2013-02-27 17:55:47 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-03-25 14:50:53 -0700 |
commit | 87d03fa7f48af6500cb8277db96ee7f6c690ea1c (patch) | |
tree | e258152c3b91c09b908dd14a77aba68d0e1f4a08 /tests/include.rc | |
parent | 544945a128b4de9c6b767939fb4c4c216b095d23 (diff) |
glusterd: Removed fd leaks in glusterfs_start utility function
PROBLEM:
The FILE* associated with the pidfile was leaked if
pmap_registry_search on the brickinfo' path failed.
FIX:
Eliminates the use of the FILE* that was leaked. Uses
glusterd_is_service_running utility function in place
of the earlier attempt to check for the same.
Change-Id: I94082bd5a94b8a6340f8cc11726d3264e364efe6
BUG: 916549
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4596
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/include.rc')
-rw-r--r-- | tests/include.rc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/include.rc b/tests/include.rc index 03c615e5e1a..4008ad36f0c 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -214,6 +214,12 @@ function build_tester () gcc -g -o $(dirname $cfile)/$execname $cfile } +function process_leak_count () +{ + local pid=$1; + return $(ls -lh /proc/$pid/fd | grep "(deleted)"| wc -l) +} + alias EXPECT='_EXPECT $LINENO' alias TEST='_TEST $LINENO' alias EXPECT_WITHIN='_EXPECT_WITHIN $LINENO' |