BIND 10 master, updated. 2500db669d6463c3ee2f607be63ac0690cf7205e [master] avoid compile mapped-segment dependent code if !USE_SHARED_MEMORY

BIND 10 source code commits bind10-changes at lists.isc.org
Mon May 20 23:25:26 UTC 2013


The branch, master has been updated
       via  2500db669d6463c3ee2f607be63ac0690cf7205e (commit)
      from  45d2c5e07fc8eb3b4a9493470118fe5765164365 (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 2500db669d6463c3ee2f607be63ac0690cf7205e
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Mon May 20 23:24:14 2013 +0000

    [master] avoid compile mapped-segment dependent code if !USE_SHARED_MEMORY
    
    okayed on jabber.

-----------------------------------------------------------------------

Summary of changes:
 .../tests/memory/zone_data_loader_unittest.cc      |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/memory/zone_data_loader_unittest.cc b/src/lib/datasrc/tests/memory/zone_data_loader_unittest.cc
index bfd79a5..ad20d43 100644
--- a/src/lib/datasrc/tests/memory/zone_data_loader_unittest.cc
+++ b/src/lib/datasrc/tests/memory/zone_data_loader_unittest.cc
@@ -24,7 +24,9 @@
 #include <dns/name.h>
 #include <dns/rrclass.h>
 #include <dns/rdataclass.h>
+#ifdef USE_SHARED_MEMORY
 #include <util/memory_segment_mapped.h>
+#endif
 #include <util/memory_segment_local.h>
 
 #include <datasrc/tests/memory/memory_segment_mock.h>
@@ -33,13 +35,13 @@
 
 using namespace isc::dns;
 using namespace isc::datasrc::memory;
+#ifdef USE_SHARED_MEMORY
 using isc::util::MemorySegmentMapped;
+#endif
 using isc::datasrc::memory::detail::SegmentObjectHolder;
 
 namespace {
 
-const char* const mapped_file = TEST_DATA_BUILDDIR "/test.mapped";
-
 class ZoneDataLoaderTest : public ::testing::Test {
 protected:
     ZoneDataLoaderTest() : zclass_(RRClass::IN()), zone_data_(NULL) {}
@@ -84,7 +86,10 @@ TEST_F(ZoneDataLoaderTest, zoneMinTTL) {
 
 // Load bunch of small zones, hoping some of the relocation will happen
 // during the memory creation, not only Rdata creation.
+// Note: this doesn't even compile unless USE_SHARED_MEMORY is defined.
+#ifdef USE_SHARED_MEMORY
 TEST(ZoneDataLoaterTest, relocate) {
+    const char* const mapped_file = TEST_DATA_BUILDDIR "/test.mapped";
     MemorySegmentMapped segment(mapped_file,
                                 isc::util::MemorySegmentMapped::CREATE_ONLY,
                                 4096);
@@ -108,5 +113,6 @@ TEST(ZoneDataLoaterTest, relocate) {
     EXPECT_TRUE(segment.allMemoryDeallocated());
     EXPECT_EQ(0, unlink(mapped_file));
 }
+#endif
 
 }



More information about the bind10-changes mailing list