summaryrefslogtreecommitdiffstats
path: root/base/tools_sanity_unittest.cc
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 13:03:37 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 13:03:37 +0000
commit9961cf130370b95184e582a1c05f8f7ce5f4f542 (patch)
treeaca89ca56dff8f30da4680ac0749f35defacbd74 /base/tools_sanity_unittest.cc
parent2d181a07334e8168c611c1a41764b7e3db48b56a (diff)
downloadchromium_src-9961cf130370b95184e582a1c05f8f7ce5f4f542.zip
chromium_src-9961cf130370b95184e582a1c05f8f7ce5f4f542.tar.gz
chromium_src-9961cf130370b95184e582a1c05f8f7ce5f4f542.tar.bz2
Disable ToolsSanityTest.ArrayDeletedWithoutBraces and ToolsSanityTest.SingleElementDeletedWithBraces
under AddressSanitizer. Newer ASan detects an error in them, while older ones do not. We turn these tests off until the transition is finished. BUG=172614 TBR=brettw TEST=base_unittests remain green after the Clang roll. Review URL: https://codereview.chromium.org/12089018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tools_sanity_unittest.cc')
-rw-r--r--base/tools_sanity_unittest.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
index 6374160..21dc0e2 100644
--- a/base/tools_sanity_unittest.cc
+++ b/base/tools_sanity_unittest.cc
@@ -90,15 +90,24 @@ TEST(ToolsSanityTest, MemoryLeak) {
// error report mecanism is different than with Asan so those test will fail.
#define MAYBE_AccessesToNewMemory DISABLED_AccessesToNewMemory
#define MAYBE_AccessesToMallocMemory DISABLED_AccessesToMallocMemory
-#define MAYBE_ArrayDeletedWithoutBraces DISABLED_ArrayDeletedWithoutBraces
-#define MAYBE_SingleElementDeletedWithBraces \
- DISABLED_SingleElementDeletedWithBraces
#else
#define MAYBE_AccessesToNewMemory AccessesToNewMemory
#define MAYBE_AccessesToMallocMemory AccessesToMallocMemory
#define MAYBE_ArrayDeletedWithoutBraces ArrayDeletedWithoutBraces
#define MAYBE_SingleElementDeletedWithBraces SingleElementDeletedWithBraces
#endif
+
+// The following tests pass with Clang r170392, but not r172454, which
+// makes AddressSanitizer detect errors in them. We disable these tests under
+// AddressSanitizer until we fully switch to Clang r172454. After that the
+// tests should be put back under the (defined(OS_IOS) || defined(OS_WIN))
+// clause above.
+// See also http://crbug.com/172614.
+#if defined(ADDRESS_SANITIZER)
+#define MAYBE_SingleElementDeletedWithBraces \
+ DISABLED_SingleElementDeletedWithBraces
+#define MAYBE_ArrayDeletedWithoutBraces DISABLED_ArrayDeletedWithoutBraces
+#endif
TEST(ToolsSanityTest, MAYBE_AccessesToNewMemory) {
char *foo = new char[10];
MakeSomeErrors(foo, 10);