summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-08-05 15:10:15 +0000
committerNico Weber <nicolasweber@gmx.de>2019-08-05 15:10:15 +0000
commitf3750a4420d7baa3e97342c4055a6e1c1bd7aa28 (patch)
tree684dc8658c6e1b57f5dd474377d34275ab33a7ee
parent997d626de6e33fd8632356973952e196b0b155cf (diff)
downloadbcm5719-llvm-f3750a4420d7baa3e97342c4055a6e1c1bd7aa28.tar.gz
bcm5719-llvm-f3750a4420d7baa3e97342c4055a6e1c1bd7aa28.zip
Try to fix OOB tests more on Windows after r367642
See PR42868 for more details. The affected list of tests is: Failing Tests (8): AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.LargeOOBRightTest AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOBRightTest AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOB_char AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOB_int AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.LargeOOBRightTest AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOBRightTest AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOB_char AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOB_int llvm-svn: 367874
-rw-r--r--compiler-rt/lib/asan/tests/asan_oob_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/tests/asan_oob_test.cpp b/compiler-rt/lib/asan/tests/asan_oob_test.cpp
index 421bd041ea2..6b178b5917d 100644
--- a/compiler-rt/lib/asan/tests/asan_oob_test.cpp
+++ b/compiler-rt/lib/asan/tests/asan_oob_test.cpp
@@ -36,8 +36,15 @@ static std::string GetLeftOOBMessage(int off) {
static std::string GetRightOOBMessage(int off) {
char str[100];
+#if !defined(_WIN32)
// FIXME: Fix PR42868 and remove SEGV match.
sprintf(str, "is located.*%d byte.*to the right|SEGV", off);
+#else
+ // `|` doesn't work in googletest's regexes on Windows,
+ // see googletest/docs/advanced.md#regular-expression-syntax
+ // But it's not needed on Windows anyways.
+ sprintf(str, "is located.*%d byte.*to the right", off);
+#endif
return str;
}
OpenPOWER on IntegriCloud