BIND 10 trac1828, updated. eae421b4814a766ff14199a72e489768287654db [1828] Close open handles when done using them (contd.)
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Apr 5 11:08:44 UTC 2012
The branch, trac1828 has been updated
via eae421b4814a766ff14199a72e489768287654db (commit)
from a9d5033669d79cf4b786d471112b312977642fe5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eae421b4814a766ff14199a72e489768287654db
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Apr 5 16:38:14 2012 +0530
[1828] Close open handles when done using them (contd.)
-----------------------------------------------------------------------
Summary of changes:
src/bin/msgq/tests/msgq_test.py | 4 ++++
src/bin/tests/process_rename_test.py.in | 9 ++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/msgq/tests/msgq_test.py b/src/bin/msgq/tests/msgq_test.py
index fe4f7d4..cc078f4 100644
--- a/src/bin/msgq/tests/msgq_test.py
+++ b/src/bin/msgq/tests/msgq_test.py
@@ -155,6 +155,8 @@ class SendNonblock(unittest.TestCase):
sender(msgq, write)
except socket.error:
pass
+ read.close()
+ write.close()
def test_infinite_sendmsg(self):
"""
@@ -217,6 +219,8 @@ class SendNonblock(unittest.TestCase):
finally:
os.kill(queue_pid, signal.SIGTERM)
self.terminate_check(run)
+ queue.close()
+ out.close()
def test_small_sends(self):
"""
diff --git a/src/bin/tests/process_rename_test.py.in b/src/bin/tests/process_rename_test.py.in
index f96c023..ced698e 100644
--- a/src/bin/tests/process_rename_test.py.in
+++ b/src/bin/tests/process_rename_test.py.in
@@ -25,7 +25,9 @@ class TestRename(unittest.TestCase):
def __scan(self, directory, script, fun):
# Scan one script if it contains call to the renaming function
filename = os.path.join(directory, script)
- data = ''.join(open(filename).readlines())
+ fd = open(filename)
+ data = ''.join(fd.readlines())
+ fd.close()
prettyname = 'src' + filename[filename.rfind('../') + 2:]
self.assertTrue(fun.search(data),
"Didn't find a call to isc.util.process.rename in " + prettyname)
@@ -53,8 +55,9 @@ class TestRename(unittest.TestCase):
# Find all Makefile and extract names of scripts
for (d, _, fs) in os.walk('@top_builddir@'):
if 'Makefile' in fs:
- makefile = ''.join(open(os.path.join(d,
- "Makefile")).readlines())
+ fd = open(os.path.join(d, "Makefile"))
+ makefile = ''.join(fd.readlines())
+ fd.close()
for (var, _) in lines.findall(re.sub(excluded_lines, '',
makefile)):
for (script, _) in scripts.findall(var):
More information about the bind10-changes
mailing list