summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 23:52:28 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 23:52:28 +0000
commitab813125e93624da1cb95bfab5b55b5ccc0d9808 (patch)
tree8c223a36195f256518a5656dd4492e22dc2b86d9 /net
parentdc993e3cc843429dd2664878de3339a69f4dc7b8 (diff)
downloadchromium_src-ab813125e93624da1cb95bfab5b55b5ccc0d9808.zip
chromium_src-ab813125e93624da1cb95bfab5b55b5ccc0d9808.tar.gz
chromium_src-ab813125e93624da1cb95bfab5b55b5ccc0d9808.tar.bz2
Document how we avoid running leaky tests under Purify and Valgrind,
and copy Purify's list of leaky net tests for Valgrind's benefit. Review URL: http://codereview.chromium.org/42309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/data/purify/net_unittests.exe.gtest.txt3
-rw-r--r--net/data/valgrind/net_unittests.gtest.txt9
-rw-r--r--net/disk_cache/backend_unittest.cc8
3 files changed, 20 insertions, 0 deletions
diff --git a/net/data/purify/net_unittests.exe.gtest.txt b/net/data/purify/net_unittests.exe.gtest.txt
index 2b49d33..232020f 100644
--- a/net/data/purify/net_unittests.exe.gtest.txt
+++ b/net/data/purify/net_unittests.exe.gtest.txt
@@ -1,5 +1,8 @@
# bug 1339772
# These tests leak data intentionally, so are not appropriate for Purify tests.
+# Similar list in ../valgrind/net_unittests.gtest.txt
+# TODO(dkegel): either merge the two files or keep them in sync, see
+# http://code.google.com/p/chromium/issues/detail?id=8951
DiskCacheBackendTest.InvalidEntry
DiskCacheBackendTest.InvalidEntryRead
DiskCacheBackendTest.InvalidEntryWithLoad
diff --git a/net/data/valgrind/net_unittests.gtest.txt b/net/data/valgrind/net_unittests.gtest.txt
new file mode 100644
index 0000000..6ead9a2
--- /dev/null
+++ b/net/data/valgrind/net_unittests.gtest.txt
@@ -0,0 +1,9 @@
+# These tests leak data intentionally, so are inappropriate for Valgrind tests.
+# Similar list in ../purify/net_unittests.exe.gtest.txt
+# TODO(dkegel): either merge the two files or keep them in sync,
+# see http://code.google.com/p/chromium/issues/detail?id=8951
+DiskCacheBackendTest.InvalidEntry
+DiskCacheBackendTest.InvalidEntryRead
+DiskCacheBackendTest.InvalidEntryWithLoad
+DiskCacheBackendTest.TrimInvalidEntry
+DiskCacheBackendTest.InvalidEntryEnumeration
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 63d5a28..3de09c4 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -356,6 +356,14 @@ TEST_F(DiskCacheBackendTest, ValidEntry) {
// The same logic of the previous test (ValidEntry), but this time force the
// entry to be invalid, simulating a crash in the middle.
// We'll be leaking memory from this test.
+//
+// This and the other intentionally leaky tests below are excluded from
+// purify and valgrind runs by naming them in the files
+// net/data/purify/net_unittests.exe.gtest.txt and
+// net/data/valgrind/net_unittests.gtest.txt
+// The scripts tools/{purify,valgrind}/chrome_tests.sh
+// read those files and pass the appropriate --gtest_filter to net_unittests.
+//
TEST_F(DiskCacheBackendTest, InvalidEntry) {
// Use the implementation directly... we need to simulate a crash.
SetDirectMode();