Browse Source

[master] skip EXPECT_DEATH if run-on-valgrind to avoid possible false positives

(and also following our convention) okayed on jabber.
JINMEI Tatuya 12 years ago
parent
commit
7c2793d41b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/lib/util/tests/memory_segment_mapped_unittest.cc

+ 4 - 2
src/lib/util/tests/memory_segment_mapped_unittest.cc

@@ -242,8 +242,10 @@ TEST_F(MemorySegmentMappedTest, badAllocate) {
     const int ret = chmod(mapped_file, 0444);
     ASSERT_EQ(0, ret);
 
-    EXPECT_DEATH_IF_SUPPORTED(
-        {segment_->allocate(DEFAULT_INITIAL_SIZE * 2);}, "");
+    if (!isc::util::unittests::runningOnValgrind()) {
+        EXPECT_DEATH_IF_SUPPORTED(
+            {segment_->allocate(DEFAULT_INITIAL_SIZE * 2);}, "");
+    }
 }
 
 // XXX: this test can cause too strong side effect (creating a very large