BIND 10 trac2108_3, updated. d976012056c29d07ad3ca563b7870a0ea07ca531 [2108] Test for segment leaks due to allocation failures
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Sep 10 07:45:43 UTC 2012
The branch, trac2108_3 has been updated
via d976012056c29d07ad3ca563b7870a0ea07ca531 (commit)
from f1f2184dc4023a2cdd4157aefd3bdafdb164d586 (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 d976012056c29d07ad3ca563b7870a0ea07ca531
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Sep 10 13:15:30 2012 +0530
[2108] Test for segment leaks due to allocation failures
-----------------------------------------------------------------------
Summary of changes:
.../datasrc/memory/tests/memory_client_unittest.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
index 0290a28..8a7f19e 100644
--- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc
+++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
@@ -211,6 +211,18 @@ TEST_F(MemoryClientTest, loadFromIterator) {
EXPECT_THROW(iterator->getNextRRset(), isc::Unexpected);
}
+TEST_F(MemoryClientTest, loadMemoryAllocationFailures) {
+ // Just to check that things get cleaned up
+
+ for (int i = 1; i < 16; i++) {
+ mem_sgmt_.setThrowCount(i);
+ EXPECT_THROW(client_->load(Name("example.org"),
+ TEST_DATA_DIR "/example.org.zone"),
+ std::bad_alloc);
+ }
+ // Teardown checks for memory segment leaks
+}
+
TEST_F(MemoryClientTest, loadNSEC3Signed) {
client_->load(Name("example.org"),
TEST_DATA_DIR "/example.org-nsec3-signed.zone");
More information about the bind10-changes
mailing list