From ab813125e93624da1cb95bfab5b55b5ccc0d9808 Mon Sep 17 00:00:00 2001 From: "dkegel@google.com" Date: Wed, 18 Mar 2009 23:52:28 +0000 Subject: 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 --- net/data/purify/net_unittests.exe.gtest.txt | 3 +++ net/data/valgrind/net_unittests.gtest.txt | 9 +++++++++ net/disk_cache/backend_unittest.cc | 8 ++++++++ 3 files changed, 20 insertions(+) create mode 100644 net/data/valgrind/net_unittests.gtest.txt (limited to 'net') 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(); -- cgit v1.1