From 7f29181323428e6ec073eb46ec6fd4d31ff23fb9 Mon Sep 17 00:00:00 2001 From: Timur Iskhodzhanov Date: Wed, 28 May 2014 13:06:14 +0000 Subject: [PATCH] [ASan tests] Exclude some tests from Windows runs Some features are not supported yet and some are not planned to be fixed soon llvm-svn: 209733 --- compiler-rt/test/asan/TestCases/default_options.cc | 3 +++ compiler-rt/test/asan/TestCases/free_hook_realloc.cc | 4 ++++ compiler-rt/test/asan/TestCases/log-path_test.cc | 2 ++ compiler-rt/test/asan/TestCases/malloc_context_size.cc | 4 ++++ compiler-rt/test/asan/TestCases/malloc_hook.cc | 4 ++++ compiler-rt/test/asan/TestCases/on_error_callback.cc | 3 +++ compiler-rt/test/asan/TestCases/printf-1.c | 4 ++++ compiler-rt/test/asan/TestCases/printf-2.c | 3 +++ compiler-rt/test/asan/TestCases/printf-3.c | 3 +++ compiler-rt/test/asan/TestCases/printf-4.c | 3 +++ compiler-rt/test/asan/TestCases/printf-5.c | 3 +++ compiler-rt/test/asan/TestCases/strdup_oob_test.cc | 5 +++-- compiler-rt/test/asan/TestCases/throw_call_test.cc | 3 +++ compiler-rt/test/asan/TestCases/throw_catch.cc | 3 +++ compiler-rt/test/asan/TestCases/throw_invoke_test.cc | 4 ++++ compiler-rt/test/asan/TestCases/time_interceptor.cc | 3 +++ compiler-rt/test/asan/TestCases/uar_and_exceptions.cc | 3 +++ 17 files changed, 55 insertions(+), 2 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/default_options.cc b/compiler-rt/test/asan/TestCases/default_options.cc index c77dd49..6453f66 100644 --- a/compiler-rt/test/asan/TestCases/default_options.cc +++ b/compiler-rt/test/asan/TestCases/default_options.cc @@ -1,6 +1,9 @@ // RUN: %clangxx_asan -O2 %s -o %t // RUN: %run %t 2>&1 | FileCheck %s +// __asan_default_options() are not supported on Windows. +// XFAIL: win32 + const char *kAsanDefaultOptions="verbosity=1 foo=bar"; extern "C" diff --git a/compiler-rt/test/asan/TestCases/free_hook_realloc.cc b/compiler-rt/test/asan/TestCases/free_hook_realloc.cc index 2040cad..14cdae5 100644 --- a/compiler-rt/test/asan/TestCases/free_hook_realloc.cc +++ b/compiler-rt/test/asan/TestCases/free_hook_realloc.cc @@ -1,6 +1,10 @@ // Check that free hook doesn't conflict with Realloc. // RUN: %clangxx_asan -O2 %s -o %t // RUN: %run %t 2>&1 | FileCheck %s + +// Malloc/free hooks are not supported on Windows. +// XFAIL: win32 + #include #include diff --git a/compiler-rt/test/asan/TestCases/log-path_test.cc b/compiler-rt/test/asan/TestCases/log-path_test.cc index cac0c5f..f68c94c 100644 --- a/compiler-rt/test/asan/TestCases/log-path_test.cc +++ b/compiler-rt/test/asan/TestCases/log-path_test.cc @@ -23,6 +23,8 @@ // RUN: env ASAN_OPTIONS=log_path=%t.log %run %t ARG ARG ARG // RUN: not cat %t.log.* +// FIXME: log_path is not supported on Windows yet. +// XFAIL: win32 #include #include diff --git a/compiler-rt/test/asan/TestCases/malloc_context_size.cc b/compiler-rt/test/asan/TestCases/malloc_context_size.cc index 9f7ba40..fb158c6 100644 --- a/compiler-rt/test/asan/TestCases/malloc_context_size.cc +++ b/compiler-rt/test/asan/TestCases/malloc_context_size.cc @@ -16,12 +16,16 @@ int main() { // CHECK-Linux-NEXT: #0 0x{{.*}} in operator delete[] // CHECK-Darwin: freed by thread T{{.*}} here: // CHECK-Darwin-NEXT: #0 0x{{.*}} in wrap__ZdaPv + // CHECK-Windows: freed by thread T{{.*}} here: + // CHECK-Windows-NEXT: #0 0x{{.*}} in operator delete[] // CHECK-NOT: #1 0x{{.*}} // CHECK-Linux: previously allocated by thread T{{.*}} here: // CHECK-Linux-NEXT: #0 0x{{.*}} in operator new[] // CHECK-Darwin: previously allocated by thread T{{.*}} here: // CHECK-Darwin-NEXT: #0 0x{{.*}} in wrap__Znam + // CHECK-Windows: previously allocated by thread T{{.*}} here: + // CHECK-Windows-NEXT: #0 0x{{.*}} in operator new[] // CHECK-NOT: #1 0x{{.*}} // CHECK: SUMMARY: AddressSanitizer: heap-use-after-free diff --git a/compiler-rt/test/asan/TestCases/malloc_hook.cc b/compiler-rt/test/asan/TestCases/malloc_hook.cc index c535ef8..41ba645 100644 --- a/compiler-rt/test/asan/TestCases/malloc_hook.cc +++ b/compiler-rt/test/asan/TestCases/malloc_hook.cc @@ -1,5 +1,9 @@ // RUN: %clangxx_asan -O2 %s -o %t // RUN: %run %t 2>&1 | FileCheck %s + +// Malloc/free hooks are not supported on Windows. +// XFAIL: win32 + #include #include diff --git a/compiler-rt/test/asan/TestCases/on_error_callback.cc b/compiler-rt/test/asan/TestCases/on_error_callback.cc index 0ad83d5..c378c8b 100644 --- a/compiler-rt/test/asan/TestCases/on_error_callback.cc +++ b/compiler-rt/test/asan/TestCases/on_error_callback.cc @@ -1,5 +1,8 @@ // RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// FIXME: __asan_on_error() is not supported on Windows yet. +// XFAIL: win32 + #include #include diff --git a/compiler-rt/test/asan/TestCases/printf-1.c b/compiler-rt/test/asan/TestCases/printf-1.c index dee00a5..5657083 100644 --- a/compiler-rt/test/asan/TestCases/printf-1.c +++ b/compiler-rt/test/asan/TestCases/printf-1.c @@ -4,6 +4,10 @@ // RUN: %run %t 2>&1 | FileCheck %s #include +#if defined(_WIN32) +# define snprintf _snprintf +#endif + int main() { volatile char c = '0'; volatile int x = 12; diff --git a/compiler-rt/test/asan/TestCases/printf-2.c b/compiler-rt/test/asan/TestCases/printf-2.c index f12c0b7..e9cb47e 100644 --- a/compiler-rt/test/asan/TestCases/printf-2.c +++ b/compiler-rt/test/asan/TestCases/printf-2.c @@ -5,6 +5,9 @@ // RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s // RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// FIXME: printf is not intercepted on Windows yet. +// XFAIL: win32 + #include #include #include diff --git a/compiler-rt/test/asan/TestCases/printf-3.c b/compiler-rt/test/asan/TestCases/printf-3.c index 387f6d5..d16833d 100644 --- a/compiler-rt/test/asan/TestCases/printf-3.c +++ b/compiler-rt/test/asan/TestCases/printf-3.c @@ -3,6 +3,9 @@ // RUN: env ASAN_OPTIONS=check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// FIXME: printf is not intercepted on Windows yet. +// XFAIL: win32 + #include int main() { volatile char c = '0'; diff --git a/compiler-rt/test/asan/TestCases/printf-4.c b/compiler-rt/test/asan/TestCases/printf-4.c index b219d6f..e269211 100644 --- a/compiler-rt/test/asan/TestCases/printf-4.c +++ b/compiler-rt/test/asan/TestCases/printf-4.c @@ -4,6 +4,9 @@ // RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// FIXME: printf is not intercepted on Windows yet. +// XFAIL: win32 + #include int main() { volatile char c = '0'; diff --git a/compiler-rt/test/asan/TestCases/printf-5.c b/compiler-rt/test/asan/TestCases/printf-5.c index 5bb43cb..ac2c1c4 100644 --- a/compiler-rt/test/asan/TestCases/printf-5.c +++ b/compiler-rt/test/asan/TestCases/printf-5.c @@ -4,6 +4,9 @@ // RUN: env ASAN_OPTIONS=replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s // RUN: env ASAN_OPTIONS=replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// FIXME: printf is not intercepted on Windows yet. +// XFAIL: win32 + #include #include int main() { diff --git a/compiler-rt/test/asan/TestCases/strdup_oob_test.cc b/compiler-rt/test/asan/TestCases/strdup_oob_test.cc index 7716ee5..a039568 100644 --- a/compiler-rt/test/asan/TestCases/strdup_oob_test.cc +++ b/compiler-rt/test/asan/TestCases/strdup_oob_test.cc @@ -12,8 +12,9 @@ int main(int argc, char **argv) { int x = copy[4 + argc]; // BOOM // CHECK: AddressSanitizer: heap-buffer-overflow // CHECK: #0 {{.*}}main {{.*}}strdup_oob_test.cc:[[@LINE-2]] - // CHECK: allocated by thread T{{.*}} here: - // CHECK: #0 {{.*}}strdup + // CHECK-LABEL: allocated by thread T{{.*}} here: + // CHECK: #{{[01]}} {{.*}}strdup + // CHECK-LABEL: SUMMARY // CHECK: strdup_oob_test.cc:[[@LINE-6]] return x; } diff --git a/compiler-rt/test/asan/TestCases/throw_call_test.cc b/compiler-rt/test/asan/TestCases/throw_call_test.cc index dff112f..20e9a5e 100644 --- a/compiler-rt/test/asan/TestCases/throw_call_test.cc +++ b/compiler-rt/test/asan/TestCases/throw_call_test.cc @@ -5,6 +5,9 @@ // Android builds with static libstdc++ by default. // XFAIL: android +// Clang doesn't support exceptions on Windows yet. +// XFAIL: win32 + #include static volatile int zero = 0; inline void pretend_to_do_something(void *x) { diff --git a/compiler-rt/test/asan/TestCases/throw_catch.cc b/compiler-rt/test/asan/TestCases/throw_catch.cc index bb41946..f35378d 100644 --- a/compiler-rt/test/asan/TestCases/throw_catch.cc +++ b/compiler-rt/test/asan/TestCases/throw_catch.cc @@ -1,5 +1,8 @@ // RUN: %clangxx_asan -O %s -o %t && %run %t +// Clang doesn't support exceptions on Windows yet. +// XFAIL: win32 + #include #include #include diff --git a/compiler-rt/test/asan/TestCases/throw_invoke_test.cc b/compiler-rt/test/asan/TestCases/throw_invoke_test.cc index 2fc557d..ec48fc7 100644 --- a/compiler-rt/test/asan/TestCases/throw_invoke_test.cc +++ b/compiler-rt/test/asan/TestCases/throw_invoke_test.cc @@ -1,5 +1,9 @@ // RUN: %clangxx_asan %s -o %t && %run %t // RUN: %clangxx_asan %s -o %t -static-libstdc++ && %run %t + +// Clang doesn't support exceptions on Windows yet. +// XFAIL: win32 + #include static volatile int zero = 0; inline void pretend_to_do_something(void *x) { diff --git a/compiler-rt/test/asan/TestCases/time_interceptor.cc b/compiler-rt/test/asan/TestCases/time_interceptor.cc index 4fbd433..147ce88 100644 --- a/compiler-rt/test/asan/TestCases/time_interceptor.cc +++ b/compiler-rt/test/asan/TestCases/time_interceptor.cc @@ -2,6 +2,9 @@ // Test the time() interceptor. +// There's no interceptor for time() on Windows yet. +// XFAIL: win32 + #include #include #include diff --git a/compiler-rt/test/asan/TestCases/uar_and_exceptions.cc b/compiler-rt/test/asan/TestCases/uar_and_exceptions.cc index 2e0c864..0bfe297 100644 --- a/compiler-rt/test/asan/TestCases/uar_and_exceptions.cc +++ b/compiler-rt/test/asan/TestCases/uar_and_exceptions.cc @@ -2,6 +2,9 @@ // export ASAN_OPTIONS=detect_stack_use_after_return=1 // RUN: %clangxx_asan -O0 %s -o %t && %run %t +// Clang doesn't support exceptions on Windows yet. +// XFAIL: win32 + #include volatile char *g; -- 2.7.4