From e9dbae9415c547c7b78494c231c0192d8c306ee5 Mon Sep 17 00:00:00 2001 From: Etienne Bergeron Date: Tue, 12 Jul 2016 15:33:25 +0000 Subject: [compiler-rt] Disable a test failing on windows. Summary: The unittest is not working on windows. The "regexp.h" is not available and gtest-port won't support regexp with operator '|'. The test wasn't failing on 32-bits because of this check: ``` if (SANITIZER_WORDSIZE != 64 || ASAN_AVOID_EXPENSIVE_TESTS) return; ``` ``` [ RUN ] AddressSanitizer.HugeMallocTest C:/src/llvm/llvm/utils/unittest/googletest\src/gtest-port.cc(272): error: Failed Syntax error at index 30 in simple regular expression "is located 1 bytes to the left|AddressSanitizer failed to allocate": '|' is unsupported. C:/src/llvm/llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc(308): error: Death test: Ident((char*)malloc(n_megs << 20))[-1] = 0 Result: died but not with expected error. Expected: is located 1 bytes to the left|AddressSanitizer failed to allocate ``` See gtest-port.h: ``` #elif GTEST_OS_WINDOWS // is not available on Windows. Use our own simple regex // implementation instead. # define GTEST_USES_SIMPLE_RE 1 ``` Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D22257 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275181 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/asan/tests/asan_test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/asan/tests/asan_test.cc b/lib/asan/tests/asan_test.cc index 2de9e1192..6a95c3fe1 100644 --- a/lib/asan/tests/asan_test.cc +++ b/lib/asan/tests/asan_test.cc @@ -300,6 +300,7 @@ TEST(AddressSanitizer, LargeMallocTest) { } } +#if !GTEST_USES_SIMPLE_RE TEST(AddressSanitizer, HugeMallocTest) { if (SANITIZER_WORDSIZE != 64 || ASAN_AVOID_EXPENSIVE_TESTS) return; size_t n_megs = 4100; @@ -307,6 +308,7 @@ TEST(AddressSanitizer, HugeMallocTest) { "is located 1 bytes to the left|" "AddressSanitizer failed to allocate"); } +#endif #if SANITIZER_TEST_HAS_MEMALIGN void MemalignRun(size_t align, size_t size, int idx) { -- cgit v1.2.1