BIND 10 trac2831, updated. 4a6f54f71484ebc8531371da819d4f98f59418e9 [2831] skip other death tests on valgrind, too.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Mar 13 07:40:17 UTC 2013


The branch, trac2831 has been updated
       via  4a6f54f71484ebc8531371da819d4f98f59418e9 (commit)
      from  14023798bdf7385a96500cf8bb7d93d485def18a (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 4a6f54f71484ebc8531371da819d4f98f59418e9
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Mar 13 00:40:00 2013 -0700

    [2831] skip other death tests on valgrind, too.

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

Summary of changes:
 .../util/tests/memory_segment_mapped_unittest.cc   |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/util/tests/memory_segment_mapped_unittest.cc b/src/lib/util/tests/memory_segment_mapped_unittest.cc
index 1c87403..2592c12 100644
--- a/src/lib/util/tests/memory_segment_mapped_unittest.cc
+++ b/src/lib/util/tests/memory_segment_mapped_unittest.cc
@@ -180,8 +180,10 @@ TEST_F(MemorySegmentMappedTest, badDeallocate) {
 
     segment_->deallocate(ptr, 4); // this is okay
     // This is duplicate dealloc; should trigger assertion failure.
-    EXPECT_DEATH_IF_SUPPORTED({segment_->deallocate(ptr, 4);}, "");
-    resetSegment();             // the segment is possibly broken; reset it.
+    if (!isc::util::unittests::runningOnValgrind()) {
+        EXPECT_DEATH_IF_SUPPORTED({segment_->deallocate(ptr, 4);}, "");
+        resetSegment();   // the segment is possibly broken; reset it.
+    }
 
     // Deallocating at an invalid address; this would result in crash (the
     // behavior may not be portable enough; if so we should disable it by
@@ -274,12 +276,14 @@ TEST_F(MemorySegmentMappedTest, violateReadOnly) {
     void* ptr = segment_->allocate(sizeof(uint32_t));
     segment_->setNamedAddress("test address", ptr);
 
-    EXPECT_DEATH_IF_SUPPORTED({
-            MemorySegmentMapped segment_ro(mapped_file);
-            EXPECT_TRUE(segment_ro.getNamedAddress("test address"));
-            *static_cast<uint32_t*>(
-                segment_ro.getNamedAddress("test address")) = 0;
-        }, "");
+    if (!isc::util::unittests::runningOnValgrind()) {
+        EXPECT_DEATH_IF_SUPPORTED({
+                MemorySegmentMapped segment_ro(mapped_file);
+                EXPECT_TRUE(segment_ro.getNamedAddress("test address"));
+                *static_cast<uint32_t*>(
+                    segment_ro.getNamedAddress("test address")) = 0;
+            }, "");
+    }
 
     EXPECT_THROW(MemorySegmentMapped(mapped_file).deallocate(ptr, 4),
                  isc::InvalidOperation);



More information about the bind10-changes mailing list