Index: test/asan/TestCases/Darwin/cstring_literals_regtest.mm =================================================================== --- test/asan/TestCases/Darwin/cstring_literals_regtest.mm +++ test/asan/TestCases/Darwin/cstring_literals_regtest.mm @@ -2,7 +2,7 @@ // https://code.google.com/p/address-sanitizer/issues/detail?id=274. // RUN: %clang_asan %s -framework Foundation -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import #include Index: test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc =================================================================== --- test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc +++ test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc @@ -8,7 +8,7 @@ // TODO(glider): figure out how to set rpath in a more portable way and unite // this test with ../Linux/interception-in-shared-lib-test.cc. // RUN: %clangxx_asan -O0 %s -o %t -Wl,-rpath,@executable-path -L%T -linterception-in-shared-lib-test && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc =================================================================== --- test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc +++ test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc @@ -4,7 +4,7 @@ // page-aligned address, so we can only test on a best-effort basis. // RUN: %clangxx_asan %s -o %t -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 #include #include Index: test/asan/TestCases/Darwin/malloc_zone-protected.cc =================================================================== --- test/asan/TestCases/Darwin/malloc_zone-protected.cc +++ test/asan/TestCases/Darwin/malloc_zone-protected.cc @@ -3,7 +3,7 @@ #include // RUN: %clangxx_asan %s -o %t -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s void *pwn(malloc_zone_t *unused_zone, size_t unused_size) { Index: test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc =================================================================== --- test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc +++ test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc @@ -8,7 +8,7 @@ // FIXME: the following command line may hang in the case of a regression. // RUN: DYLD_INSERT_LIBRARIES=darwin-dummy-shared-lib-so.dylib \ -// RUN: %t 2>&1 | FileCheck %s || exit 1 +// RUN: %run %t 2>&1 | FileCheck %s || exit 1 #include #include Index: test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc =================================================================== --- test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc +++ test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc @@ -9,9 +9,9 @@ // Make sure DYLD_INSERT_LIBRARIES doesn't contain the runtime library before // execl(). -// RUN: %t %T/echo-env >/dev/null 2>&1 +// RUN: %run %t %T/echo-env >/dev/null 2>&1 // RUN: DYLD_INSERT_LIBRARIES=%t-darwin-dummy-shared-lib-so.dylib \ -// RUN: %t %T/echo-env 2>&1 | FileCheck %s || exit 1 +// RUN: %run %t %T/echo-env 2>&1 | FileCheck %s || exit 1 #include int main(int argc, char *argv[]) { execl(argv[1], argv[1], "DYLD_INSERT_LIBRARIES", NULL); Index: test/asan/TestCases/Linux/asan_dlopen_test.cc =================================================================== --- test/asan/TestCases/Linux/asan_dlopen_test.cc +++ test/asan/TestCases/Linux/asan_dlopen_test.cc @@ -1,7 +1,7 @@ // Test that dlopen of dynamic runtime is prohibited. // // RUN: %clangxx %s -DRT=\"%shared_libasan\" -o %t -ldl -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-dynamic-runtime #include Index: test/asan/TestCases/Linux/asan_prelink_test.cc =================================================================== --- test/asan/TestCases/Linux/asan_prelink_test.cc +++ test/asan/TestCases/Linux/asan_prelink_test.cc @@ -7,7 +7,7 @@ // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext-segment=0x3600000000 ||\ // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext=0x3600000000 // RUN: %clangxx_asan %t.o %t.so -Wl,-R. -o %t -// RUN: ASAN_OPTIONS=verbosity=1 %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=verbosity=1 %run %t 2>&1 | FileCheck %s // REQUIRES: x86_64-supported-target, asan-64-bits #if BUILD_SO Index: test/asan/TestCases/Linux/asan_preload_test-1.cc =================================================================== --- test/asan/TestCases/Linux/asan_preload_test-1.cc +++ test/asan/TestCases/Linux/asan_preload_test-1.cc @@ -5,7 +5,7 @@ // RUN: %clangxx %s %t.so -o %t // // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -// RUN: LD_PRELOAD=%shared_libasan not %t 2>&1 | FileCheck %s +// RUN: LD_PRELOAD=%shared_libasan not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-dynamic-runtime Index: test/asan/TestCases/Linux/asan_preload_test-2.cc =================================================================== --- test/asan/TestCases/Linux/asan_preload_test-2.cc +++ test/asan/TestCases/Linux/asan_preload_test-2.cc @@ -1,7 +1,7 @@ // Test that preloaded runtime works with unsanitized executables. // // RUN: %clangxx %s -o %t -// RUN: LD_PRELOAD=%shared_libasan not %t 2>&1 | FileCheck %s +// RUN: LD_PRELOAD=%shared_libasan not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-dynamic-runtime Index: test/asan/TestCases/Linux/asan_rt_confict_test-1.cc =================================================================== --- test/asan/TestCases/Linux/asan_rt_confict_test-1.cc +++ test/asan/TestCases/Linux/asan_rt_confict_test-1.cc @@ -2,7 +2,7 @@ // executable is prohibited. // // RUN: %clangxx_asan_static %s -o %t -// RUN: LD_PRELOAD=%shared_libasan not %t 2>&1 | FileCheck %s +// RUN: LD_PRELOAD=%shared_libasan not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-dynamic-runtime Index: test/asan/TestCases/Linux/asan_rt_confict_test-2.cc =================================================================== --- test/asan/TestCases/Linux/asan_rt_confict_test-2.cc +++ test/asan/TestCases/Linux/asan_rt_confict_test-2.cc @@ -3,7 +3,7 @@ // // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so // RUN: %clangxx_asan_static %s %t.so -o %t -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-dynamic-runtime Index: test/asan/TestCases/Linux/clone_test.cc =================================================================== --- test/asan/TestCases/Linux/clone_test.cc +++ test/asan/TestCases/Linux/clone_test.cc @@ -1,10 +1,10 @@ // Regression test for: // http://code.google.com/p/address-sanitizer/issues/detail?id=37 -// RUN: %clangxx_asan -O0 %s -o %t && %t | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && %t | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && %t | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && %t | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && %run %t | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && %run %t | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && %run %t | FileCheck %s #include #include Index: test/asan/TestCases/Linux/coverage.cc =================================================================== --- test/asan/TestCases/Linux/coverage.cc +++ test/asan/TestCases/Linux/coverage.cc @@ -1,11 +1,11 @@ // RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %T/libcoverage_test.so -fPIC // RUN: %clangxx_asan -mllvm -asan-coverage=1 %s -o %t -Wl,-R,\$ORIGIN -L%T -lcoverage_test // RUN: export ASAN_OPTIONS=coverage=1:verbosity=1 -// RUN: %t 2>&1 | FileCheck %s --check-prefix=CHECK-main -// RUN: %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-foo -// RUN: %t bar 2>&1 | FileCheck %s --check-prefix=CHECK-bar -// RUN: %t foo bar 2>&1 | FileCheck %s --check-prefix=CHECK-foo-bar -// RUN: not %t foo bar 1 2 2>&1 | FileCheck %s --check-prefix=CHECK-report +// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-main +// RUN: %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-foo +// RUN: %run %t bar 2>&1 | FileCheck %s --check-prefix=CHECK-bar +// RUN: %run %t foo bar 2>&1 | FileCheck %s --check-prefix=CHECK-foo-bar +// RUN: not %run %t foo bar 1 2 2>&1 | FileCheck %s --check-prefix=CHECK-report // // https://code.google.com/p/address-sanitizer/issues/detail?id=263 // XFAIL: android Index: test/asan/TestCases/Linux/function-sections-are-bad.cc =================================================================== --- test/asan/TestCases/Linux/function-sections-are-bad.cc +++ test/asan/TestCases/Linux/function-sections-are-bad.cc @@ -2,7 +2,7 @@ // interface. // RUN: %clang_asan %s -Wl,--gc-sections -ldl -o %t // RUN: %clang_asan %s -DBUILD_SO -fPIC -o %t-so.so -shared -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 // REQUIRES: asan-64-bits Index: test/asan/TestCases/Linux/glob.cc =================================================================== --- test/asan/TestCases/Linux/glob.cc +++ test/asan/TestCases/Linux/glob.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %s -o %t && %t %p 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && %run %t %p 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/heap-overflow-large.cc =================================================================== --- test/asan/TestCases/Linux/heap-overflow-large.cc +++ test/asan/TestCases/Linux/heap-overflow-large.cc @@ -2,9 +2,9 @@ // https://code.google.com/p/address-sanitizer/issues/detail?id=183 // RUN: %clangxx_asan -O2 %s -o %t -// RUN: not %t 12 2>&1 | FileCheck %s -// RUN: not %t 100 2>&1 | FileCheck %s -// RUN: not %t 10000 2>&1 | FileCheck %s +// RUN: not %run %t 12 2>&1 | FileCheck %s +// RUN: not %run %t 100 2>&1 | FileCheck %s +// RUN: not %run %t 10000 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/heavy_uar_test.cc =================================================================== --- test/asan/TestCases/Linux/heavy_uar_test.cc +++ test/asan/TestCases/Linux/heavy_uar_test.cc @@ -1,8 +1,8 @@ // RUN: export ASAN_OPTIONS=detect_stack_use_after_return=1 // RUN: %clangxx_asan -O0 %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O2 %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/initialization-bug-any-order.cc =================================================================== --- test/asan/TestCases/Linux/initialization-bug-any-order.cc +++ test/asan/TestCases/Linux/initialization-bug-any-order.cc @@ -4,9 +4,9 @@ // strict init-order checking). // RUN: %clangxx_asan -O0 %s %p/../Helpers/initialization-bug-extra.cc -o %t -// RUN: ASAN_OPTIONS=strict_init_order=true not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=strict_init_order=true not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O0 %p/../Helpers/initialization-bug-extra.cc %s -o %t -// RUN: ASAN_OPTIONS=strict_init_order=true not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=strict_init_order=true not %run %t 2>&1 | FileCheck %s // Do not test with optimization -- the error may be optimized away. Index: test/asan/TestCases/Linux/interception-in-shared-lib-test.cc =================================================================== --- test/asan/TestCases/Linux/interception-in-shared-lib-test.cc +++ test/asan/TestCases/Linux/interception-in-shared-lib-test.cc @@ -8,7 +8,7 @@ // TODO(glider): figure out how to set rpath in a more portable way and unite // this test with ../Darwin/interception-in-shared-lib-test.cc. // RUN: %clangxx_asan -O0 %s -o %t -Wl,-R,\$ORIGIN -L%T -linterception-in-shared-lib-test && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/interception_failure_test.cc =================================================================== --- test/asan/TestCases/Linux/interception_failure_test.cc +++ test/asan/TestCases/Linux/interception_failure_test.cc @@ -1,10 +1,10 @@ // If user provides his own libc functions, ASan doesn't // intercept these functions. -// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/interception_malloc_test.cc =================================================================== --- test/asan/TestCases/Linux/interception_malloc_test.cc +++ test/asan/TestCases/Linux/interception_malloc_test.cc @@ -1,9 +1,9 @@ // ASan interceptor can be accessed with __interceptor_ prefix. -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/asan/TestCases/Linux/interception_readdir_r_test.cc =================================================================== --- test/asan/TestCases/Linux/interception_readdir_r_test.cc +++ test/asan/TestCases/Linux/interception_readdir_r_test.cc @@ -1,12 +1,12 @@ -// RUN: %clangxx_asan -O0 %s -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s // -// RUN: %clangxx_asan -O0 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%T"'"' -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/interception_test.cc =================================================================== --- test/asan/TestCases/Linux/interception_test.cc +++ test/asan/TestCases/Linux/interception_test.cc @@ -1,9 +1,9 @@ // ASan interceptor can be accessed with __interceptor_ prefix. -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/kernel-area.cc =================================================================== --- test/asan/TestCases/Linux/kernel-area.cc +++ test/asan/TestCases/Linux/kernel-area.cc @@ -1,7 +1,7 @@ // Test that kernel area is not sanitized on 32-bit machines. // // RUN: %clangxx_asan %s -o %t -// RUN: ASAN_OPTIONS=verbosity=1 %t 2>&1 | FileCheck %s --check-prefix=CHECK-%kernel_bits +// RUN: ASAN_OPTIONS=verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%kernel_bits // // CHECK-kernel-32-bits: || `[0x38000000, 0xbfffffff]` || HighMem || // CHECK-kernel-32-bits: || `[0x27000000, 0x37ffffff]` || HighShadow || Index: test/asan/TestCases/Linux/leak.cc =================================================================== --- test/asan/TestCases/Linux/leak.cc +++ test/asan/TestCases/Linux/leak.cc @@ -2,9 +2,9 @@ // REQUIRES: asan-64-bits // // RUN: %clangxx_asan %s -o %t -// RUN: ASAN_OPTIONS=detect_leaks=1 not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS="" %t -// RUN: ASAN_OPTIONS=detect_leaks=0 %t +// RUN: ASAN_OPTIONS=detect_leaks=1 not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS="" %run %t +// RUN: ASAN_OPTIONS=detect_leaks=0 %run %t #include int *t; Index: test/asan/TestCases/Linux/malloc-in-qsort.cc =================================================================== --- test/asan/TestCases/Linux/malloc-in-qsort.cc +++ test/asan/TestCases/Linux/malloc-in-qsort.cc @@ -1,6 +1,6 @@ // RUN: %clangxx_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS=fast_unwind_on_malloc=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-FAST -// RUN: ASAN_OPTIONS=fast_unwind_on_malloc=0 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-SLOW +// RUN: ASAN_OPTIONS=fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-FAST +// RUN: ASAN_OPTIONS=fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SLOW // Test how well we unwind in presence of qsort in the stack // (i.e. if we can unwind through a function compiled w/o frame pointers). Index: test/asan/TestCases/Linux/malloc_delete_mismatch.cc =================================================================== --- test/asan/TestCases/Linux/malloc_delete_mismatch.cc +++ test/asan/TestCases/Linux/malloc_delete_mismatch.cc @@ -4,14 +4,14 @@ // RUN: %clangxx_asan -g %s -o %t 2>&1 // Find error and provide malloc context. -// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=ALLOC-STACK +// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=ALLOC-STACK // No error here. -// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=0 %t +// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=0 %run %t // Also works if no malloc context is available. -// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=1:malloc_context_size=0:fast_unwind_on_malloc=0 not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=1:malloc_context_size=0:fast_unwind_on_malloc=1 not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=1:malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=alloc_dealloc_mismatch=1:malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s #include static volatile char *x; Index: test/asan/TestCases/Linux/odr-violation.cc =================================================================== --- test/asan/TestCases/Linux/odr-violation.cc +++ test/asan/TestCases/Linux/odr-violation.cc @@ -1,15 +1,15 @@ // Different size: detect a bug if detect_odr_violation>=1 // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so // RUN: %clangxx_asan %s %t.so -Wl,-R. -o %t -// RUN: ASAN_OPTIONS=detect_odr_violation=1 not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=detect_odr_violation=2 not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=detect_odr_violation=0 %t 2>&1 | FileCheck %s --check-prefix=DISABLED -// RUN: %t 2>&1 | FileCheck %s --check-prefix=DISABLED +// RUN: ASAN_OPTIONS=detect_odr_violation=1 not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=detect_odr_violation=2 not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=detect_odr_violation=0 %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED +// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED // // Same size: report a bug only if detect_odr_violation>=2. // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -DSZ=100 -// RUN: ASAN_OPTIONS=detect_odr_violation=1 %t 2>&1 | FileCheck %s --check-prefix=DISABLED -// RUN: ASAN_OPTIONS=detect_odr_violation=2 not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=detect_odr_violation=1 %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED +// RUN: ASAN_OPTIONS=detect_odr_violation=2 not %run %t 2>&1 | FileCheck %s #ifndef SZ # define SZ 4 Index: test/asan/TestCases/Linux/overflow-in-qsort.cc =================================================================== --- test/asan/TestCases/Linux/overflow-in-qsort.cc +++ test/asan/TestCases/Linux/overflow-in-qsort.cc @@ -1,6 +1,6 @@ // RUN: %clangxx_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS=fast_unwind_on_fatal=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-FAST -// RUN: ASAN_OPTIONS=fast_unwind_on_fatal=0 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-SLOW +// RUN: ASAN_OPTIONS=fast_unwind_on_fatal=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-FAST +// RUN: ASAN_OPTIONS=fast_unwind_on_fatal=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SLOW // Test how well we unwind in presence of qsort in the stack // (i.e. if we can unwind through a function compiled w/o frame pointers). Index: test/asan/TestCases/Linux/preinit_test.cc =================================================================== --- test/asan/TestCases/Linux/preinit_test.cc +++ test/asan/TestCases/Linux/preinit_test.cc @@ -1,6 +1,6 @@ // RUN: %clangxx -DFUNC=zzzz %s -shared -o %t.so -fPIC // RUN: %clangxx_asan -DFUNC=main %s -o %t -Wl,-R. %t.so -// RUN: %t +// RUN: %run %t // This test ensures that we call __asan_init early enough. // We build a shared library w/o asan instrumentation Index: test/asan/TestCases/Linux/ptrace.cc =================================================================== --- test/asan/TestCases/Linux/ptrace.cc +++ test/asan/TestCases/Linux/ptrace.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %s -o %t && %t -// RUN: %clangxx_asan -DPOSITIVE -O0 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t +// RUN: %clangxx_asan -DPOSITIVE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/rlimit_mmap_test.cc =================================================================== --- test/asan/TestCases/Linux/rlimit_mmap_test.cc +++ test/asan/TestCases/Linux/rlimit_mmap_test.cc @@ -1,5 +1,5 @@ // Check that we properly report mmap failure. -// RUN: %clangxx_asan %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/asan/TestCases/Linux/shmctl.cc =================================================================== --- test/asan/TestCases/Linux/shmctl.cc +++ test/asan/TestCases/Linux/shmctl.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 +// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 // Regression test for // https://code.google.com/p/address-sanitizer/issues/detail?id=250 #include Index: test/asan/TestCases/Linux/stress_dtls.c =================================================================== --- test/asan/TestCases/Linux/stress_dtls.c +++ test/asan/TestCases/Linux/stress_dtls.c @@ -10,11 +10,11 @@ // RUN: %clangxx_asan -x c -DSO_NAME=f1 %s -shared -o %t-f1.so -fPIC // RUN: %clangxx_asan -x c -DSO_NAME=f2 %s -shared -o %t-f2.so -fPIC // RUN: %clangxx_asan %s -ldl -lpthread -o %t -// RUN: %t 0 3 -// RUN: %t 2 3 -// RUN: ASAN_OPTIONS=verbosity=2 %t 10 2 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=verbosity=2:intercept_tls_get_addr=1 %t 10 2 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=verbosity=2:intercept_tls_get_addr=0 %t 10 2 2>&1 | FileCheck %s --check-prefix=CHECK0 +// RUN: %run %t 0 3 +// RUN: %run %t 2 3 +// RUN: ASAN_OPTIONS=verbosity=2 %run %t 10 2 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=verbosity=2:intercept_tls_get_addr=1 %run %t 10 2 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=verbosity=2:intercept_tls_get_addr=0 %run %t 10 2 2>&1 | FileCheck %s --check-prefix=CHECK0 // CHECK: __tls_get_addr // CHECK: Creating thread 0 // CHECK: __tls_get_addr Index: test/asan/TestCases/Linux/swapcontext_test.cc =================================================================== --- test/asan/TestCases/Linux/swapcontext_test.cc +++ test/asan/TestCases/Linux/swapcontext_test.cc @@ -1,9 +1,9 @@ // Check that ASan plays well with easy cases of makecontext/swapcontext. -// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s // // This test is too sublte to try on non-x86 arch for now. // REQUIRES: x86_64-supported-target,i386-supported-target Index: test/asan/TestCases/Linux/syscalls.cc =================================================================== --- test/asan/TestCases/Linux/syscalls.cc +++ test/asan/TestCases/Linux/syscalls.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/Linux/tsd_dtor_leak.cc =================================================================== --- test/asan/TestCases/Linux/tsd_dtor_leak.cc +++ test/asan/TestCases/Linux/tsd_dtor_leak.cc @@ -1,7 +1,7 @@ // Regression test for a leak in tsd: // https://code.google.com/p/address-sanitizer/issues/detail?id=233 // RUN: %clangxx_asan -O1 %s -lpthread -o %t -// RUN: ASAN_OPTIONS=quarantine_size=1 %t +// RUN: ASAN_OPTIONS=quarantine_size=1 %run %t #include #include #include Index: test/asan/TestCases/Linux/uar_signals.cc =================================================================== --- test/asan/TestCases/Linux/uar_signals.cc +++ test/asan/TestCases/Linux/uar_signals.cc @@ -1,6 +1,6 @@ // This test checks that the implementation of use-after-return // is async-signal-safe. -// RUN: %clangxx_asan -O1 %s -o %t -lpthread && %t +// RUN: %clangxx_asan -O1 %s -o %t -lpthread && %run %t #include #include #include Index: test/asan/TestCases/Linux/unpoison_tls.cc =================================================================== --- test/asan/TestCases/Linux/unpoison_tls.cc +++ test/asan/TestCases/Linux/unpoison_tls.cc @@ -1,7 +1,7 @@ // Test that TLS is unpoisoned on thread death. // REQUIRES: x86_64-supported-target,i386-supported-target -// RUN: %clangxx_asan -O1 %s -lpthread -o %t && %t 2>&1 +// RUN: %clangxx_asan -O1 %s -lpthread -o %t && %run %t 2>&1 #include #include Index: test/asan/TestCases/allocator_returns_null.cc =================================================================== --- test/asan/TestCases/allocator_returns_null.cc +++ test/asan/TestCases/allocator_returns_null.cc @@ -3,17 +3,17 @@ // With allocator_may_return_null=1 the allocator should return 0. // // RUN: %clangxx_asan -O0 %s -o %t -// RUN: not %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH -// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH -// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mNULL -// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH -// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cNULL -// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH -// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coNULL -// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH -// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rNULL -// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH -// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrNULL +// RUN: not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH +// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH +// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mNULL +// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH +// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cNULL +// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH +// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coNULL +// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH +// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rNULL +// RUN: ASAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH +// RUN: ASAN_OPTIONS=allocator_may_return_null=1 %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrNULL #include #include Index: test/asan/TestCases/allow_user_segv.cc =================================================================== --- test/asan/TestCases/allow_user_segv.cc +++ test/asan/TestCases/allow_user_segv.cc @@ -1,8 +1,8 @@ // Regression test for // https://code.google.com/p/address-sanitizer/issues/detail?id=180 -// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/asan-symbolize-sanity-test.cc =================================================================== --- test/asan/TestCases/asan-symbolize-sanity-test.cc +++ test/asan/TestCases/asan-symbolize-sanity-test.cc @@ -3,7 +3,7 @@ // RUN: %clangxx_asan -O0 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so // RUN: %clangxx_asan -O0 %s -ldl -o %t -// RUN: ASAN_OPTIONS=symbolize=0 not %t 2>&1 | %asan_symbolize | FileCheck %s +// RUN: ASAN_OPTIONS=symbolize=0 not %run %t 2>&1 | %asan_symbolize | FileCheck %s #include #include #include Index: test/asan/TestCases/assign_large_valloc_to_global.cc =================================================================== --- test/asan/TestCases/assign_large_valloc_to_global.cc +++ test/asan/TestCases/assign_large_valloc_to_global.cc @@ -1,5 +1,5 @@ // Make sure we don't report a leak nor hang. -// RUN: %clangxx_asan -O3 %s -o %t && %t +// RUN: %clangxx_asan -O3 %s -o %t && %run %t #include #ifndef __APPLE__ #include Index: test/asan/TestCases/atexit_stats.cc =================================================================== --- test/asan/TestCases/atexit_stats.cc +++ test/asan/TestCases/atexit_stats.cc @@ -1,6 +1,6 @@ // Make sure we report atexit stats. // RUN: %clangxx_asan -O3 %s -o %t -// RUN: ASAN_OPTIONS=atexit=1:print_stats=1 %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=atexit=1:print_stats=1 %run %t 2>&1 | FileCheck %s // // No atexit output on Android due to // https://code.google.com/p/address-sanitizer/issues/detail?id=263 Index: test/asan/TestCases/blacklist.cc =================================================================== --- test/asan/TestCases/blacklist.cc +++ test/asan/TestCases/blacklist.cc @@ -4,13 +4,13 @@ // RUN: echo "global:*badGlobal*" >> %tmp // RUN: echo "src:*blacklist-extra.cc" >> %tmp // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O0 %s -o %t \ -// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1 +// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1 // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O1 %s -o %t \ -// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1 +// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1 // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O2 %s -o %t \ -// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1 +// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1 // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O3 %s -o %t \ -// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1 +// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1 // badGlobal is accessed improperly, but we blacklisted it. Align // it to make sure memory past the end of badGlobal will be in Index: test/asan/TestCases/contiguous_container.cc =================================================================== --- test/asan/TestCases/contiguous_container.cc +++ test/asan/TestCases/contiguous_container.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O %s -o %t && %t +// RUN: %clangxx_asan -O %s -o %t && %run %t // // Test __sanitizer_annotate_contiguous_container. Index: test/asan/TestCases/contiguous_container_crash.cc =================================================================== --- test/asan/TestCases/contiguous_container_crash.cc +++ test/asan/TestCases/contiguous_container_crash.cc @@ -1,7 +1,7 @@ // RUN: %clangxx_asan -O %s -o %t -// RUN: not %t crash 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s -// RUN: not %t bad-bounds 2>&1 | FileCheck --check-prefix=CHECK-BAD %s -// RUN: ASAN_OPTIONS=detect_container_overflow=0 %t crash +// RUN: not %run %t crash 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s +// RUN: not %run %t bad-bounds 2>&1 | FileCheck --check-prefix=CHECK-BAD %s +// RUN: ASAN_OPTIONS=detect_container_overflow=0 %run %t crash // // Test crash due to __sanitizer_annotate_contiguous_container. Index: test/asan/TestCases/current_allocated_bytes.cc =================================================================== --- test/asan/TestCases/current_allocated_bytes.cc +++ test/asan/TestCases/current_allocated_bytes.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %s -lpthread -o %t && %t -// RUN: %clangxx_asan -O2 %s -lpthread -o %t && %t +// RUN: %clangxx_asan -O0 %s -lpthread -o %t && %run %t +// RUN: %clangxx_asan -O2 %s -lpthread -o %t && %run %t #include #include Index: test/asan/TestCases/deep_call_stack.cc =================================================================== --- test/asan/TestCases/deep_call_stack.cc +++ test/asan/TestCases/deep_call_stack.cc @@ -1,9 +1,9 @@ // Check that UAR mode can handle very deep recusrion. // export ASAN_OPTIONS=detect_stack_use_after_return=1 // RUN: %clangxx_asan -O2 %s -o %t && \ -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s // Also check that use_sigaltstack+verbosity doesn't crash. -// RUN: ASAN_OPTIONS=verbosity=1:use_sigaltstack=1 %t | FileCheck %s +// RUN: ASAN_OPTIONS=verbosity=1:use_sigaltstack=1 %run %t | FileCheck %s #include __attribute__((noinline)) Index: test/asan/TestCases/deep_stack_uaf.cc =================================================================== --- test/asan/TestCases/deep_stack_uaf.cc +++ test/asan/TestCases/deep_stack_uaf.cc @@ -1,7 +1,7 @@ // Check that we can store lots of stack frames if asked to. // RUN: %clangxx_asan -O0 %s -o %t 2>&1 -// RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/deep_tail_call.cc =================================================================== --- test/asan/TestCases/deep_tail_call.cc +++ test/asan/TestCases/deep_tail_call.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s // CHECK: AddressSanitizer: global-buffer-overflow int global[10]; Index: test/asan/TestCases/deep_thread_stack.cc =================================================================== --- test/asan/TestCases/deep_thread_stack.cc +++ test/asan/TestCases/deep_thread_stack.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s #include Index: test/asan/TestCases/default_options.cc =================================================================== --- test/asan/TestCases/default_options.cc +++ test/asan/TestCases/default_options.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_asan -O2 %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s const char *kAsanDefaultOptions="verbosity=1 foo=bar"; Index: test/asan/TestCases/dlclose-test.cc =================================================================== --- test/asan/TestCases/dlclose-test.cc +++ test/asan/TestCases/dlclose-test.cc @@ -15,13 +15,13 @@ // REQUIRES: x86_64-supported-target,i386-supported-target // RUN: %clangxx_asan -O0 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O0 %s -ldl -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -ldl -o %t && %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O1 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O1 %s -ldl -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -ldl -o %t && %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O2 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O2 %s -ldl -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -ldl -o %t && %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O3 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O3 %s -ldl -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -ldl -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/double-free.cc =================================================================== --- test/asan/TestCases/double-free.cc +++ test/asan/TestCases/double-free.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_asan -O0 %s -o %t 2>&1 -// RUN: not %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=MALLOC-CTX +// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=MALLOC-CTX // Also works if no malloc context is available. -// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/force_inline_opt0.cc =================================================================== --- test/asan/TestCases/force_inline_opt0.cc +++ test/asan/TestCases/force_inline_opt0.cc @@ -1,7 +1,7 @@ // This test checks that we are no instrumenting a memory access twice // (before and after inlining) -// RUN: %clangxx_asan -O1 %s -o %t && %t -// RUN: %clangxx_asan -O0 %s -o %t && %t +// RUN: %clangxx_asan -O1 %s -o %t && %run %t +// RUN: %clangxx_asan -O0 %s -o %t && %run %t __attribute__((always_inline)) void foo(int *x) { *x = 0; Index: test/asan/TestCases/free_hook_realloc.cc =================================================================== --- test/asan/TestCases/free_hook_realloc.cc +++ test/asan/TestCases/free_hook_realloc.cc @@ -1,6 +1,6 @@ // Check that free hook doesn't conflict with Realloc. // RUN: %clangxx_asan -O2 %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/gc-test.cc =================================================================== --- test/asan/TestCases/gc-test.cc +++ test/asan/TestCases/gc-test.cc @@ -1,6 +1,6 @@ // RUN: %clangxx_asan %s -lpthread -o %t -// RUN: ASAN_OPTIONS=detect_stack_use_after_return=1 %t 2>&1 | FileCheck %s --check-prefix=CHECK1 -// RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %t 2>&1 | FileCheck %s --check-prefix=CHECK0 +// RUN: ASAN_OPTIONS=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 +// RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0 #include #include Index: test/asan/TestCases/global-demangle.cc =================================================================== --- test/asan/TestCases/global-demangle.cc +++ test/asan/TestCases/global-demangle.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s namespace XXX { class YYY { Index: test/asan/TestCases/global-overflow.cc =================================================================== --- test/asan/TestCases/global-overflow.cc +++ test/asan/TestCases/global-overflow.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include int main(int argc, char **argv) { Index: test/asan/TestCases/heap-overflow.cc =================================================================== --- test/asan/TestCases/heap-overflow.cc +++ test/asan/TestCases/heap-overflow.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK #include #include Index: test/asan/TestCases/huge_negative_hea_oob.cc =================================================================== --- test/asan/TestCases/huge_negative_hea_oob.cc +++ test/asan/TestCases/huge_negative_hea_oob.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O %s -o %t && not %run %t 2>&1 | FileCheck %s // Check that we can find huge buffer overflows to the left. #include #include Index: test/asan/TestCases/init-order-atexit.cc =================================================================== --- test/asan/TestCases/init-order-atexit.cc +++ test/asan/TestCases/init-order-atexit.cc @@ -5,7 +5,7 @@ // We do *not* want to report init-order bug in this case. // RUN: %clangxx_asan -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t -// RUN: ASAN_OPTIONS=strict_init_order=true not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=strict_init_order=true not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/init-order-dlopen.cc =================================================================== --- test/asan/TestCases/init-order-dlopen.cc +++ test/asan/TestCases/init-order-dlopen.cc @@ -12,7 +12,7 @@ // FIXME: find a better solution. // RUN: %clangxx_asan -O0 %s -lpthread -ldl -o %t -Wl,--export-dynamic || \ // RUN: %clangxx_asan -O0 %s -lpthread -ldl -o %t -// RUN: ASAN_OPTIONS=strict_init_order=true %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=strict_init_order=true %run %t 2>&1 | FileCheck %s #include #include #include Index: test/asan/TestCases/init-order-pthread-create.cc =================================================================== --- test/asan/TestCases/init-order-pthread-create.cc +++ test/asan/TestCases/init-order-pthread-create.cc @@ -2,7 +2,7 @@ // called. // RUN: %clangxx_asan %s %p/Helpers/init-order-pthread-create-extra.cc -lpthread -o %t -// RUN: ASAN_OPTIONS=strict_init_order=true %t +// RUN: ASAN_OPTIONS=strict_init_order=true %run %t #include #include Index: test/asan/TestCases/initialization-blacklist.cc =================================================================== --- test/asan/TestCases/initialization-blacklist.cc +++ test/asan/TestCases/initialization-blacklist.cc @@ -4,17 +4,17 @@ // RUN: %p/Helpers/initialization-blacklist-extra2.cc \ // RUN: -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \ // RUN: -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-blacklist-extra.cc\ // RUN: %p/Helpers/initialization-blacklist-extra2.cc \ // RUN: -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \ // RUN: -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-blacklist-extra.cc\ // RUN: %p/Helpers/initialization-blacklist-extra2.cc \ // RUN: -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \ // RUN: -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // Function is defined in another TU. int readBadGlobal(); Index: test/asan/TestCases/initialization-bug.cc =================================================================== --- test/asan/TestCases/initialization-bug.cc +++ test/asan/TestCases/initialization-bug.cc @@ -1,7 +1,7 @@ // Test to make sure basic initialization order errors are caught. // RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=check_initialization_order=true not %run %t 2>&1 | FileCheck %s // Do not test with optimization -- the error may be optimized away. Index: test/asan/TestCases/initialization-constexpr.cc =================================================================== --- test/asan/TestCases/initialization-constexpr.cc +++ test/asan/TestCases/initialization-constexpr.cc @@ -6,16 +6,16 @@ // RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cc\ // RUN: --std=c++11 -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cc\ // RUN: --std=c++11 -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cc\ // RUN: --std=c++11 -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cc\ // RUN: --std=c++11 -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 class Integer { private: Index: test/asan/TestCases/initialization-nobug.cc =================================================================== --- test/asan/TestCases/initialization-nobug.cc +++ test/asan/TestCases/initialization-nobug.cc @@ -2,13 +2,13 @@ // order checking. If successful, this will just return 0. // RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t -// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 +// RUN: ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1 // Simple access: // Make sure that accessing a global in the same TU is safe Index: test/asan/TestCases/inline.cc =================================================================== --- test/asan/TestCases/inline.cc +++ test/asan/TestCases/inline.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O3 %s -o %t && %t +// RUN: %clangxx_asan -O3 %s -o %t && %run %t // Test that no_sanitize_address attribute applies even when the function would // be normally inlined. Index: test/asan/TestCases/interface_test.cc =================================================================== --- test/asan/TestCases/interface_test.cc +++ test/asan/TestCases/interface_test.cc @@ -1,8 +1,8 @@ // Check that user may include ASan interface header. -// RUN: %clang_asan %s -o %t && %t -// RUN: %clang_asan -x c %s -o %t && %t -// RUN: %clang %s -o %t && %t -// RUN: %clang -x c %s -o %t && %t +// RUN: %clang_asan %s -o %t && %run %t +// RUN: %clang_asan -x c %s -o %t && %run %t +// RUN: %clang %s -o %t && %run %t +// RUN: %clang -x c %s -o %t && %run %t #include int main() { Index: test/asan/TestCases/invalid-free.cc =================================================================== --- test/asan/TestCases/invalid-free.cc +++ test/asan/TestCases/invalid-free.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_asan -O0 %s -o %t -// RUN: not %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=MALLOC-CTX +// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=MALLOC-CTX // Also works if no malloc context is available. -// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/ioctl.cc =================================================================== --- test/asan/TestCases/ioctl.cc +++ test/asan/TestCases/ioctl.cc @@ -1,8 +1,8 @@ -// RUN: %clangxx_asan -O0 -g %s -o %t && ASAN_OPTIONS=handle_ioctl=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 -g %s -o %t && ASAN_OPTIONS=handle_ioctl=1 not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 -g %s -o %t && ASAN_OPTIONS=handle_ioctl=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 -g %s -o %t && ASAN_OPTIONS=handle_ioctl=1 not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O0 -g %s -o %t && %t -// RUN: %clangxx_asan -O3 -g %s -o %t && %t +// RUN: %clangxx_asan -O0 -g %s -o %t && %run %t +// RUN: %clangxx_asan -O3 -g %s -o %t && %run %t #include #include Index: test/asan/TestCases/large_allocator_unpoisons_on_free.cc =================================================================== --- test/asan/TestCases/large_allocator_unpoisons_on_free.cc +++ test/asan/TestCases/large_allocator_unpoisons_on_free.cc @@ -2,7 +2,7 @@ // RUN: %clangxx_asan %s -o %t // The memory is released only when the deallocated chunk leaves the quarantine, // otherwise the mmap(p, ...) call overwrites the malloc header. -// RUN: ASAN_OPTIONS=quarantine_size=1 %t +// RUN: ASAN_OPTIONS=quarantine_size=1 %run %t #include #include Index: test/asan/TestCases/large_func_test.cc =================================================================== --- test/asan/TestCases/large_func_test.cc +++ test/asan/TestCases/large_func_test.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK #include __attribute__((noinline)) Index: test/asan/TestCases/log-path_test.cc =================================================================== --- test/asan/TestCases/log-path_test.cc +++ test/asan/TestCases/log-path_test.cc @@ -1,26 +1,26 @@ // RUN: %clangxx_asan %s -o %t // Regular run. -// RUN: not %t 2> %t.out +// RUN: not %run %t 2> %t.out // RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t.out // Good log_path. // RUN: rm -f %t.log.* -// RUN: ASAN_OPTIONS=log_path=%t.log not %t 2> %t.out +// RUN: ASAN_OPTIONS=log_path=%t.log not %run %t 2> %t.out // RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t.log.* // Invalid log_path. -// RUN: ASAN_OPTIONS=log_path=/INVALID not %t 2> %t.out +// RUN: ASAN_OPTIONS=log_path=/INVALID not %run %t 2> %t.out // RUN: FileCheck %s --check-prefix=CHECK-INVALID < %t.out // Too long log_path. // RUN: ASAN_OPTIONS=log_path=`for((i=0;i<10000;i++)); do echo -n $i; done` \ -// RUN: not %t 2> %t.out +// RUN: not %run %t 2> %t.out // RUN: FileCheck %s --check-prefix=CHECK-LONG < %t.out // Run w/o errors should not produce any log. // RUN: rm -f %t.log.* -// RUN: ASAN_OPTIONS=log_path=%t.log %t ARG ARG ARG +// RUN: ASAN_OPTIONS=log_path=%t.log %run %t ARG ARG ARG // RUN: not cat %t.log.* Index: test/asan/TestCases/log_path_fork_test.cc.disabled =================================================================== --- test/asan/TestCases/log_path_fork_test.cc.disabled +++ test/asan/TestCases/log_path_fork_test.cc.disabled @@ -1,7 +1,7 @@ // RUN: %clangxx_asan %s -o %t // RUN: rm -f %t.log.* // Set verbosity to 1 so that the log files are opened prior to fork(). -// RUN: ASAN_OPTIONS="log_path=%t.log verbosity=1" not %t 2> %t.out +// RUN: ASAN_OPTIONS="log_path=%t.log verbosity=1" not %run %t 2> %t.out // RUN: for f in %t.log.* ; do FileCheck %s < $f; done // RUN: [ `ls %t.log.* | wc -l` == 2 ] Index: test/asan/TestCases/lsan_annotations.cc =================================================================== --- test/asan/TestCases/lsan_annotations.cc +++ test/asan/TestCases/lsan_annotations.cc @@ -1,6 +1,6 @@ // Check that LSan annotations work fine. -// RUN: %clangxx_asan -O0 %s -o %t && %t -// RUN: %clangxx_asan -O3 %s -o %t && %t +// RUN: %clangxx_asan -O0 %s -o %t && %run %t +// RUN: %clangxx_asan -O3 %s -o %t && %run %t #include #include Index: test/asan/TestCases/malloc_context_size.cc =================================================================== --- test/asan/TestCases/malloc_context_size.cc +++ test/asan/TestCases/malloc_context_size.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_asan -O0 %s -o %t -// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os -// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os -// RUN: ASAN_OPTIONS=malloc_context_size=1:fast_unwind_on_malloc=0 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os -// RUN: ASAN_OPTIONS=malloc_context_size=1:fast_unwind_on_malloc=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os -// RUN: ASAN_OPTIONS=malloc_context_size=2 not %t 2>&1 | FileCheck %s --check-prefix=TWO +// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os +// RUN: ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os +// RUN: ASAN_OPTIONS=malloc_context_size=1:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os +// RUN: ASAN_OPTIONS=malloc_context_size=1:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os +// RUN: ASAN_OPTIONS=malloc_context_size=2 not %run %t 2>&1 | FileCheck %s --check-prefix=TWO int main() { char *x = new char[20]; Index: test/asan/TestCases/malloc_fill.cc =================================================================== --- test/asan/TestCases/malloc_fill.cc +++ test/asan/TestCases/malloc_fill.cc @@ -1,8 +1,8 @@ // Check that we fill malloc-ed memory correctly. // RUN: %clangxx_asan %s -o %t -// RUN: %t | FileCheck %s -// RUN: ASAN_OPTIONS=max_malloc_fill_size=10:malloc_fill_byte=8 %t | FileCheck %s --check-prefix=CHECK-10-8 -// RUN: ASAN_OPTIONS=max_malloc_fill_size=20:malloc_fill_byte=171 %t | FileCheck %s --check-prefix=CHECK-20-ab +// RUN: %run %t | FileCheck %s +// RUN: ASAN_OPTIONS=max_malloc_fill_size=10:malloc_fill_byte=8 %run %t | FileCheck %s --check-prefix=CHECK-10-8 +// RUN: ASAN_OPTIONS=max_malloc_fill_size=20:malloc_fill_byte=171 %run %t | FileCheck %s --check-prefix=CHECK-20-ab #include int main(int argc, char **argv) { Index: test/asan/TestCases/malloc_hook.cc =================================================================== --- test/asan/TestCases/malloc_hook.cc +++ test/asan/TestCases/malloc_hook.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_asan -O2 %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/max_redzone.cc =================================================================== --- test/asan/TestCases/max_redzone.cc +++ test/asan/TestCases/max_redzone.cc @@ -1,9 +1,9 @@ // Test max_redzone runtime option. -// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=max_redzone=16 %t 0 2>&1 -// RUN: %clangxx_asan -O0 %s -o %t && %t 1 2>&1 -// RUN: %clangxx_asan -O3 %s -o %t && ASAN_OPTIONS=max_redzone=16 %t 0 2>&1 -// RUN: %clangxx_asan -O3 %s -o %t && %t 1 2>&1 +// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=max_redzone=16 %run %t 0 2>&1 +// RUN: %clangxx_asan -O0 %s -o %t && %run %t 1 2>&1 +// RUN: %clangxx_asan -O3 %s -o %t && ASAN_OPTIONS=max_redzone=16 %run %t 0 2>&1 +// RUN: %clangxx_asan -O3 %s -o %t && %run %t 1 2>&1 #include #include Index: test/asan/TestCases/memcmp_strict_test.cc =================================================================== --- test/asan/TestCases/memcmp_strict_test.cc +++ test/asan/TestCases/memcmp_strict_test.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=0 %t -// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=1 not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=0 %run %t +// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=1 not %run %t 2>&1 | FileCheck %s // Default to strict_memcmp=1. -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/memcmp_test.cc =================================================================== --- test/asan/TestCases/memcmp_test.cc +++ test/asan/TestCases/memcmp_test.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s // REQUIRES: compiler-rt-optimized Index: test/asan/TestCases/memset_test.cc =================================================================== --- test/asan/TestCases/memset_test.cc +++ test/asan/TestCases/memset_test.cc @@ -1,33 +1,33 @@ // Test that large memset/memcpy/memmove check the entire range. -// RUN: %clangxx_asan -O0 -DTEST_MEMSET %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O0 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMSET -// RUN: %clangxx_asan -O1 -DTEST_MEMSET %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O1 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMSET -// RUN: %clangxx_asan -O2 -DTEST_MEMSET %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O2 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMSET -// RUN: %clangxx_asan -O3 -DTEST_MEMSET %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O3 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMSET -// RUN: %clangxx_asan -O0 -DTEST_MEMCPY %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O0 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMCPY -// RUN: %clangxx_asan -O1 -DTEST_MEMCPY %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O1 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMCPY -// RUN: %clangxx_asan -O2 -DTEST_MEMCPY %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O2 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMCPY -// RUN: %clangxx_asan -O3 -DTEST_MEMCPY %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O3 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMCPY -// RUN: %clangxx_asan -O0 -DTEST_MEMMOVE %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O0 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMMOVE -// RUN: %clangxx_asan -O1 -DTEST_MEMMOVE %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O1 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMMOVE -// RUN: %clangxx_asan -O2 -DTEST_MEMMOVE %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O2 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMMOVE -// RUN: %clangxx_asan -O3 -DTEST_MEMMOVE %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O3 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMMOVE -// RUN: %clangxx_asan -O2 -DTEST_MEMCPY_SIZE_OVERFLOW %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_asan -O2 -DTEST_MEMCPY_SIZE_OVERFLOW %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-MEMCPY_SIZE_OVERFLOW #include Index: test/asan/TestCases/mmap_limit_mb.cc =================================================================== --- test/asan/TestCases/mmap_limit_mb.cc +++ test/asan/TestCases/mmap_limit_mb.cc @@ -1,12 +1,12 @@ // Test the mmap_limit_mb flag. // // RUN: %clangxx_asan -O2 %s -o %t -// RUN: %t 100 16 -// RUN: %t 100 1000000 -// RUN: ASAN_OPTIONS=mmap_limit_mb=500 %t 50 16 -// RUN: ASAN_OPTIONS=mmap_limit_mb=500 %t 50 1000000 -// RUN: ASAN_OPTIONS=mmap_limit_mb=500 not %t 500 16 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=mmap_limit_mb=500 not %t 500 1000000 2>&1 | FileCheck %s +// RUN: %run %t 100 16 +// RUN: %run %t 100 1000000 +// RUN: ASAN_OPTIONS=mmap_limit_mb=500 %run %t 50 16 +// RUN: ASAN_OPTIONS=mmap_limit_mb=500 %run %t 50 1000000 +// RUN: ASAN_OPTIONS=mmap_limit_mb=500 not %run %t 500 16 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=mmap_limit_mb=500 not %run %t 500 1000000 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/null_deref.cc =================================================================== --- test/asan/TestCases/null_deref.cc +++ test/asan/TestCases/null_deref.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK __attribute__((noinline)) static void NullDeref(int *ptr) { Index: test/asan/TestCases/on_error_callback.cc =================================================================== --- test/asan/TestCases/on_error_callback.cc +++ test/asan/TestCases/on_error_callback.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/partial_right.cc =================================================================== --- test/asan/TestCases/partial_right.cc +++ test/asan/TestCases/partial_right.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include int main(int argc, char **argv) { Index: test/asan/TestCases/poison_partial.cc =================================================================== --- test/asan/TestCases/poison_partial.cc +++ test/asan/TestCases/poison_partial.cc @@ -1,8 +1,8 @@ // RUN: %clangxx_asan -O0 %s -o %t -// RUN: not %t 2>&1 | FileCheck %s -// RUN: not %t heap 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=poison_partial=0 %t -// RUN: ASAN_OPTIONS=poison_partial=0 %t heap +// RUN: not %run %t 2>&1 | FileCheck %s +// RUN: not %run %t heap 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=poison_partial=0 %run %t +// RUN: ASAN_OPTIONS=poison_partial=0 %run %t heap #include char g[21]; char *x; Index: test/asan/TestCases/print-stack-trace.cc =================================================================== --- test/asan/TestCases/print-stack-trace.cc +++ test/asan/TestCases/print-stack-trace.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s #include Index: test/asan/TestCases/print_summary.cc =================================================================== --- test/asan/TestCases/print_summary.cc +++ test/asan/TestCases/print_summary.cc @@ -1,6 +1,6 @@ // RUN: %clangxx_asan -O0 %s -o %t -// RUN: not %t 2>&1 | FileCheck %s --check-prefix=YES -// RUN: ASAN_OPTIONS=print_summary=false not %t 2>&1 | FileCheck %s --check-prefix=NO +// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=YES +// RUN: ASAN_OPTIONS=print_summary=false not %run %t 2>&1 | FileCheck %s --check-prefix=NO int main() { char *x = new char[20]; Index: test/asan/TestCases/printf-1.c =================================================================== --- test/asan/TestCases/printf-1.c +++ test/asan/TestCases/printf-1.c @@ -1,7 +1,7 @@ // RUN: %clang_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS=check_printf=1 %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=check_printf=0 %t 2>&1 | FileCheck %s -// RUN: %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=check_printf=1 %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=check_printf=0 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include int main() { Index: test/asan/TestCases/printf-2.c =================================================================== --- test/asan/TestCases/printf-2.c +++ test/asan/TestCases/printf-2.c @@ -1,9 +1,9 @@ // RUN: %clang_asan -O2 %s -o %t // We need replace_str=0 and replace_intrin=0 to avoid reporting errors in // strlen() and memcpy() called by printf(). -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s #include #include Index: test/asan/TestCases/printf-3.c =================================================================== --- test/asan/TestCases/printf-3.c +++ test/asan/TestCases/printf-3.c @@ -1,7 +1,7 @@ // RUN: %clang_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS=check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s -// RUN: ASAN_OPTIONS=check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: 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 #include int main() { Index: test/asan/TestCases/printf-4.c =================================================================== --- test/asan/TestCases/printf-4.c +++ test/asan/TestCases/printf-4.c @@ -1,9 +1,9 @@ // RUN: %clang_asan -O2 %s -o %t // We need replace_str=0 and replace_intrin=0 to avoid reporting errors in // strlen() and memcpy() called by puts(). -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s #include int main() { Index: test/asan/TestCases/printf-5.c =================================================================== --- test/asan/TestCases/printf-5.c +++ test/asan/TestCases/printf-5.c @@ -1,8 +1,8 @@ // RUN: %clang_asan -O2 %s -o %t // We need replace_intrin=0 to avoid reporting errors in memcpy. -// RUN: ASAN_OPTIONS=replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s -// RUN: ASAN_OPTIONS=replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: ASAN_OPTIONS=replace_intrin=0 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s #include #include Index: test/asan/TestCases/readv.cc =================================================================== --- test/asan/TestCases/readv.cc +++ test/asan/TestCases/readv.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %s -o %t && %t -// RUN: %clangxx_asan -O0 %s -DPOSITIVE -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t +// RUN: %clangxx_asan -O0 %s -DPOSITIVE -o %t && not %run %t 2>&1 | FileCheck %s // Test the readv() interceptor. Index: test/asan/TestCases/sanity_check_pure_c.c =================================================================== --- test/asan/TestCases/sanity_check_pure_c.c +++ test/asan/TestCases/sanity_check_pure_c.c @@ -1,10 +1,10 @@ // Sanity checking a test in pure C. // RUN: %clang_asan -O2 %s -o %t -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s // Sanity checking a test in pure C with -pie. // RUN: %clang_asan -O2 %s -pie -fPIE -o %t -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include int main() { Index: test/asan/TestCases/shared-lib-test.cc =================================================================== --- test/asan/TestCases/shared-lib-test.cc +++ test/asan/TestCases/shared-lib-test.cc @@ -1,11 +1,11 @@ // RUN: %clangxx_asan -O0 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O0 %s -ldl -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -ldl -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O1 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O1 %s -ldl -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -ldl -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O2 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O2 %s -ldl -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -ldl -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O3 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so -// RUN: %clangxx_asan -O3 %s -ldl -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -ldl -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/sleep_before_dying.c =================================================================== --- test/asan/TestCases/sleep_before_dying.c +++ test/asan/TestCases/sleep_before_dying.c @@ -1,5 +1,5 @@ // RUN: %clang_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS="sleep_before_dying=1" not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS="sleep_before_dying=1" not %run %t 2>&1 | FileCheck %s #include int main() { Index: test/asan/TestCases/stack-buffer-overflow-with-position.cc =================================================================== --- test/asan/TestCases/stack-buffer-overflow-with-position.cc +++ test/asan/TestCases/stack-buffer-overflow-with-position.cc @@ -1,18 +1,18 @@ // RUN: %clangxx_asan -O2 %s -o %t -// RUN: not %t -2 2>&1 | FileCheck --check-prefix=CHECK-m2 %s -// RUN: not %t -1 2>&1 | FileCheck --check-prefix=CHECK-m1 %s -// RUN: %t 0 -// RUN: %t 8 -// RUN: not %t 9 2>&1 | FileCheck --check-prefix=CHECK-9 %s -// RUN: not %t 10 2>&1 | FileCheck --check-prefix=CHECK-10 %s -// RUN: not %t 30 2>&1 | FileCheck --check-prefix=CHECK-30 %s -// RUN: not %t 31 2>&1 | FileCheck --check-prefix=CHECK-31 %s -// RUN: not %t 41 2>&1 | FileCheck --check-prefix=CHECK-41 %s -// RUN: not %t 42 2>&1 | FileCheck --check-prefix=CHECK-42 %s -// RUN: not %t 62 2>&1 | FileCheck --check-prefix=CHECK-62 %s -// RUN: not %t 63 2>&1 | FileCheck --check-prefix=CHECK-63 %s -// RUN: not %t 73 2>&1 | FileCheck --check-prefix=CHECK-73 %s -// RUN: not %t 74 2>&1 | FileCheck --check-prefix=CHECK-74 %s +// RUN: not %run %t -2 2>&1 | FileCheck --check-prefix=CHECK-m2 %s +// RUN: not %run %t -1 2>&1 | FileCheck --check-prefix=CHECK-m1 %s +// RUN: %run %t 0 +// RUN: %run %t 8 +// RUN: not %run %t 9 2>&1 | FileCheck --check-prefix=CHECK-9 %s +// RUN: not %run %t 10 2>&1 | FileCheck --check-prefix=CHECK-10 %s +// RUN: not %run %t 30 2>&1 | FileCheck --check-prefix=CHECK-30 %s +// RUN: not %run %t 31 2>&1 | FileCheck --check-prefix=CHECK-31 %s +// RUN: not %run %t 41 2>&1 | FileCheck --check-prefix=CHECK-41 %s +// RUN: not %run %t 42 2>&1 | FileCheck --check-prefix=CHECK-42 %s +// RUN: not %run %t 62 2>&1 | FileCheck --check-prefix=CHECK-62 %s +// RUN: not %run %t 63 2>&1 | FileCheck --check-prefix=CHECK-63 %s +// RUN: not %run %t 73 2>&1 | FileCheck --check-prefix=CHECK-73 %s +// RUN: not %run %t 74 2>&1 | FileCheck --check-prefix=CHECK-74 %s #include #include #include Index: test/asan/TestCases/stack-buffer-overflow.cc =================================================================== --- test/asan/TestCases/stack-buffer-overflow.cc +++ test/asan/TestCases/stack-buffer-overflow.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include int main(int argc, char **argv) { Index: test/asan/TestCases/stack-frame-demangle.cc =================================================================== --- test/asan/TestCases/stack-frame-demangle.cc +++ test/asan/TestCases/stack-frame-demangle.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s #include Index: test/asan/TestCases/stack-oob-frames.cc =================================================================== --- test/asan/TestCases/stack-oob-frames.cc +++ test/asan/TestCases/stack-oob-frames.cc @@ -1,8 +1,8 @@ // RUN: %clangxx_asan -O1 %s -o %t -// RUN: not %t 0 2>&1 | FileCheck %s --check-prefix=CHECK0 -// RUN: not %t 1 2>&1 | FileCheck %s --check-prefix=CHECK1 -// RUN: not %t 2 2>&1 | FileCheck %s --check-prefix=CHECK2 -// RUN: not %t 3 2>&1 | FileCheck %s --check-prefix=CHECK3 +// RUN: not %run %t 0 2>&1 | FileCheck %s --check-prefix=CHECK0 +// RUN: not %run %t 1 2>&1 | FileCheck %s --check-prefix=CHECK1 +// RUN: not %run %t 2 2>&1 | FileCheck %s --check-prefix=CHECK2 +// RUN: not %run %t 3 2>&1 | FileCheck %s --check-prefix=CHECK3 #define NOINLINE __attribute__((noinline)) inline void break_optimization(void *arg) { Index: test/asan/TestCases/stack-overflow.cc =================================================================== --- test/asan/TestCases/stack-overflow.cc +++ test/asan/TestCases/stack-overflow.cc @@ -1,19 +1,19 @@ // Test ASan detection of stack-overflow condition. -// RUN: %clangxx_asan -O0 %s -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O0 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O0 %s -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O0 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O0 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O0 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s -// RUN: not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/stack-use-after-return.cc =================================================================== --- test/asan/TestCases/stack-use-after-return.cc +++ test/asan/TestCases/stack-use-after-return.cc @@ -1,19 +1,19 @@ // RUN: export ASAN_OPTIONS=detect_stack_use_after_return=1 -// RUN: %clangxx_asan -O0 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %t +// RUN: %clangxx_asan -O0 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %run %t // Regression test for a CHECK failure with small stack size and large frame. -// RUN: %clangxx_asan -O3 %s -lpthread -o %t -DkSize=10000 -DUseThread -DkStackSize=65536 && not %t 2>&1 | FileCheck --check-prefix=THREAD %s +// RUN: %clangxx_asan -O3 %s -lpthread -o %t -DkSize=10000 -DUseThread -DkStackSize=65536 && not %run %t 2>&1 | FileCheck --check-prefix=THREAD %s // // Test that we can find UAR in a thread other than main: -// RUN: %clangxx_asan -DUseThread -O2 %s -lpthread -o %t && not %t 2>&1 | FileCheck --check-prefix=THREAD %s +// RUN: %clangxx_asan -DUseThread -O2 %s -lpthread -o %t && not %run %t 2>&1 | FileCheck --check-prefix=THREAD %s // // Test the max_uar_stack_size_log/min_uar_stack_size_log flag. // -// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:max_uar_stack_size_log=20:verbosity=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-20 %s -// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:min_uar_stack_size_log=24:max_uar_stack_size_log=24:verbosity=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-24 %s +// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:max_uar_stack_size_log=20:verbosity=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-20 %s +// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:min_uar_stack_size_log=24:max_uar_stack_size_log=24:verbosity=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-24 %s #include #include Index: test/asan/TestCases/start-deactivated.cc =================================================================== --- test/asan/TestCases/start-deactivated.cc +++ test/asan/TestCases/start-deactivated.cc @@ -5,7 +5,7 @@ // RUN: %clangxx_asan -O0 %p/SharedLibs/start-deactivated-so.cc -fPIC -shared -o %t-so.so // RUN: %clangxx -O0 %s -c -o %t.o // RUN: %clangxx_asan -O0 %t.o -ldl -o %t -// RUN: ASAN_OPTIONS=start_deactivated=1 not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=start_deactivated=1 not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/strdup_oob_test.cc =================================================================== --- test/asan/TestCases/strdup_oob_test.cc +++ test/asan/TestCases/strdup_oob_test.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include Index: test/asan/TestCases/strerror_r_test.cc =================================================================== --- test/asan/TestCases/strerror_r_test.cc +++ test/asan/TestCases/strerror_r_test.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -o %t && %t +// RUN: %clangxx_asan -O0 %s -o %t && %run %t // Regression test for PR17138. Index: test/asan/TestCases/strip_path_prefix.c =================================================================== --- test/asan/TestCases/strip_path_prefix.c +++ test/asan/TestCases/strip_path_prefix.c @@ -1,5 +1,5 @@ // RUN: %clang_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS="strip_path_prefix='/'" not %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS="strip_path_prefix='/'" not %run %t 2>&1 | FileCheck %s #include int main() { Index: test/asan/TestCases/strncpy-overflow.cc =================================================================== --- test/asan/TestCases/strncpy-overflow.cc +++ test/asan/TestCases/strncpy-overflow.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK // REQUIRES: compiler-rt-optimized Index: test/asan/TestCases/throw_call_test.cc =================================================================== --- test/asan/TestCases/throw_call_test.cc +++ test/asan/TestCases/throw_call_test.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_asan %s -o %t && %t +// RUN: %clangxx_asan %s -o %t && %run %t // http://code.google.com/p/address-sanitizer/issues/detail?id=147 (not fixed). -// BROKEN: %clangxx_asan %s -o %t -static-libstdc++ && %t +// BROKEN: %clangxx_asan %s -o %t -static-libstdc++ && %run %t // // Android builds with static libstdc++ by default. // XFAIL: android Index: test/asan/TestCases/throw_catch.cc =================================================================== --- test/asan/TestCases/throw_catch.cc +++ test/asan/TestCases/throw_catch.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O %s -o %t && %t +// RUN: %clangxx_asan -O %s -o %t && %run %t #include #include Index: test/asan/TestCases/throw_invoke_test.cc =================================================================== --- test/asan/TestCases/throw_invoke_test.cc +++ test/asan/TestCases/throw_invoke_test.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan %s -o %t && %t -// RUN: %clangxx_asan %s -o %t -static-libstdc++ && %t +// RUN: %clangxx_asan %s -o %t && %run %t +// RUN: %clangxx_asan %s -o %t -static-libstdc++ && %run %t #include static volatile int zero = 0; inline void pretend_to_do_something(void *x) { Index: test/asan/TestCases/time_interceptor.cc =================================================================== --- test/asan/TestCases/time_interceptor.cc +++ test/asan/TestCases/time_interceptor.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s // Test the time() interceptor. Index: test/asan/TestCases/uar_and_exceptions.cc =================================================================== --- test/asan/TestCases/uar_and_exceptions.cc +++ test/asan/TestCases/uar_and_exceptions.cc @@ -1,6 +1,6 @@ // Test that use-after-return works with exceptions. // export ASAN_OPTIONS=detect_stack_use_after_return=1 -// RUN: %clangxx_asan -O0 %s -o %t && %t +// RUN: %clangxx_asan -O0 %s -o %t && %run %t #include Index: test/asan/TestCases/unaligned_loads_and_stores.cc =================================================================== --- test/asan/TestCases/unaligned_loads_and_stores.cc +++ test/asan/TestCases/unaligned_loads_and_stores.cc @@ -1,15 +1,15 @@ // RUN: %clangxx_asan -O0 %s -o %t -// RUN: not %t A 2>&1 | FileCheck --check-prefix=CHECK-A %s -// RUN: not %t B 2>&1 | FileCheck --check-prefix=CHECK-B %s -// RUN: not %t C 2>&1 | FileCheck --check-prefix=CHECK-C %s -// RUN: not %t D 2>&1 | FileCheck --check-prefix=CHECK-D %s -// RUN: not %t E 2>&1 | FileCheck --check-prefix=CHECK-E %s +// RUN: not %run %t A 2>&1 | FileCheck --check-prefix=CHECK-A %s +// RUN: not %run %t B 2>&1 | FileCheck --check-prefix=CHECK-B %s +// RUN: not %run %t C 2>&1 | FileCheck --check-prefix=CHECK-C %s +// RUN: not %run %t D 2>&1 | FileCheck --check-prefix=CHECK-D %s +// RUN: not %run %t E 2>&1 | FileCheck --check-prefix=CHECK-E %s -// RUN: not %t K 2>&1 | FileCheck --check-prefix=CHECK-K %s -// RUN: not %t L 2>&1 | FileCheck --check-prefix=CHECK-L %s -// RUN: not %t M 2>&1 | FileCheck --check-prefix=CHECK-M %s -// RUN: not %t N 2>&1 | FileCheck --check-prefix=CHECK-N %s -// RUN: not %t O 2>&1 | FileCheck --check-prefix=CHECK-O %s +// RUN: not %run %t K 2>&1 | FileCheck --check-prefix=CHECK-K %s +// RUN: not %run %t L 2>&1 | FileCheck --check-prefix=CHECK-L %s +// RUN: not %run %t M 2>&1 | FileCheck --check-prefix=CHECK-M %s +// RUN: not %run %t N 2>&1 | FileCheck --check-prefix=CHECK-N %s +// RUN: not %run %t O 2>&1 | FileCheck --check-prefix=CHECK-O %s #include Index: test/asan/TestCases/use-after-delete.cc =================================================================== --- test/asan/TestCases/use-after-delete.cc +++ test/asan/TestCases/use-after-delete.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK #include int main() { Index: test/asan/TestCases/use-after-free-right.cc =================================================================== --- test/asan/TestCases/use-after-free-right.cc +++ test/asan/TestCases/use-after-free-right.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK // Test use-after-free report in the case when access is at the right border of // the allocation. Index: test/asan/TestCases/use-after-free.cc =================================================================== --- test/asan/TestCases/use-after-free.cc +++ test/asan/TestCases/use-after-free.cc @@ -1,7 +1,7 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK #include int main() { Index: test/asan/TestCases/use-after-poison.cc =================================================================== --- test/asan/TestCases/use-after-poison.cc +++ test/asan/TestCases/use-after-poison.cc @@ -1,8 +1,8 @@ // Check that __asan_poison_memory_region works. -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s // // Check that we can disable it -// RUN: ASAN_OPTIONS=allow_user_poisoning=0 %t +// RUN: ASAN_OPTIONS=allow_user_poisoning=0 %run %t #include Index: test/asan/TestCases/use-after-scope-dtor-order.cc =================================================================== --- test/asan/TestCases/use-after-scope-dtor-order.cc +++ test/asan/TestCases/use-after-scope-dtor-order.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include struct IntHolder { Index: test/asan/TestCases/use-after-scope-inlined.cc =================================================================== --- test/asan/TestCases/use-after-scope-inlined.cc +++ test/asan/TestCases/use-after-scope-inlined.cc @@ -2,7 +2,7 @@ // happens. "always_inline" is not enough, as Clang doesn't emit // llvm.lifetime intrinsics at -O0. // -// RUN: %clangxx_asan -O2 -fsanitize=use-after-scope %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 -fsanitize=use-after-scope %s -o %t && not %run %t 2>&1 | FileCheck %s int *arr; Index: test/asan/TestCases/use-after-scope-nobug.cc =================================================================== --- test/asan/TestCases/use-after-scope-nobug.cc +++ test/asan/TestCases/use-after-scope-nobug.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && %t +// RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && %run %t #include Index: test/asan/TestCases/use-after-scope-temp.cc =================================================================== --- test/asan/TestCases/use-after-scope-temp.cc +++ test/asan/TestCases/use-after-scope-temp.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \ -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s // // Lifetime for temporaries is not emitted yet. // XFAIL: * Index: test/asan/TestCases/use-after-scope.cc =================================================================== --- test/asan/TestCases/use-after-scope.cc +++ test/asan/TestCases/use-after-scope.cc @@ -1,6 +1,6 @@ // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS="detect_stack_use_after_return=1" not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS="detect_stack_use_after_return=1" not %run %t 2>&1 | FileCheck %s int main() { int *p = 0; Index: test/asan/TestCases/wait.cc =================================================================== --- test/asan/TestCases/wait.cc +++ test/asan/TestCases/wait.cc @@ -1,20 +1,20 @@ -// RUN: %clangxx_asan -DWAIT -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAITPID -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAITPID -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAITPID -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAITPID -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT3 -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT3 -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT3 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT3 -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT4 -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT4 -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT4 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT4 -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT3_RUSAGE -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT3_RUSAGE -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT3_RUSAGE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT3_RUSAGE -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT4_RUSAGE -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -DWAIT4_RUSAGE -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT4_RUSAGE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -DWAIT4_RUSAGE -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/asan/TestCases/waitid.cc =================================================================== --- test/asan/TestCases/waitid.cc +++ test/asan/TestCases/waitid.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/dfsan/basic.c =================================================================== --- test/dfsan/basic.c +++ test/dfsan/basic.c @@ -1,5 +1,5 @@ -// RUN: %clang_dfsan -m64 %s -o %t && %t -// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %t +// RUN: %clang_dfsan -m64 %s -o %t && %run %t +// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %run %t // Tests that labels are propagated through loads and stores. Index: test/dfsan/custom.c =================================================================== --- test/dfsan/custom.c +++ test/dfsan/custom.c @@ -1,7 +1,7 @@ -// RUN: %clang_dfsan -m64 %s -o %t && DFSAN_OPTIONS="strict_data_dependencies=0" %t -// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && DFSAN_OPTIONS="strict_data_dependencies=0" %t -// RUN: %clang_dfsan -DSTRICT_DATA_DEPENDENCIES -m64 %s -o %t && %t -// RUN: %clang_dfsan -DSTRICT_DATA_DEPENDENCIES -mllvm -dfsan-args-abi -m64 %s -o %t && %t +// RUN: %clang_dfsan -m64 %s -o %t && DFSAN_OPTIONS="strict_data_dependencies=0" %run %t +// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && DFSAN_OPTIONS="strict_data_dependencies=0" %run %t +// RUN: %clang_dfsan -DSTRICT_DATA_DEPENDENCIES -m64 %s -o %t && %run %t +// RUN: %clang_dfsan -DSTRICT_DATA_DEPENDENCIES -mllvm -dfsan-args-abi -m64 %s -o %t && %run %t // Tests custom implementations of various glibc functions. Index: test/dfsan/flags.c =================================================================== --- test/dfsan/flags.c +++ test/dfsan/flags.c @@ -1,6 +1,6 @@ -// RUN: %clang_dfsan -m64 %s -fsanitize-blacklist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && %t 2>&1 | FileCheck %s -// RUN: %clang_dfsan -m64 %s -fsanitize-blacklist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && DFSAN_OPTIONS=warn_unimplemented=0 %t 2>&1 | count 0 -// RUN: %clang_dfsan -m64 %s -fsanitize-blacklist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && DFSAN_OPTIONS=warn_nonzero_labels=1 %t 2>&1 | FileCheck --check-prefix=CHECK-NONZERO %s +// RUN: %clang_dfsan -m64 %s -fsanitize-blacklist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clang_dfsan -m64 %s -fsanitize-blacklist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && DFSAN_OPTIONS=warn_unimplemented=0 %run %t 2>&1 | count 0 +// RUN: %clang_dfsan -m64 %s -fsanitize-blacklist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && DFSAN_OPTIONS=warn_nonzero_labels=1 %run %t 2>&1 | FileCheck --check-prefix=CHECK-NONZERO %s // Tests that flags work correctly. Index: test/dfsan/fncall.c =================================================================== --- test/dfsan/fncall.c +++ test/dfsan/fncall.c @@ -1,5 +1,5 @@ -// RUN: %clang_dfsan -m64 %s -o %t && %t -// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %t +// RUN: %clang_dfsan -m64 %s -o %t && %run %t +// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %run %t // Tests that labels are propagated through function calls. Index: test/dfsan/label_count.c =================================================================== --- test/dfsan/label_count.c +++ test/dfsan/label_count.c @@ -1,12 +1,12 @@ // RUN: %clang_dfsan -DLIB -m64 -c %s -o %t.lib.o && \ // RUN: %clang_dfsan -m64 -c %s -o %t.o && \ // RUN: %clang_dfsan -m64 %t.lib.o %t.o -o %t.bin && \ -// RUN: %t.bin +// RUN: %run %t.bin // RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 -DLIB -c %s -o %t.lib.o && \ // RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 -c %s -o %t.o && \ // RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %t.o %t.lib.o -o %t.bin && \ -// RUN: %t.bin +// RUN: %run %t.bin #include #include Index: test/dfsan/propagate.c =================================================================== --- test/dfsan/propagate.c +++ test/dfsan/propagate.c @@ -1,5 +1,5 @@ -// RUN: %clang_dfsan -m64 %s -o %t && %t -// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %t +// RUN: %clang_dfsan -m64 %s -o %t && %run %t +// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %run %t // Tests that labels are propagated through computation and that union labels // are properly created. Index: test/dfsan/write_callback.c =================================================================== --- test/dfsan/write_callback.c +++ test/dfsan/write_callback.c @@ -1,5 +1,5 @@ -// RUN: %clang_dfsan -m64 %s -o %t && %t | FileCheck %s -// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %t | FileCheck %s +// RUN: %clang_dfsan -m64 %s -o %t && %run %t | FileCheck %s +// RUN: %clang_dfsan -mllvm -dfsan-args-abi -m64 %s -o %t && %run %t | FileCheck %s // Tests that the custom implementation of write() does writes with or without // a callback set using dfsan_set_write_callback(). Index: test/lsan/TestCases/cleanup_in_tsd_destructor.cc =================================================================== --- test/lsan/TestCases/cleanup_in_tsd_destructor.cc +++ test/lsan/TestCases/cleanup_in_tsd_destructor.cc @@ -5,8 +5,8 @@ // makes its best effort. // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:use_tls=1 %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:use_tls=0 not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:use_tls=1 %run %t +// RUN: LSAN_OPTIONS=$LSAN_BASE:use_tls=0 not %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/disabler.cc =================================================================== --- test/lsan/TestCases/disabler.cc +++ test/lsan/TestCases/disabler.cc @@ -1,7 +1,7 @@ // Test for ScopedDisabler. // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/disabler_in_tsd_destructor.cc =================================================================== --- test/lsan/TestCases/disabler_in_tsd_destructor.cc +++ test/lsan/TestCases/disabler_in_tsd_destructor.cc @@ -1,7 +1,7 @@ // Regression test. Disabler should not depend on TSD validity. // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=1" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE %t +// RUN: LSAN_OPTIONS=$LSAN_BASE %run %t #include #include Index: test/lsan/TestCases/do_leak_check_override.cc =================================================================== --- test/lsan/TestCases/do_leak_check_override.cc +++ test/lsan/TestCases/do_leak_check_override.cc @@ -3,8 +3,8 @@ // "normal" mode (LSan runs in "strict" mode by default). // RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s #include #include Index: test/lsan/TestCases/fork.cc =================================================================== --- test/lsan/TestCases/fork.cc +++ test/lsan/TestCases/fork.cc @@ -1,6 +1,6 @@ // Test that thread local data is handled correctly after forking without exec(). // RUN: %clangxx_lsan %s -o %t -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 #include #include Index: test/lsan/TestCases/fork_threaded.cc =================================================================== --- test/lsan/TestCases/fork_threaded.cc +++ test/lsan/TestCases/fork_threaded.cc @@ -1,7 +1,7 @@ // Test that thread local data is handled correctly after forking without // exec(). In this test leak checking is initiated from a non-main thread. // RUN: %clangxx_lsan %s -o %t -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 #include #include Index: test/lsan/TestCases/high_allocator_contention.cc =================================================================== --- test/lsan/TestCases/high_allocator_contention.cc +++ test/lsan/TestCases/high_allocator_contention.cc @@ -1,7 +1,7 @@ // A benchmark that executes malloc/free pairs in parallel. // Usage: ./a.out number_of_threads total_number_of_allocations // RUN: %clangxx_lsan %s -o %t -// RUN: %t 5 1000000 2>&1 +// RUN: %run %t 5 1000000 2>&1 #include #include #include Index: test/lsan/TestCases/ignore_object.cc =================================================================== --- test/lsan/TestCases/ignore_object.cc +++ test/lsan/TestCases/ignore_object.cc @@ -1,7 +1,7 @@ // Test for __lsan_ignore_object(). // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:verbosity=2" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE ASAN_OPTIONS=$ASAN_OPTIONS:"verbosity=2" not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE ASAN_OPTIONS=$ASAN_OPTIONS:"verbosity=2" not %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/ignore_object_errors.cc =================================================================== --- test/lsan/TestCases/ignore_object_errors.cc +++ test/lsan/TestCases/ignore_object_errors.cc @@ -1,7 +1,7 @@ // Test for incorrect use of __lsan_ignore_object(). // RUN: LSAN_BASE="verbosity=2" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE ASAN_OPTIONS=$ASAN_OPTIONS:verbosity=2 %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE ASAN_OPTIONS=$ASAN_OPTIONS:verbosity=2 %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/large_allocation_leak.cc =================================================================== --- test/lsan/TestCases/large_allocation_leak.cc +++ test/lsan/TestCases/large_allocation_leak.cc @@ -1,7 +1,7 @@ // Test that LargeMmapAllocator's chunks aren't reachable via some internal data structure. // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/leak_check_at_exit.cc =================================================================== --- test/lsan/TestCases/leak_check_at_exit.cc +++ test/lsan/TestCases/leak_check_at_exit.cc @@ -1,10 +1,10 @@ // Test for the leak_check_at_exit flag. // RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: LSAN_OPTIONS=$LSAN_BASE:"leak_check_at_exit=0" ASAN_OPTIONS="$ASAN_OPTIONS:leak_check_at_exit=0" not %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: LSAN_OPTIONS=%LSAN_BASE:"leak_check_at_exit=0" ASAN_OPTIONS="$ASAN_OPTIONS:leak_check_at_exit=0" %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-do +// RUN: LSAN_OPTIONS=$LSAN_BASE:"leak_check_at_exit=0" ASAN_OPTIONS="$ASAN_OPTIONS:leak_check_at_exit=0" not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do +// RUN: LSAN_OPTIONS=%LSAN_BASE:"leak_check_at_exit=0" ASAN_OPTIONS="$ASAN_OPTIONS:leak_check_at_exit=0" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont #include #include Index: test/lsan/TestCases/link_turned_off.cc =================================================================== --- test/lsan/TestCases/link_turned_off.cc +++ test/lsan/TestCases/link_turned_off.cc @@ -1,8 +1,8 @@ // Test for disabling LSan at link-time. // RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE %run %t +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s #include Index: test/lsan/TestCases/new_array_with_dtor_0.cc =================================================================== --- test/lsan/TestCases/new_array_with_dtor_0.cc +++ test/lsan/TestCases/new_array_with_dtor_0.cc @@ -1,6 +1,6 @@ // Regression test: // https://code.google.com/p/address-sanitizer/issues/detail?id=257 -// RUN: %clangxx_lsan %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_lsan %s -o %t && %run %t 2>&1 | FileCheck %s #include Index: test/lsan/TestCases/pointer_to_self.cc =================================================================== --- test/lsan/TestCases/pointer_to_self.cc +++ test/lsan/TestCases/pointer_to_self.cc @@ -2,7 +2,7 @@ // object is indirectly leaked. Only external pointers count. // RUN: LSAN_BASE="report_objects=1:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/print_suppressions.cc =================================================================== --- test/lsan/TestCases/print_suppressions.cc +++ test/lsan/TestCases/print_suppressions.cc @@ -2,10 +2,10 @@ // matched. Default is print_suppressions=true. // RUN: LSAN_BASE="use_registers=0:use_stacks=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print -// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print -// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print -// RUN: LSAN_OPTIONS=$LSAN_BASE %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-print +// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: LSAN_OPTIONS=$LSAN_BASE %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: LSAN_OPTIONS=$LSAN_BASE %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-print #include #include Index: test/lsan/TestCases/register_root_region.cc =================================================================== --- test/lsan/TestCases/register_root_region.cc +++ test/lsan/TestCases/register_root_region.cc @@ -1,9 +1,9 @@ // Test for __lsan_(un)register_root_region(). // RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:use_root_regions=0 not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE %run %t +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:use_root_regions=0 not %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/stale_stack_leak.cc =================================================================== --- test/lsan/TestCases/stale_stack_leak.cc +++ test/lsan/TestCases/stale_stack_leak.cc @@ -1,8 +1,8 @@ // Test that out-of-scope local variables are ignored by LSan. // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=1" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE":exitcode=0" %t 2>&1 | FileCheck --check-prefix=CHECK-sanity %s +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE":exitcode=0" %run %t 2>&1 | FileCheck --check-prefix=CHECK-sanity %s #include #include Index: test/lsan/TestCases/suppressions_default.cc =================================================================== --- test/lsan/TestCases/suppressions_default.cc +++ test/lsan/TestCases/suppressions_default.cc @@ -1,6 +1,6 @@ // RUN: LSAN_BASE="use_registers=0:use_stacks=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/suppressions_file.cc =================================================================== --- test/lsan/TestCases/suppressions_file.cc +++ test/lsan/TestCases/suppressions_file.cc @@ -2,10 +2,10 @@ // RUN: %clangxx_lsan %s -o %t // RUN: echo "leak:*LSanTestLeakingFunc*" > %t.supp1 -// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions=%t.supp1 not %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions=%t.supp1 not %run %t 2>&1 | FileCheck %s // RUN: echo "leak:%t" > %t.supp2 -// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions="%t.supp2":symbolize=false %t +// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions="%t.supp2":symbolize=false %run %t #include #include Index: test/lsan/TestCases/swapcontext.cc =================================================================== --- test/lsan/TestCases/swapcontext.cc +++ test/lsan/TestCases/swapcontext.cc @@ -2,8 +2,8 @@ // memory. Make sure we don't report these leaks. // RUN: %clangxx_lsan %s -o %t -// RUN: %t 2>&1 -// RUN: not %t foo 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 +// RUN: not %run %t foo 2>&1 | FileCheck %s #include #include Index: test/lsan/TestCases/use_after_return.cc =================================================================== --- test/lsan/TestCases/use_after_return.cc +++ test/lsan/TestCases/use_after_return.cc @@ -2,9 +2,9 @@ // in the root set. // RUN: LSAN_BASE="report_objects=1:use_registers=0" // RUN: %clangxx_lsan %s -O2 -o %t -// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1 -// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 LSAN_OPTIONS="" %t 2>&1 +// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %run %t 2>&1 +// RUN: ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_globals_initialized.cc =================================================================== --- test/lsan/TestCases/use_globals_initialized.cc +++ test/lsan/TestCases/use_globals_initialized.cc @@ -1,9 +1,9 @@ // Test that initialized globals are included in the root set. // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_globals_uninitialized.cc =================================================================== --- test/lsan/TestCases/use_globals_uninitialized.cc +++ test/lsan/TestCases/use_globals_uninitialized.cc @@ -1,9 +1,9 @@ // Test that uninitialized globals are included in the root set. // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_poisoned_asan.cc =================================================================== --- test/lsan/TestCases/use_poisoned_asan.cc +++ test/lsan/TestCases/use_poisoned_asan.cc @@ -2,8 +2,8 @@ // REQUIRES: asan // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_poisoned=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_poisoned=1" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_poisoned=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_poisoned=1" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_registers.cc =================================================================== --- test/lsan/TestCases/use_registers.cc +++ test/lsan/TestCases/use_registers.cc @@ -1,9 +1,9 @@ // Test that registers of running threads are included in the root set. // RUN: LSAN_BASE="report_objects=1:use_stacks=0" // RUN: %clangxx_lsan -pthread %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_stacks.cc =================================================================== --- test/lsan/TestCases/use_stacks.cc +++ test/lsan/TestCases/use_stacks.cc @@ -1,9 +1,9 @@ // Test that stack of main thread is included in the root set. // RUN: LSAN_BASE="report_objects=1:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_stacks_threaded.cc =================================================================== --- test/lsan/TestCases/use_stacks_threaded.cc +++ test/lsan/TestCases/use_stacks_threaded.cc @@ -1,9 +1,9 @@ // Test that stacks of non-main threads are included in the root set. // RUN: LSAN_BASE="report_objects=1:use_registers=0" // RUN: %clangxx_lsan -pthread %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_tls_dynamic.cc =================================================================== --- test/lsan/TestCases/use_tls_dynamic.cc +++ test/lsan/TestCases/use_tls_dynamic.cc @@ -2,9 +2,9 @@ // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx %s -DBUILD_DSO -fPIC -shared -o %t-so.so // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #ifndef BUILD_DSO #include Index: test/lsan/TestCases/use_tls_pthread_specific_dynamic.cc =================================================================== --- test/lsan/TestCases/use_tls_pthread_specific_dynamic.cc +++ test/lsan/TestCases/use_tls_pthread_specific_dynamic.cc @@ -1,9 +1,9 @@ // Test that dynamically allocated thread-specific storage is included in the root set. // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_tls_pthread_specific_static.cc =================================================================== --- test/lsan/TestCases/use_tls_pthread_specific_static.cc +++ test/lsan/TestCases/use_tls_pthread_specific_static.cc @@ -1,9 +1,9 @@ // Test that statically allocated thread-specific storage is included in the root set. // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_tls_static.cc =================================================================== --- test/lsan/TestCases/use_tls_static.cc +++ test/lsan/TestCases/use_tls_static.cc @@ -1,9 +1,9 @@ // Test that statically allocated TLS space is included in the root set. // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1 -// RUN: LSAN_OPTIONS="" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: LSAN_OPTIONS="" %run %t 2>&1 #include #include Index: test/lsan/TestCases/use_unaligned.cc =================================================================== --- test/lsan/TestCases/use_unaligned.cc +++ test/lsan/TestCases/use_unaligned.cc @@ -1,8 +1,8 @@ // Test that unaligned pointers are detected correctly. // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=0" not %t 2>&1 | FileCheck %s -// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=1" %t 2>&1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=0" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=1" %run %t 2>&1 #include #include Index: test/msan/Linux/getresid.cc =================================================================== --- test/msan/Linux/getresid.cc +++ test/msan/Linux/getresid.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p 2>&1 -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t %p 2>&1 -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p 2>&1 #include #include Index: test/msan/Linux/glob.cc =================================================================== --- test/msan/Linux/glob.cc +++ test/msan/Linux/glob.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p 2>&1 | FileCheck %s -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t %p 2>&1 | FileCheck %s -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p 2>&1 | FileCheck %s #include #include Index: test/msan/Linux/glob_altdirfunc.cc =================================================================== --- test/msan/Linux/glob_altdirfunc.cc +++ test/msan/Linux/glob_altdirfunc.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p 2>&1 | FileCheck %s -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t %p 2>&1 | FileCheck %s -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t %p 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p 2>&1 | FileCheck %s #include #include Index: test/msan/Linux/glob_nomatch.cc =================================================================== --- test/msan/Linux/glob_nomatch.cc +++ test/msan/Linux/glob_nomatch.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p #include #include Index: test/msan/Linux/sunrpc.cc =================================================================== --- test/msan/Linux/sunrpc.cc +++ test/msan/Linux/sunrpc.cc @@ -1,15 +1,15 @@ // RUN: %clangxx_msan -m64 -g -O0 -DTYPE=int -DFN=xdr_int %s -o %t && \ -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 // RUN: %clangxx_msan -m64 -g -O0 -DTYPE=int -DFN=xdr_int -DUNINIT=1 %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_msan -m64 -g -O0 -DTYPE=double -DFN=xdr_double %s -o %t && \ -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 // RUN: %clangxx_msan -m64 -g -O0 -DTYPE=double -DFN=xdr_double -DUNINIT=1 %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_msan -m64 -g -O0 -DTYPE=u_quad_t -DFN=xdr_u_longlong_t %s -o %t && \ -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 // RUN: %clangxx_msan -m64 -g -O0 -DTYPE=u_quad_t -DFN=xdr_u_longlong_t -DUNINIT=1 %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include #include Index: test/msan/Linux/sunrpc_bytes.cc =================================================================== --- test/msan/Linux/sunrpc_bytes.cc +++ test/msan/Linux/sunrpc_bytes.cc @@ -1,7 +1,7 @@ // RUN: %clangxx_msan -m64 -g -O0 %s -o %t && \ -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 // RUN: %clangxx_msan -m64 -g -O0 -DUNINIT=1 %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include #include Index: test/msan/Linux/sunrpc_string.cc =================================================================== --- test/msan/Linux/sunrpc_string.cc +++ test/msan/Linux/sunrpc_string.cc @@ -1,7 +1,7 @@ // RUN: %clangxx_msan -m64 -g -O0 %s -o %t && \ -// RUN: %t 2>&1 +// RUN: %run %t 2>&1 // RUN: %clangxx_msan -m64 -g -O0 -DUNINIT=1 %s -o %t && \ -// RUN: not %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #include #include Index: test/msan/Linux/syscalls.cc =================================================================== --- test/msan/Linux/syscalls.cc +++ test/msan/Linux/syscalls.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t 2>&1 -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t 2>&1 #include #include Index: test/msan/Linux/tcgetattr.cc =================================================================== --- test/msan/Linux/tcgetattr.cc +++ test/msan/Linux/tcgetattr.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p #include #include Index: test/msan/Linux/xattr.cc =================================================================== --- test/msan/Linux/xattr.cc +++ test/msan/Linux/xattr.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p 2>&1 -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t %p 2>&1 -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p 2>&1 #include #include Index: test/msan/allocator_returns_null.cc =================================================================== --- test/msan/allocator_returns_null.cc +++ test/msan/allocator_returns_null.cc @@ -3,17 +3,17 @@ // With allocator_may_return_null=1 the allocator should return 0. // // RUN: %clangxx_msan -O0 %s -o %t -// RUN: not %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH -// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH -// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mNULL -// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH -// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cNULL -// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH -// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coNULL -// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH -// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rNULL -// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH -// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrNULL +// RUN: not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH +// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH +// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mNULL +// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH +// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cNULL +// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH +// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coNULL +// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH +// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rNULL +// RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH +// RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrNULL #include #include Index: test/msan/backtrace.cc =================================================================== --- test/msan/backtrace.cc +++ test/msan/backtrace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/c-strdup.c =================================================================== --- test/msan/c-strdup.c +++ test/msan/c-strdup.c @@ -1,7 +1,7 @@ -// RUN: %clang_msan -m64 -O0 %s -o %t && %t >%t.out 2>&1 -// RUN: %clang_msan -m64 -O1 %s -o %t && %t >%t.out 2>&1 -// RUN: %clang_msan -m64 -O2 %s -o %t && %t >%t.out 2>&1 -// RUN: %clang_msan -m64 -O3 %s -o %t && %t >%t.out 2>&1 +// RUN: %clang_msan -m64 -O0 %s -o %t && %run %t >%t.out 2>&1 +// RUN: %clang_msan -m64 -O1 %s -o %t && %run %t >%t.out 2>&1 +// RUN: %clang_msan -m64 -O2 %s -o %t && %run %t >%t.out 2>&1 +// RUN: %clang_msan -m64 -O3 %s -o %t && %run %t >%t.out 2>&1 // Test that strdup in C programs is intercepted. // GLibC headers translate strdup to __strdup at -O1 and higher. Index: test/msan/chained_origin.cc =================================================================== --- test/msan/chained_origin.cc +++ test/msan/chained_origin.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O3 %s -o %t && \ -// RUN: not %t >%t.out 2>&1 +// RUN: not %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-STACK < %t.out // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -DHEAP=1 -m64 -O3 %s -o %t && \ -// RUN: not %t >%t.out 2>&1 +// RUN: not %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-HEAP < %t.out #include Index: test/msan/chained_origin_memcpy.cc =================================================================== --- test/msan/chained_origin_memcpy.cc +++ test/msan/chained_origin_memcpy.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -DOFFSET=0 -O3 %s -o %t && \ -// RUN: not %t >%t.out 2>&1 +// RUN: not %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-Z1 < %t.out // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -DOFFSET=10 -m64 -O3 %s -o %t && \ -// RUN: not %t >%t.out 2>&1 +// RUN: not %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-Z2 < %t.out #include Index: test/msan/chained_origin_with_signals.cc =================================================================== --- test/msan/chained_origin_with_signals.cc +++ test/msan/chained_origin_with_signals.cc @@ -3,7 +3,7 @@ // implementation being not async-signal-safe. // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O3 %s -o %t && \ -// RUN: not %t >%t.out 2>&1 +// RUN: not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out #include Index: test/msan/check_mem_is_initialized.cc =================================================================== --- test/msan/check_mem_is_initialized.cc +++ test/msan/check_mem_is_initialized.cc @@ -1,19 +1,19 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out #include Index: test/msan/cxa_atexit.cc =================================================================== --- test/msan/cxa_atexit.cc +++ test/msan/cxa_atexit.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p // PR17377: C++ module destructors get stale argument shadow. Index: test/msan/death-callback.cc =================================================================== --- test/msan/death-callback.cc +++ test/msan/death-callback.cc @@ -1,10 +1,10 @@ -// RUN: %clangxx_msan -m64 -DERROR %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_msan -m64 -DERROR %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCB -// RUN: %clangxx_msan -m64 -DERROR -DMSANCB_SET %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_msan -m64 -DERROR -DMSANCB_SET %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CB -// RUN: %clangxx_msan -m64 -DERROR -DMSANCB_SET -DMSANCB_CLEAR %s -o %t && not %t 2>&1 | \ +// RUN: %clangxx_msan -m64 -DERROR -DMSANCB_SET -DMSANCB_CLEAR %s -o %t && not %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCB -// RUN: %clangxx_msan -m64 -DMSANCB_SET %s -o %t && %t 2>&1 | \ +// RUN: %clangxx_msan -m64 -DMSANCB_SET %s -o %t && %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCB #include Index: test/msan/dlerror.cc =================================================================== --- test/msan/dlerror.cc +++ test/msan/dlerror.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/dso-origin.cc =================================================================== --- test/msan/dso-origin.cc +++ test/msan/dso-origin.cc @@ -2,7 +2,7 @@ // Test that origin tracking is enabled at runtime. // RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %p/SharedLibs/dso-origin-so.cc \ // RUN: -fPIC -shared -o %t-so.so -// RUN: %clangxx_msan -m64 -O0 %s %t-so.so -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 %s %t-so.so -o %t && not %run %t 2>&1 | FileCheck %s #include Index: test/msan/dtls_test.c =================================================================== --- test/msan/dtls_test.c +++ test/msan/dtls_test.c @@ -1,6 +1,6 @@ /* RUN: %clang_msan -m64 %s -o %t RUN: %clang_msan -m64 %s -DBUILD_SO -fPIC -o %t-so.so -shared - RUN: not %t 2>&1 | FileCheck %s + RUN: not %run %t 2>&1 | FileCheck %s CHECK: MemorySanitizer: use-of-uninitialized-value This is an actual bug in msan/glibc integration, Index: test/msan/errno.cc =================================================================== --- test/msan/errno.cc +++ test/msan/errno.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/ftime.cc =================================================================== --- test/msan/ftime.cc +++ test/msan/ftime.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t #include #include Index: test/msan/getaddrinfo-positive.cc =================================================================== --- test/msan/getaddrinfo-positive.cc +++ test/msan/getaddrinfo-positive.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out #include Index: test/msan/getaddrinfo.cc =================================================================== --- test/msan/getaddrinfo.cc +++ test/msan/getaddrinfo.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/getc_unlocked.c =================================================================== --- test/msan/getc_unlocked.c +++ test/msan/getc_unlocked.c @@ -1,12 +1,12 @@ -// RUN: %clangxx_msan -DGETC -m64 -O0 -g -xc++ %s -o %t && %t -// RUN: %clangxx_msan -DGETC -m64 -O3 -g -xc++ %s -o %t && %t -// RUN: %clang_msan -DGETC -m64 -O0 -g %s -o %t && %t -// RUN: %clang_msan -DGETC -m64 -O3 -g %s -o %t && %t +// RUN: %clangxx_msan -DGETC -m64 -O0 -g -xc++ %s -o %t && %run %t +// RUN: %clangxx_msan -DGETC -m64 -O3 -g -xc++ %s -o %t && %run %t +// RUN: %clang_msan -DGETC -m64 -O0 -g %s -o %t && %run %t +// RUN: %clang_msan -DGETC -m64 -O3 -g %s -o %t && %run %t -// RUN: %clangxx_msan -DGETCHAR -m64 -O0 -g -xc++ %s -o %t && %t -// RUN: %clangxx_msan -DGETCHAR -m64 -O3 -g -xc++ %s -o %t && %t -// RUN: %clang_msan -DGETCHAR -m64 -O0 -g %s -o %t && %t -// RUN: %clang_msan -DGETCHAR -m64 -O3 -g %s -o %t && %t +// RUN: %clangxx_msan -DGETCHAR -m64 -O0 -g -xc++ %s -o %t && %run %t +// RUN: %clangxx_msan -DGETCHAR -m64 -O3 -g -xc++ %s -o %t && %run %t +// RUN: %clang_msan -DGETCHAR -m64 -O0 -g %s -o %t && %run %t +// RUN: %clang_msan -DGETCHAR -m64 -O3 -g %s -o %t && %run %t #include #include Index: test/msan/getline.cc =================================================================== --- test/msan/getline.cc +++ test/msan/getline.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -O0 %s -o %t && %t %p +// RUN: %clangxx_msan -O0 %s -o %t && %run %t %p #include #include Index: test/msan/heap-origin.cc =================================================================== --- test/msan/heap-origin.cc +++ test/msan/heap-origin.cc @@ -1,19 +1,19 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out #include Index: test/msan/iconv.cc =================================================================== --- test/msan/iconv.cc +++ test/msan/iconv.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t -// RUN: %clangxx_msan -m64 -O0 -g -DPOSITIVE %s -o %t && not %t |& FileCheck %s +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O0 -g -DPOSITIVE %s -o %t && not %run %t |& FileCheck %s #include #include Index: test/msan/if_indextoname.cc =================================================================== --- test/msan/if_indextoname.cc +++ test/msan/if_indextoname.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t 2>&1 -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t 2>&1 -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t 2>&1 +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t 2>&1 #include #include Index: test/msan/ifaddrs.cc =================================================================== --- test/msan/ifaddrs.cc +++ test/msan/ifaddrs.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p 2>&1 -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t %p 2>&1 -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t %p 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p 2>&1 #include #include Index: test/msan/initgroups.cc =================================================================== --- test/msan/initgroups.cc +++ test/msan/initgroups.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/inline.cc =================================================================== --- test/msan/inline.cc +++ test/msan/inline.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -O3 %s -o %t && %t +// RUN: %clangxx_msan -O3 %s -o %t && %run %t // Test that no_sanitize_memory attribute applies even when the function would // be normally inlined. Index: test/msan/insertvalue_origin.cc =================================================================== --- test/msan/insertvalue_origin.cc +++ test/msan/insertvalue_origin.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s < %t.out // Test origin propagation through insertvalue IR instruction. Index: test/msan/ioctl.cc =================================================================== --- test/msan/ioctl.cc +++ test/msan/ioctl.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t -// RUN: %clangxx_msan -m64 -O3 -g %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O3 -g %s -o %t && %run %t #include #include Index: test/msan/ioctl_custom.cc =================================================================== --- test/msan/ioctl_custom.cc +++ test/msan/ioctl_custom.cc @@ -1,8 +1,8 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t -// RUN: %clangxx_msan -m64 -O3 -g %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O3 -g %s -o %t && %run %t -// RUN: %clangxx_msan -DPOSITIVE -m64 -O0 -g %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_msan -DPOSITIVE -m64 -O3 -g %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -DPOSITIVE -m64 -O0 -g %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -DPOSITIVE -m64 -O3 -g %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/msan/ioctl_sound.cc =================================================================== --- test/msan/ioctl_sound.cc +++ test/msan/ioctl_sound.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t -// RUN: %clangxx_msan -m64 -O3 -g %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O3 -g %s -o %t && %run %t #include #include Index: test/msan/keep-going-dso.cc =================================================================== --- test/msan/keep-going-dso.cc +++ test/msan/keep-going-dso.cc @@ -1,15 +1,15 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out -// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %run %t >%t.out 2>&1 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && not %run %t >%t.out 2>&1 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %run %t >%t.out 2>&1 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out // Test how -mllvm -msan-keep-going and MSAN_OPTIONS=keep_going affect reports Index: test/msan/keep-going.cc =================================================================== --- test/msan/keep-going.cc +++ test/msan/keep-going.cc @@ -1,19 +1,19 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && not %run %t >%t.out 2>&1 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %run %t >%t.out 2>&1 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=halt_on_error=1 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=halt_on_error=1 not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=halt_on_error=0 not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=halt_on_error=0 not %run %t >%t.out 2>&1 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out // Test behaviour of -mllvm -msan-keep-going and MSAN_OPTIONS=keep_going. Index: test/msan/mallinfo.cc =================================================================== --- test/msan/mallinfo.cc +++ test/msan/mallinfo.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t #include #include Index: test/msan/malloc_hook.cc =================================================================== --- test/msan/malloc_hook.cc +++ test/msan/malloc_hook.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_msan -O2 %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include #include Index: test/msan/mktime.cc =================================================================== --- test/msan/mktime.cc +++ test/msan/mktime.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t -// RUN: %clangxx_msan -m64 -O0 -g -DUNINIT %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O0 -g -DUNINIT %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/msan/mmap_below_shadow.cc =================================================================== --- test/msan/mmap_below_shadow.cc +++ test/msan/mmap_below_shadow.cc @@ -3,10 +3,10 @@ // Without MAP_FIXED, we ignore the address hint and map somewhere in // application range. -// RUN: %clangxx_msan -m64 -O0 -DFIXED=0 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O0 -DFIXED=1 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O0 -DFIXED=0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O0 -DFIXED=1 -D_FILE_OFFSET_BITS=64 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -DFIXED=0 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O0 -DFIXED=1 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O0 -DFIXED=0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O0 -DFIXED=1 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t #include #include Index: test/msan/no_sanitize_memory.cc =================================================================== --- test/msan/no_sanitize_memory.cc +++ test/msan/no_sanitize_memory.cc @@ -1,12 +1,12 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O1 %s -o %t && %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O2 %s -o %t && %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t && %run %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t && %run %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O0 %s -o %t -DCHECK_IN_F && %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O1 %s -o %t -DCHECK_IN_F && %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O2 %s -o %t -DCHECK_IN_F && %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O3 %s -o %t -DCHECK_IN_F && %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t -DCHECK_IN_F && %run %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t -DCHECK_IN_F && %run %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t -DCHECK_IN_F && %run %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t -DCHECK_IN_F && %run %t >%t.out 2>&1 // Test that (no_sanitize_memory) functions // * don't check shadow values (-DCHECK_IN_F) Index: test/msan/no_sanitize_memory_prop.cc =================================================================== --- test/msan/no_sanitize_memory_prop.cc +++ test/msan/no_sanitize_memory_prop.cc @@ -1,9 +1,9 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t >%t.out 2>&1 -// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out // Test that (no_sanitize_memory) functions propagate shadow. Index: test/msan/open_memstream.cc =================================================================== --- test/msan/open_memstream.cc +++ test/msan/open_memstream.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 -g -xc++ %s -o %t && %t -// RUN: %clangxx_msan -m64 -O3 -g -xc++ %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g -xc++ %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O3 -g -xc++ %s -o %t && %run %t #include #include Index: test/msan/poison_in_free.cc =================================================================== --- test/msan/poison_in_free.cc +++ test/msan/poison_in_free.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1 // FileCheck %s <%t.out -// RUN: %clangxx_msan -O0 %s -o %t && MSAN_OPTIONS=poison_in_free=0 %t >%t.out 2>&1 +// RUN: %clangxx_msan -O0 %s -o %t && MSAN_OPTIONS=poison_in_free=0 %run %t >%t.out 2>&1 #include #include Index: test/msan/pthread_getattr_np_deadlock.cc =================================================================== --- test/msan/pthread_getattr_np_deadlock.cc +++ test/msan/pthread_getattr_np_deadlock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -fsanitize-memory-track-origins -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -fsanitize-memory-track-origins -O0 %s -o %t && %run %t // Regression test for a deadlock in pthread_getattr_np Index: test/msan/ptrace.cc =================================================================== --- test/msan/ptrace.cc +++ test/msan/ptrace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/rand_r.cc =================================================================== --- test/msan/rand_r.cc +++ test/msan/rand_r.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t -// RUN: %clangxx_msan -m64 -O0 -g -DUNINIT %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O0 -g -DUNINIT %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/msan/readdir64.cc =================================================================== --- test/msan/readdir64.cc +++ test/msan/readdir64.cc @@ -1,12 +1,12 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O1 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O2 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O1 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O2 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O1 -D_FILE_OFFSET_BITS=64 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O2 -D_FILE_OFFSET_BITS=64 %s -o %t && %t -// RUN: %clangxx_msan -m64 -O3 -D_FILE_OFFSET_BITS=64 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O1 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O2 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t +// RUN: %clangxx_msan -m64 -O3 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t // Test that readdir64 is intercepted as well as readdir. Index: test/msan/scandir.cc =================================================================== --- test/msan/scandir.cc +++ test/msan/scandir.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t %p -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t %p +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p #include #include Index: test/msan/scandir_null.cc =================================================================== --- test/msan/scandir_null.cc +++ test/msan/scandir_null.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p -// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t %p -// RUN: %clangxx_msan -m64 -O3 %s -o %t && %t %p +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t %p +// RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t %p +// RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t %p #include #include Index: test/msan/select.cc =================================================================== --- test/msan/select.cc +++ test/msan/select.cc @@ -1,10 +1,10 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out #include Index: test/msan/select_origin.cc =================================================================== --- test/msan/select_origin.cc +++ test/msan/select_origin.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s // Test condition origin propagation through "select" IR instruction. Index: test/msan/setlocale.cc =================================================================== --- test/msan/setlocale.cc +++ test/msan/setlocale.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/signal_stress_test.cc =================================================================== --- test/msan/signal_stress_test.cc +++ test/msan/signal_stress_test.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -std=c++11 -O0 %s -o %t && %t +// RUN: %clangxx_msan -std=c++11 -O0 %s -o %t && %run %t // Test that va_arg shadow from a signal handler does not leak outside. Index: test/msan/sigwait.cc =================================================================== --- test/msan/sigwait.cc +++ test/msan/sigwait.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -std=c++11 -O0 -g %s -o %t && %t +// RUN: %clangxx_msan -std=c++11 -O0 -g %s -o %t && %run %t #include #include Index: test/msan/sigwaitinfo.cc =================================================================== --- test/msan/sigwaitinfo.cc +++ test/msan/sigwaitinfo.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -std=c++11 -O0 -g %s -o %t && %t +// RUN: %clangxx_msan -std=c++11 -O0 -g %s -o %t && %run %t #include #include Index: test/msan/stack-origin.cc =================================================================== --- test/msan/stack-origin.cc +++ test/msan/stack-origin.cc @@ -1,19 +1,19 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out #include Index: test/msan/strerror_r-non-gnu.c =================================================================== --- test/msan/strerror_r-non-gnu.c +++ test/msan/strerror_r-non-gnu.c @@ -1,4 +1,4 @@ -// RUN: %clang_msan -std=c99 -O0 -g %s -o %t && %t +// RUN: %clang_msan -std=c99 -O0 -g %s -o %t && %run %t // strerror_r under a weird set of circumstances can be redirected to // __xpg_strerror_r. Test that MSan handles this correctly. Index: test/msan/strlen_of_shadow.cc =================================================================== --- test/msan/strlen_of_shadow.cc +++ test/msan/strlen_of_shadow.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t // Check that strlen() and similar intercepted functions can be called on shadow // memory. Index: test/msan/sync_lock_set_and_test.cc =================================================================== --- test/msan/sync_lock_set_and_test.cc +++ test/msan/sync_lock_set_and_test.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t int main(void) { int i; Index: test/msan/textdomain.cc =================================================================== --- test/msan/textdomain.cc +++ test/msan/textdomain.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t #include #include Index: test/msan/times.cc =================================================================== --- test/msan/times.cc +++ test/msan/times.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t #include #include Index: test/msan/tls_reuse.cc =================================================================== --- test/msan/tls_reuse.cc +++ test/msan/tls_reuse.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t // Check that when TLS block is reused between threads, its shadow is cleaned. Index: test/msan/tsearch.cc =================================================================== --- test/msan/tsearch.cc +++ test/msan/tsearch.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -O0 -g %s -o %t && %t +// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t #include #include Index: test/msan/tzset.cc =================================================================== --- test/msan/tzset.cc +++ test/msan/tzset.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t #include #include Index: test/msan/unaligned_read_origin.cc =================================================================== --- test/msan/unaligned_read_origin.cc +++ test/msan/unaligned_read_origin.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s < %t.out #include Index: test/msan/unpoison_string.cc =================================================================== --- test/msan/unpoison_string.cc +++ test/msan/unpoison_string.cc @@ -1,7 +1,7 @@ // RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t -// RUN: %t +// RUN: %run %t // RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t -// RUN: %t +// RUN: %run %t #include #include Index: test/msan/use-after-free.cc =================================================================== --- test/msan/use-after-free.cc +++ test/msan/use-after-free.cc @@ -1,19 +1,19 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out #include Index: test/msan/vector_cvt.cc =================================================================== --- test/msan/vector_cvt.cc +++ test/msan/vector_cvt.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t -// RUN: %clangxx_msan -DPOSITIVE -m64 -O0 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t +// RUN: %clangxx_msan -DPOSITIVE -m64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s #include Index: test/msan/wrap_indirect_calls.cc =================================================================== --- test/msan/wrap_indirect_calls.cc +++ test/msan/wrap_indirect_calls.cc @@ -11,7 +11,7 @@ // RUN: -mllvm -msan-wrap-indirect-calls-fast=0 \ // RUN: -DSLOW=1 \ // RUN: -Wl,--defsym=__executable_start=0 -o %t -// RUN: %t +// RUN: %run %t // Enable fast path, call from executable, -O0. @@ -21,7 +21,7 @@ // RUN: -mllvm -msan-wrap-indirect-calls-fast=1 \ // RUN: -DSLOW=0 \ // RUN: -Wl,--defsym=__executable_start=0 -o %t -// RUN: %t +// RUN: %run %t // Enable fast path, call from executable, -O3. @@ -31,7 +31,7 @@ // RUN: -mllvm -msan-wrap-indirect-calls-fast=1 \ // RUN: -DSLOW=0 \ // RUN: -Wl,--defsym=__executable_start=0 -o %t -// RUN: %t +// RUN: %run %t // Enable fast path, call from DSO, -O0. @@ -42,7 +42,7 @@ // RUN: -DSLOW=0 \ // RUN: -Wl,--defsym=__executable_start=0 -o %t-caller-so.so // RUN: %clangxx_msan -O0 %s %t-caller-so.so %t-two-so.so %t-wrapper-so.so -o %t -// RUN: %t +// RUN: %run %t // Enable fast path, call from DSO, -O3. @@ -53,7 +53,7 @@ // RUN: -DSLOW=0 \ // RUN: -Wl,--defsym=__executable_start=0 -o %t-caller-so.so // RUN: %clangxx_msan -O3 %s %t-caller-so.so %t-two-so.so %t-wrapper-so.so -o %t -// RUN: %t +// RUN: %run %t // The actual test is in multiple files in wrap_indirect_calls/ directory. void run_test(); Index: test/msan/wrap_indirect_calls2.cc =================================================================== --- test/msan/wrap_indirect_calls2.cc +++ test/msan/wrap_indirect_calls2.cc @@ -2,7 +2,7 @@ // RUN: %clangxx_msan -mllvm -msan-wrap-indirect-calls=__msan_wrap_indirect_call \ // RUN: -mllvm -msan-wrap-indirect-calls-fast=0 \ -// RUN: -O0 -g -rdynamic -Wl,--defsym=__executable_start=0 %s -o %t && %t +// RUN: -O0 -g -rdynamic -Wl,--defsym=__executable_start=0 %s -o %t && %run %t // This test disables -msan-wrap-indirect-calls-fast, otherwise indirect calls // inside the same module are short-circuited and are never seen by the wrapper. Index: test/msan/wrap_indirect_calls_in_rtl.cc =================================================================== --- test/msan/wrap_indirect_calls_in_rtl.cc +++ test/msan/wrap_indirect_calls_in_rtl.cc @@ -1,6 +1,6 @@ // Test indirect call wrapping in MemorySanitizer runtime. -// RUN: %clangxx_msan -O0 -g -rdynamic %s -o %t && %t +// RUN: %clangxx_msan -O0 -g -rdynamic %s -o %t && %run %t #include #include Index: test/tsan/aligned_vs_unaligned_race.cc =================================================================== --- test/tsan/aligned_vs_unaligned_race.cc +++ test/tsan/aligned_vs_unaligned_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s // Race between an aligned access and an unaligned access, which // touches the same memory region. // This is a real race which is not detected by tsan. Index: test/tsan/allocator_returns_null.cc =================================================================== --- test/tsan/allocator_returns_null.cc +++ test/tsan/allocator_returns_null.cc @@ -3,12 +3,12 @@ // With allocator_may_return_null=1 the allocator should return 0. // // RUN: %clangxx_tsan -O0 %s -o %t -// RUN: not %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH -// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH -// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH -// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH -// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH -// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH +// RUN: not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH +// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH +// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH +// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH +// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH +// RUN: TSAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH #include #include Index: test/tsan/atomic_free.cc =================================================================== --- test/tsan/atomic_free.cc +++ test/tsan/atomic_free.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/atomic_free2.cc =================================================================== --- test/tsan/atomic_free2.cc +++ test/tsan/atomic_free2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/atomic_norace.cc =================================================================== --- test/tsan/atomic_norace.cc +++ test/tsan/atomic_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/atomic_race.cc =================================================================== --- test/tsan/atomic_race.cc +++ test/tsan/atomic_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/atomic_stack.cc =================================================================== --- test/tsan/atomic_stack.cc +++ test/tsan/atomic_stack.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/barrier.cc =================================================================== --- test/tsan/barrier.cc +++ test/tsan/barrier.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s // CHECK-NOT: ThreadSanitizer: data race // CHECK: DONE Index: test/tsan/bench_acquire_only.cc =================================================================== --- test/tsan/bench_acquire_only.cc +++ test/tsan/bench_acquire_only.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/bench_acquire_release.cc =================================================================== --- test/tsan/bench_acquire_release.cc +++ test/tsan/bench_acquire_release.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/bench_local_mutex.cc =================================================================== --- test/tsan/bench_local_mutex.cc +++ test/tsan/bench_local_mutex.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/bench_mutex.cc =================================================================== --- test/tsan/bench_mutex.cc +++ test/tsan/bench_mutex.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/bench_release_only.cc =================================================================== --- test/tsan/bench_release_only.cc +++ test/tsan/bench_release_only.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/bench_rwmutex.cc =================================================================== --- test/tsan/bench_rwmutex.cc +++ test/tsan/bench_rwmutex.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/bench_shadow_flush.cc =================================================================== --- test/tsan/bench_shadow_flush.cc +++ test/tsan/bench_shadow_flush.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/bench_single_writer.cc =================================================================== --- test/tsan/bench_single_writer.cc +++ test/tsan/bench_single_writer.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/bench_ten_mutexes.cc =================================================================== --- test/tsan/bench_ten_mutexes.cc +++ test/tsan/bench_ten_mutexes.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include "bench.h" Index: test/tsan/benign_race.cc =================================================================== --- test/tsan/benign_race.cc +++ test/tsan/benign_race.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/blacklist.cc =================================================================== --- test/tsan/blacklist.cc +++ test/tsan/blacklist.cc @@ -2,7 +2,7 @@ // RUN: %clangxx_tsan -O1 %s \ // RUN: -fsanitize-blacklist=%p/Helpers/blacklist.txt \ -// RUN: -o %t && %t 2>&1 | FileCheck %s +// RUN: -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/cond.c =================================================================== --- test/tsan/cond.c +++ test/tsan/cond.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s // CHECK-NOT: WARNING: ThreadSanitizer: data race // CHECK-NOT: ThreadSanitizer WARNING: double lock // CHECK-NOT: ThreadSanitizer WARNING: mutex unlock by another thread Index: test/tsan/cond_cancel.c =================================================================== --- test/tsan/cond_cancel.c +++ test/tsan/cond_cancel.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s // CHECK-NOT: WARNING // CHECK: OK Index: test/tsan/cond_race.cc =================================================================== --- test/tsan/cond_race.cc +++ test/tsan/cond_race.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s // CHECK-NOT: unlock of unlocked mutex // CHECK: ThreadSanitizer: data race // CHECK: pthread_cond_signal Index: test/tsan/cond_version.c =================================================================== --- test/tsan/cond_version.c +++ test/tsan/cond_version.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t -lrt && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t -lrt && %run %t 2>&1 | FileCheck %s // Test that pthread_cond is properly intercepted, // previously there were issues with versioned symbols. // CHECK: OK Index: test/tsan/deadlock_detector_stress_test.cc =================================================================== --- test/tsan/deadlock_detector_stress_test.cc +++ test/tsan/deadlock_detector_stress_test.cc @@ -1,12 +1,12 @@ // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadMutex -// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOT-SECOND -// TSAN_OPTIONS="detect_deadlocks=1 second_deadlock_stack=1" not %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-SECOND +// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOT-SECOND +// TSAN_OPTIONS="detect_deadlocks=1 second_deadlock_stack=1" not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-SECOND // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadSpinLock -// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %t 2>&1 | FileCheck %s +// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadRWLock -// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RD +// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RD // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadRecursiveMutex -// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-REC +// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-REC #include #undef NDEBUG #include Index: test/tsan/deep_stack1.cc =================================================================== --- test/tsan/deep_stack1.cc +++ test/tsan/deep_stack1.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_tsan -O1 %s -o %t -DORDER1 && not %t 2>&1 | FileCheck %s -// RUN: %clangxx_tsan -O1 %s -o %t -DORDER2 && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t -DORDER1 && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t -DORDER2 && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/default_options.cc =================================================================== --- test/tsan/default_options.cc +++ test/tsan/default_options.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/fd_close_norace.cc =================================================================== --- test/tsan/fd_close_norace.cc +++ test/tsan/fd_close_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_close_norace2.cc =================================================================== --- test/tsan/fd_close_norace2.cc +++ test/tsan/fd_close_norace2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_dup_norace.cc =================================================================== --- test/tsan/fd_dup_norace.cc +++ test/tsan/fd_dup_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_location.cc =================================================================== --- test/tsan/fd_location.cc +++ test/tsan/fd_location.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_pipe_norace.cc =================================================================== --- test/tsan/fd_pipe_norace.cc +++ test/tsan/fd_pipe_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_pipe_race.cc =================================================================== --- test/tsan/fd_pipe_race.cc +++ test/tsan/fd_pipe_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_socket_connect_norace.cc =================================================================== --- test/tsan/fd_socket_connect_norace.cc +++ test/tsan/fd_socket_connect_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_socket_norace.cc =================================================================== --- test/tsan/fd_socket_norace.cc +++ test/tsan/fd_socket_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_socketpair_norace.cc =================================================================== --- test/tsan/fd_socketpair_norace.cc +++ test/tsan/fd_socketpair_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fd_stdout_race.cc =================================================================== --- test/tsan/fd_stdout_race.cc +++ test/tsan/fd_stdout_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fork_atexit.cc =================================================================== --- test/tsan/fork_atexit.cc +++ test/tsan/fork_atexit.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fork_deadlock.cc =================================================================== --- test/tsan/fork_deadlock.cc +++ test/tsan/fork_deadlock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/fork_multithreaded.cc =================================================================== --- test/tsan/fork_multithreaded.cc +++ test/tsan/fork_multithreaded.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s -check-prefix=CHECK-DIE -// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="die_after_fork=0" %t 2>&1 | FileCheck %s -check-prefix=CHECK-NODIE +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-DIE +// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="die_after_fork=0" %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-NODIE #include #include #include Index: test/tsan/fork_multithreaded3.cc =================================================================== --- test/tsan/fork_multithreaded3.cc +++ test/tsan/fork_multithreaded3.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/free_race.c =================================================================== --- test/tsan/free_race.c +++ test/tsan/free_race.c @@ -1,6 +1,6 @@ // RUN: %clang_tsan -O1 %s -o %t -// RUN: not %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOZUPP -// RUN: TSAN_OPTIONS="suppressions=%s.supp print_suppressions=1" %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUPP +// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOZUPP +// RUN: TSAN_OPTIONS="suppressions=%s.supp print_suppressions=1" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUPP #include #include Index: test/tsan/free_race2.c =================================================================== --- test/tsan/free_race2.c +++ test/tsan/free_race2.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include void __attribute__((noinline)) foo(int *mem) { Index: test/tsan/getline_nohang.cc =================================================================== --- test/tsan/getline_nohang.cc +++ test/tsan/getline_nohang.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t // Make sure TSan doesn't deadlock on a file stream lock at program shutdown. // See https://code.google.com/p/thread-sanitizer/issues/detail?id=47 Index: test/tsan/global_race.cc =================================================================== --- test/tsan/global_race.cc +++ test/tsan/global_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/halt_on_error.cc =================================================================== --- test/tsan/halt_on_error.cc +++ test/tsan/halt_on_error.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS halt_on_error=1" not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS halt_on_error=1" not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/heap_race.cc =================================================================== --- test/tsan/heap_race.cc +++ test/tsan/heap_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/ignore_free.cc =================================================================== --- test/tsan/ignore_free.cc +++ test/tsan/ignore_free.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/ignore_lib0.cc =================================================================== --- test/tsan/ignore_lib0.cc +++ test/tsan/ignore_lib0.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib0.so // RUN: %clangxx_tsan -O1 %s -L%T -lignore_lib0 -o %t // RUN: echo running w/o suppressions: -// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} not %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP +// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP // RUN: echo running with suppressions: -// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP +// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP // Tests that interceptors coming from a library specified in called_from_lib // suppression are ignored. Index: test/tsan/ignore_lib1.cc =================================================================== --- test/tsan/ignore_lib1.cc +++ test/tsan/ignore_lib1.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib1.so // RUN: %clangxx_tsan -O1 %s -o %t // RUN: echo running w/o suppressions: -// RUN: not %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP +// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP // RUN: echo running with suppressions: -// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP +// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP // Tests that interceptors coming from a dynamically loaded library specified // in called_from_lib suppression are ignored. Index: test/tsan/ignore_lib2.cc =================================================================== --- test/tsan/ignore_lib2.cc +++ test/tsan/ignore_lib2.cc @@ -1,7 +1,7 @@ // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib2_0.so // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib2_1.so // RUN: %clangxx_tsan -O1 %s -o %t -// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" not %t 2>&1 | FileCheck %s +// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" not %run %t 2>&1 | FileCheck %s // Tests that called_from_lib suppression matched against 2 libraries // causes program crash (this is not supported). Index: test/tsan/ignore_lib3.cc =================================================================== --- test/tsan/ignore_lib3.cc +++ test/tsan/ignore_lib3.cc @@ -1,6 +1,6 @@ // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib3.so // RUN: %clangxx_tsan -O1 %s -o %t -// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" not %t 2>&1 | FileCheck %s +// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" not %run %t 2>&1 | FileCheck %s // Tests that unloading of a library matched against called_from_lib suppression // causes program crash (this is not supported). Index: test/tsan/ignore_malloc.cc =================================================================== --- test/tsan/ignore_malloc.cc +++ test/tsan/ignore_malloc.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/ignore_race.cc =================================================================== --- test/tsan/ignore_race.cc +++ test/tsan/ignore_race.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/ignore_sync.cc =================================================================== --- test/tsan/ignore_sync.cc +++ test/tsan/ignore_sync.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/inlined_memcpy_race.cc =================================================================== --- test/tsan/inlined_memcpy_race.cc +++ test/tsan/inlined_memcpy_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/interface_atomic_test.c =================================================================== --- test/tsan/interface_atomic_test.c +++ test/tsan/interface_atomic_test.c @@ -1,5 +1,5 @@ // Test that we can include header with TSan atomic interface. -// RUN: %clang_tsan %s -o %t && %t | FileCheck %s +// RUN: %clang_tsan %s -o %t && %run %t | FileCheck %s #include #include Index: test/tsan/java_alloc.cc =================================================================== --- test/tsan/java_alloc.cc +++ test/tsan/java_alloc.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include "java.h" int const kHeapSize = 1024 * 1024; Index: test/tsan/java_lock.cc =================================================================== --- test/tsan/java_lock.cc +++ test/tsan/java_lock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include "java.h" #include Index: test/tsan/java_lock_move.cc =================================================================== --- test/tsan/java_lock_move.cc +++ test/tsan/java_lock_move.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include "java.h" jptr varaddr; Index: test/tsan/java_lock_rec.cc =================================================================== --- test/tsan/java_lock_rec.cc +++ test/tsan/java_lock_rec.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include "java.h" #include Index: test/tsan/java_lock_rec_race.cc =================================================================== --- test/tsan/java_lock_rec_race.cc +++ test/tsan/java_lock_rec_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include "java.h" #include Index: test/tsan/java_race.cc =================================================================== --- test/tsan/java_race.cc +++ test/tsan/java_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include "java.h" void *Thread(void *p) { Index: test/tsan/java_race_move.cc =================================================================== --- test/tsan/java_race_move.cc +++ test/tsan/java_race_move.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include "java.h" jptr varaddr; Index: test/tsan/java_rwlock.cc =================================================================== --- test/tsan/java_rwlock.cc +++ test/tsan/java_rwlock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include "java.h" #include Index: test/tsan/load_shared_lib.cc =================================================================== --- test/tsan/load_shared_lib.cc +++ test/tsan/load_shared_lib.cc @@ -4,7 +4,7 @@ // RUN: %clangxx_tsan -O1 %p/SharedLibs/load_shared_lib-so.cc \ // RUN: -fPIC -shared -o %t-so.so -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/longjmp.cc =================================================================== --- test/tsan/longjmp.cc +++ test/tsan/longjmp.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/longjmp2.cc =================================================================== --- test/tsan/longjmp2.cc +++ test/tsan/longjmp2.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/longjmp3.cc =================================================================== --- test/tsan/longjmp3.cc +++ test/tsan/longjmp3.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/longjmp4.cc =================================================================== --- test/tsan/longjmp4.cc +++ test/tsan/longjmp4.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/malloc_hook.cc =================================================================== --- test/tsan/malloc_hook.cc +++ test/tsan/malloc_hook.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/malloc_overflow.cc =================================================================== --- test/tsan/malloc_overflow.cc +++ test/tsan/malloc_overflow.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan -O1 %s -o %t -// RUN: TSAN_OPTIONS=allocator_may_return_null=1 %t 2>&1 | FileCheck %s +// RUN: TSAN_OPTIONS=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/malloc_stack.cc =================================================================== --- test/tsan/malloc_stack.cc +++ test/tsan/malloc_stack.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/memcpy_race.cc =================================================================== --- test/tsan/memcpy_race.cc +++ test/tsan/memcpy_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mmap_large.cc =================================================================== --- test/tsan/mmap_large.cc +++ test/tsan/mmap_large.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mop_with_offset.cc =================================================================== --- test/tsan/mop_with_offset.cc +++ test/tsan/mop_with_offset.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mop_with_offset2.cc =================================================================== --- test/tsan/mop_with_offset2.cc +++ test/tsan/mop_with_offset2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutex_bad_read_lock.cc =================================================================== --- test/tsan/mutex_bad_read_lock.cc +++ test/tsan/mutex_bad_read_lock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s extern "C" void AnnotateRWLockAcquired(const char *f, int l, void *m, long rw); int main() { Index: test/tsan/mutex_bad_read_unlock.cc =================================================================== --- test/tsan/mutex_bad_read_unlock.cc +++ test/tsan/mutex_bad_read_unlock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s extern "C" void AnnotateRWLockAcquired(const char *f, int l, void *m, long rw); extern "C" void AnnotateRWLockReleased(const char *f, int l, void *m, long rw); Index: test/tsan/mutex_bad_unlock.cc =================================================================== --- test/tsan/mutex_bad_unlock.cc +++ test/tsan/mutex_bad_unlock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s extern "C" void AnnotateRWLockReleased(const char *f, int l, void *m, long rw); int main() { Index: test/tsan/mutex_cycle2.c =================================================================== --- test/tsan/mutex_cycle2.c +++ test/tsan/mutex_cycle2.c @@ -1,9 +1,9 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %t 2>&1 | FileCheck %s +// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s // RUN: echo "deadlock:main" > sup -// RUN: TSAN_OPTIONS="detect_deadlocks=1 suppressions=sup" %t +// RUN: TSAN_OPTIONS="detect_deadlocks=1 suppressions=sup" %run %t // RUN: echo "deadlock:zzzz" > sup -// RUN: TSAN_OPTIONS="detect_deadlocks=1 suppressions=sup" not %t 2>&1 | FileCheck %s +// RUN: TSAN_OPTIONS="detect_deadlocks=1 suppressions=sup" not %run %t 2>&1 | FileCheck %s #include int main() { Index: test/tsan/mutex_destroy_locked.cc =================================================================== --- test/tsan/mutex_destroy_locked.cc +++ test/tsan/mutex_destroy_locked.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/mutex_double_lock.cc =================================================================== --- test/tsan/mutex_double_lock.cc +++ test/tsan/mutex_double_lock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/mutex_robust.cc =================================================================== --- test/tsan/mutex_robust.cc +++ test/tsan/mutex_robust.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutex_robust2.cc =================================================================== --- test/tsan/mutex_robust2.cc +++ test/tsan/mutex_robust2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset1.cc =================================================================== --- test/tsan/mutexset1.cc +++ test/tsan/mutexset1.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset2.cc =================================================================== --- test/tsan/mutexset2.cc +++ test/tsan/mutexset2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset3.cc =================================================================== --- test/tsan/mutexset3.cc +++ test/tsan/mutexset3.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset4.cc =================================================================== --- test/tsan/mutexset4.cc +++ test/tsan/mutexset4.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset5.cc =================================================================== --- test/tsan/mutexset5.cc +++ test/tsan/mutexset5.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset6.cc =================================================================== --- test/tsan/mutexset6.cc +++ test/tsan/mutexset6.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset7.cc =================================================================== --- test/tsan/mutexset7.cc +++ test/tsan/mutexset7.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/mutexset8.cc =================================================================== --- test/tsan/mutexset8.cc +++ test/tsan/mutexset8.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/oob_race.cc =================================================================== --- test/tsan/oob_race.cc +++ test/tsan/oob_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/printf-1.c =================================================================== --- test/tsan/printf-1.c +++ test/tsan/printf-1.c @@ -1,7 +1,7 @@ // RUN: %clang_tsan -O2 %s -o %t -// RUN: ASAN_OPTIONS=check_printf=1 %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=check_printf=0 %t 2>&1 | FileCheck %s -// RUN: %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=check_printf=1 %run %t 2>&1 | FileCheck %s +// RUN: ASAN_OPTIONS=check_printf=0 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include int main() { Index: test/tsan/race_on_barrier.c =================================================================== --- test/tsan/race_on_barrier.c +++ test/tsan/race_on_barrier.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/race_on_barrier2.c =================================================================== --- test/tsan/race_on_barrier2.c +++ test/tsan/race_on_barrier2.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/race_on_heap.cc =================================================================== --- test/tsan/race_on_heap.cc +++ test/tsan/race_on_heap.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/race_on_mutex.c =================================================================== --- test/tsan/race_on_mutex.c +++ test/tsan/race_on_mutex.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/race_on_mutex2.c =================================================================== --- test/tsan/race_on_mutex2.c +++ test/tsan/race_on_mutex2.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/race_on_read.cc =================================================================== --- test/tsan/race_on_read.cc +++ test/tsan/race_on_read.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/race_on_speculative_load.cc =================================================================== --- test/tsan/race_on_speculative_load.cc +++ test/tsan/race_on_speculative_load.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t | FileCheck %s // Regtest for https://code.google.com/p/thread-sanitizer/issues/detail?id=40 // This is a correct program and tsan should not report a race. #include Index: test/tsan/race_on_write.cc =================================================================== --- test/tsan/race_on_write.cc +++ test/tsan/race_on_write.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/race_with_finished_thread.cc =================================================================== --- test/tsan/race_with_finished_thread.cc +++ test/tsan/race_with_finished_thread.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/signal_errno.cc =================================================================== --- test/tsan/signal_errno.cc +++ test/tsan/signal_errno.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/signal_malloc.cc =================================================================== --- test/tsan/signal_malloc.cc +++ test/tsan/signal_malloc.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/sigsuspend.cc =================================================================== --- test/tsan/sigsuspend.cc +++ test/tsan/sigsuspend.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s // Always enable asserts. #ifdef NDEBUG Index: test/tsan/simple_race.c =================================================================== --- test/tsan/simple_race.c +++ test/tsan/simple_race.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/simple_race.cc =================================================================== --- test/tsan/simple_race.cc +++ test/tsan/simple_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/simple_stack.c =================================================================== --- test/tsan/simple_stack.c +++ test/tsan/simple_stack.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/simple_stack2.cc =================================================================== --- test/tsan/simple_stack2.cc +++ test/tsan/simple_stack2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/sleep_sync.cc =================================================================== --- test/tsan/sleep_sync.cc +++ test/tsan/sleep_sync.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/sleep_sync2.cc =================================================================== --- test/tsan/sleep_sync2.cc +++ test/tsan/sleep_sync2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/stack_race.cc =================================================================== --- test/tsan/stack_race.cc +++ test/tsan/stack_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/stack_race2.cc =================================================================== --- test/tsan/stack_race2.cc +++ test/tsan/stack_race2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/static_init1.cc =================================================================== --- test/tsan/static_init1.cc +++ test/tsan/static_init1.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/static_init2.cc =================================================================== --- test/tsan/static_init2.cc +++ test/tsan/static_init2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/static_init3.cc =================================================================== --- test/tsan/static_init3.cc +++ test/tsan/static_init3.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/static_init4.cc =================================================================== --- test/tsan/static_init4.cc +++ test/tsan/static_init4.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/static_init5.cc =================================================================== --- test/tsan/static_init5.cc +++ test/tsan/static_init5.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/static_init6.cc =================================================================== --- test/tsan/static_init6.cc +++ test/tsan/static_init6.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -static-libstdc++ -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -static-libstdc++ -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/sunrpc.cc =================================================================== --- test/tsan/sunrpc.cc +++ test/tsan/sunrpc.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/suppress_same_address.cc =================================================================== --- test/tsan/suppress_same_address.cc +++ test/tsan/suppress_same_address.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/suppress_same_stacks.cc =================================================================== --- test/tsan/suppress_same_stacks.cc +++ test/tsan/suppress_same_stacks.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include volatile int N; // Prevent loop unrolling. Index: test/tsan/suppressions_global.cc =================================================================== --- test/tsan/suppressions_global.cc +++ test/tsan/suppressions_global.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/suppressions_race.cc =================================================================== --- test/tsan/suppressions_race.cc +++ test/tsan/suppressions_race.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/suppressions_race2.cc =================================================================== --- test/tsan/suppressions_race2.cc +++ test/tsan/suppressions_race2.cc @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/thread_end_with_ignore.cc =================================================================== --- test/tsan/thread_end_with_ignore.cc +++ test/tsan/thread_end_with_ignore.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/thread_end_with_ignore2.cc =================================================================== --- test/tsan/thread_end_with_ignore2.cc +++ test/tsan/thread_end_with_ignore2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s extern "C" void AnnotateIgnoreWritesBegin(const char *f, int l); int main() { Index: test/tsan/thread_end_with_ignore3.cc =================================================================== --- test/tsan/thread_end_with_ignore3.cc +++ test/tsan/thread_end_with_ignore3.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s extern "C" void AnnotateIgnoreReadsBegin(const char *f, int l); extern "C" void AnnotateIgnoreReadsEnd(const char *f, int l); Index: test/tsan/thread_leak.c =================================================================== --- test/tsan/thread_leak.c +++ test/tsan/thread_leak.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/thread_leak2.c =================================================================== --- test/tsan/thread_leak2.c +++ test/tsan/thread_leak2.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/thread_leak3.c =================================================================== --- test/tsan/thread_leak3.c +++ test/tsan/thread_leak3.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/thread_leak4.c =================================================================== --- test/tsan/thread_leak4.c +++ test/tsan/thread_leak4.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/thread_leak5.c =================================================================== --- test/tsan/thread_leak5.c +++ test/tsan/thread_leak5.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/thread_name.cc =================================================================== --- test/tsan/thread_name.cc +++ test/tsan/thread_name.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/thread_name2.cc =================================================================== --- test/tsan/thread_name2.cc +++ test/tsan/thread_name2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/tiny_race.c =================================================================== --- test/tsan/tiny_race.c +++ test/tsan/tiny_race.c @@ -1,4 +1,4 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/tls_race.cc =================================================================== --- test/tsan/tls_race.cc +++ test/tsan/tls_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/tls_race2.cc =================================================================== --- test/tsan/tls_race2.cc +++ test/tsan/tls_race2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/tsan-vs-gvn.cc =================================================================== --- test/tsan/tsan-vs-gvn.cc +++ test/tsan/tsan-vs-gvn.cc @@ -1,6 +1,6 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_tsan -O2 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx_tsan -O3 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s // // Check that load widening is not tsan-hostile. #include Index: test/tsan/unaligned_norace.cc =================================================================== --- test/tsan/unaligned_norace.cc +++ test/tsan/unaligned_norace.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/unaligned_race.cc =================================================================== --- test/tsan/unaligned_race.cc +++ test/tsan/unaligned_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/user_fopen.cc =================================================================== --- test/tsan/user_fopen.cc +++ test/tsan/user_fopen.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include Index: test/tsan/user_malloc.cc =================================================================== --- test/tsan/user_malloc.cc +++ test/tsan/user_malloc.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include // defined by tsan. Index: test/tsan/vfork.cc =================================================================== --- test/tsan/vfork.cc +++ test/tsan/vfork.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/virtual_inheritance_compile_bug.cc =================================================================== --- test/tsan/virtual_inheritance_compile_bug.cc +++ test/tsan/virtual_inheritance_compile_bug.cc @@ -1,7 +1,7 @@ // Regression test for http://code.google.com/p/thread-sanitizer/issues/detail?id=3. // The C++ variant is much more compact that the LLVM IR equivalent. -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include struct AAA { virtual long aaa () { return 0; } }; // NOLINT struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT Index: test/tsan/vptr_benign_race.cc =================================================================== --- test/tsan/vptr_benign_race.cc +++ test/tsan/vptr_benign_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/vptr_harmful_race.cc =================================================================== --- test/tsan/vptr_harmful_race.cc +++ test/tsan/vptr_harmful_race.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/vptr_harmful_race2.cc =================================================================== --- test/tsan/vptr_harmful_race2.cc +++ test/tsan/vptr_harmful_race2.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/vptr_harmful_race3.cc =================================================================== --- test/tsan/vptr_harmful_race3.cc +++ test/tsan/vptr_harmful_race3.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include #include Index: test/tsan/write_in_reader_lock.cc =================================================================== --- test/tsan/write_in_reader_lock.cc +++ test/tsan/write_in_reader_lock.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s #include #include Index: test/ubsan/TestCases/Float/cast-overflow.cpp =================================================================== --- test/ubsan/TestCases/Float/cast-overflow.cpp +++ test/ubsan/TestCases/Float/cast-overflow.cpp @@ -1,14 +1,14 @@ // RUN: %clangxx -fsanitize=float-cast-overflow %s -o %t -// RUN: %t _ -// RUN: %t 0 2>&1 | FileCheck %s --check-prefix=CHECK-0 -// RUN: %t 1 2>&1 | FileCheck %s --check-prefix=CHECK-1 -// RUN: %t 2 2>&1 | FileCheck %s --check-prefix=CHECK-2 -// RUN: %t 3 2>&1 | FileCheck %s --check-prefix=CHECK-3 -// RUN: %t 4 2>&1 | FileCheck %s --check-prefix=CHECK-4 -// RUN: %t 5 2>&1 | FileCheck %s --check-prefix=CHECK-5 -// RUN: %t 6 2>&1 | FileCheck %s --check-prefix=CHECK-6 -// FIXME: %t 7 2>&1 | FileCheck %s --check-prefix=CHECK-7 -// RUN: %t 8 2>&1 | FileCheck %s --check-prefix=CHECK-8 +// RUN: %run %t _ +// RUN: %run %t 0 2>&1 | FileCheck %s --check-prefix=CHECK-0 +// RUN: %run %t 1 2>&1 | FileCheck %s --check-prefix=CHECK-1 +// RUN: %run %t 2 2>&1 | FileCheck %s --check-prefix=CHECK-2 +// RUN: %run %t 3 2>&1 | FileCheck %s --check-prefix=CHECK-3 +// RUN: %run %t 4 2>&1 | FileCheck %s --check-prefix=CHECK-4 +// RUN: %run %t 5 2>&1 | FileCheck %s --check-prefix=CHECK-5 +// RUN: %run %t 6 2>&1 | FileCheck %s --check-prefix=CHECK-6 +// FIXME: %run %t 7 2>&1 | FileCheck %s --check-prefix=CHECK-7 +// RUN: %run %t 8 2>&1 | FileCheck %s --check-prefix=CHECK-8 // This test assumes float and double are IEEE-754 single- and double-precision. Index: test/ubsan/TestCases/Integer/add-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/add-overflow.cpp +++ test/ubsan/TestCases/Integer/add-overflow.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx -DADD_I32 -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I32 -// RUN: %clangxx -DADD_I64 -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I64 -// RUN: %clangxx -DADD_I128 -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I128 +// RUN: %clangxx -DADD_I32 -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I32 +// RUN: %clangxx -DADD_I64 -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I64 +// RUN: %clangxx -DADD_I128 -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I128 #include #include Index: test/ubsan/TestCases/Integer/div-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/div-overflow.cpp +++ test/ubsan/TestCases/Integer/div-overflow.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s #include Index: test/ubsan/TestCases/Integer/div-zero.cpp =================================================================== --- test/ubsan/TestCases/Integer/div-zero.cpp +++ test/ubsan/TestCases/Integer/div-zero.cpp @@ -1,7 +1,7 @@ -// RUN: %clangxx -fsanitize=integer-divide-by-zero -DDIVIDEND=0 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx -fsanitize=integer-divide-by-zero -DDIVIDEND=1U %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx -fsanitize=float-divide-by-zero -DDIVIDEND=1.5 %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx -fsanitize=integer-divide-by-zero -DDIVIDEND='intmax(123)' %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=integer-divide-by-zero -DDIVIDEND=0 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=integer-divide-by-zero -DDIVIDEND=1U %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=float-divide-by-zero -DDIVIDEND=1.5 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=integer-divide-by-zero -DDIVIDEND='intmax(123)' %s -o %t && %run %t 2>&1 | FileCheck %s #ifdef __SIZEOF_INT128__ typedef __int128 intmax; Index: test/ubsan/TestCases/Integer/incdec-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/incdec-overflow.cpp +++ test/ubsan/TestCases/Integer/incdec-overflow.cpp @@ -1,7 +1,7 @@ -// RUN: %clangxx -DOP=n++ -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx -DOP=++n -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx -DOP=m-- -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s -// RUN: %clangxx -DOP=--m -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -DOP=n++ -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -DOP=++n -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -DOP=m-- -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -DOP=--m -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s #include Index: test/ubsan/TestCases/Integer/mul-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/mul-overflow.cpp +++ test/ubsan/TestCases/Integer/mul-overflow.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s #include Index: test/ubsan/TestCases/Integer/negate-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/negate-overflow.cpp +++ test/ubsan/TestCases/Integer/negate-overflow.cpp @@ -1,5 +1,5 @@ -// RUN: %clangxx -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECKS -// RUN: %clangxx -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECKU +// RUN: %clangxx -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECKS +// RUN: %clangxx -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECKU int main() { // CHECKS-NOT: runtime error Index: test/ubsan/TestCases/Integer/no-recover.cpp =================================================================== --- test/ubsan/TestCases/Integer/no-recover.cpp +++ test/ubsan/TestCases/Integer/no-recover.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=RECOVER -// RUN: %clangxx -fsanitize=unsigned-integer-overflow -fsanitize-recover %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=RECOVER -// RUN: %clangxx -fsanitize=unsigned-integer-overflow -fno-sanitize-recover %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=ABORT +// RUN: %clangxx -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=RECOVER +// RUN: %clangxx -fsanitize=unsigned-integer-overflow -fsanitize-recover %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=RECOVER +// RUN: %clangxx -fsanitize=unsigned-integer-overflow -fno-sanitize-recover %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=ABORT #include Index: test/ubsan/TestCases/Integer/shift.cpp =================================================================== --- test/ubsan/TestCases/Integer/shift.cpp +++ test/ubsan/TestCases/Integer/shift.cpp @@ -1,13 +1,13 @@ -// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW -// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<=' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW -// RUN: %clangxx -DTOO_LOW -DOP='<<' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW -// RUN: %clangxx -DTOO_LOW -DOP='>>' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW -// RUN: %clangxx -DTOO_LOW -DOP='<<=' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW -// RUN: %clangxx -DTOO_LOW -DOP='>>=' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW -// RUN: %clangxx -DTOO_HIGH -DOP='<<' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH -// RUN: %clangxx -DTOO_HIGH -DOP='>>' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH -// RUN: %clangxx -DTOO_HIGH -DOP='<<=' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH -// RUN: %clangxx -DTOO_HIGH -DOP='>>=' -fsanitize=shift %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH +// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW +// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW +// RUN: %clangxx -DTOO_LOW -DOP='<<' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW +// RUN: %clangxx -DTOO_LOW -DOP='>>' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW +// RUN: %clangxx -DTOO_LOW -DOP='<<=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW +// RUN: %clangxx -DTOO_LOW -DOP='>>=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW +// RUN: %clangxx -DTOO_HIGH -DOP='<<' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH +// RUN: %clangxx -DTOO_HIGH -DOP='>>' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH +// RUN: %clangxx -DTOO_HIGH -DOP='<<=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH +// RUN: %clangxx -DTOO_HIGH -DOP='>>=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH #include Index: test/ubsan/TestCases/Integer/sub-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/sub-overflow.cpp +++ test/ubsan/TestCases/Integer/sub-overflow.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx -DSUB_I32 -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I32 -// RUN: %clangxx -DSUB_I64 -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I64 -// RUN: %clangxx -DSUB_I128 -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I128 +// RUN: %clangxx -DSUB_I32 -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I32 +// RUN: %clangxx -DSUB_I64 -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I64 +// RUN: %clangxx -DSUB_I128 -fsanitize=signed-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I128 #include #include Index: test/ubsan/TestCases/Integer/uadd-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/uadd-overflow.cpp +++ test/ubsan/TestCases/Integer/uadd-overflow.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx -DADD_I32 -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I32 -// RUN: %clangxx -DADD_I64 -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I64 -// RUN: %clangxx -DADD_I128 -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I128 +// RUN: %clangxx -DADD_I32 -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I32 +// RUN: %clangxx -DADD_I64 -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I64 +// RUN: %clangxx -DADD_I128 -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ADD_I128 #include #include Index: test/ubsan/TestCases/Integer/uincdec-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/uincdec-overflow.cpp +++ test/ubsan/TestCases/Integer/uincdec-overflow.cpp @@ -1,7 +1,7 @@ -// RUN: %clangxx -DOP=n++ -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck --check-prefix=CHECK-INC %s -// RUN: %clangxx -DOP=++n -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck --check-prefix=CHECK-INC %s -// RUN: %clangxx -DOP=m-- -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck --check-prefix=CHECK-DEC %s -// RUN: %clangxx -DOP=--m -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck --check-prefix=CHECK-DEC %s +// RUN: %clangxx -DOP=n++ -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck --check-prefix=CHECK-INC %s +// RUN: %clangxx -DOP=++n -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck --check-prefix=CHECK-INC %s +// RUN: %clangxx -DOP=m-- -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck --check-prefix=CHECK-DEC %s +// RUN: %clangxx -DOP=--m -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck --check-prefix=CHECK-DEC %s #include Index: test/ubsan/TestCases/Integer/umul-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/umul-overflow.cpp +++ test/ubsan/TestCases/Integer/umul-overflow.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s #include Index: test/ubsan/TestCases/Integer/usub-overflow.cpp =================================================================== --- test/ubsan/TestCases/Integer/usub-overflow.cpp +++ test/ubsan/TestCases/Integer/usub-overflow.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx -DSUB_I32 -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I32 -// RUN: %clangxx -DSUB_I64 -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I64 -// RUN: %clangxx -DSUB_I128 -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I128 +// RUN: %clangxx -DSUB_I32 -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I32 +// RUN: %clangxx -DSUB_I64 -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I64 +// RUN: %clangxx -DSUB_I128 -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUB_I128 #include #include Index: test/ubsan/TestCases/Misc/deduplication.cpp =================================================================== --- test/ubsan/TestCases/Misc/deduplication.cpp +++ test/ubsan/TestCases/Misc/deduplication.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsanitize=undefined %s -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=undefined %s -o %t && %run %t 2>&1 | FileCheck %s // Verify deduplication works by ensuring only one diag is emitted. #include #include Index: test/ubsan/TestCases/Misc/enum.cpp =================================================================== --- test/ubsan/TestCases/Misc/enum.cpp +++ test/ubsan/TestCases/Misc/enum.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx -fsanitize=enum %s -O3 -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-PLAIN -// RUN: %clangxx -fsanitize=enum -std=c++11 -DE="class E" %s -O3 -o %t && %t -// RUN: %clangxx -fsanitize=enum -std=c++11 -DE="class E : bool" %s -O3 -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK-BOOL +// RUN: %clangxx -fsanitize=enum %s -O3 -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PLAIN +// RUN: %clangxx -fsanitize=enum -std=c++11 -DE="class E" %s -O3 -o %t && %run %t +// RUN: %clangxx -fsanitize=enum -std=c++11 -DE="class E : bool" %s -O3 -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-BOOL enum E { a = 1 } e; #undef E Index: test/ubsan/TestCases/Misc/missing_return.cpp =================================================================== --- test/ubsan/TestCases/Misc/missing_return.cpp +++ test/ubsan/TestCases/Misc/missing_return.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsanitize=return %s -O3 -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=return %s -O3 -o %t && %run %t 2>&1 | FileCheck %s // CHECK: missing_return.cpp:4:5: runtime error: execution reached the end of a value-returning function without returning a value int f() { Index: test/ubsan/TestCases/Misc/unreachable.cpp =================================================================== --- test/ubsan/TestCases/Misc/unreachable.cpp +++ test/ubsan/TestCases/Misc/unreachable.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsanitize=unreachable %s -O3 -o %t && %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=unreachable %s -O3 -o %t && %run %t 2>&1 | FileCheck %s int main(int, char **argv) { // CHECK: unreachable.cpp:5:3: runtime error: execution reached a __builtin_unreachable() call Index: test/ubsan/TestCases/Misc/vla.c =================================================================== --- test/ubsan/TestCases/Misc/vla.c +++ test/ubsan/TestCases/Misc/vla.c @@ -1,7 +1,7 @@ // RUN: %clang -fsanitize=vla-bound %s -O3 -o %t -// RUN: %t 2>&1 | FileCheck %s --check-prefix=CHECK-MINUS-ONE -// RUN: %t a 2>&1 | FileCheck %s --check-prefix=CHECK-ZERO -// RUN: %t a b +// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-MINUS-ONE +// RUN: %run %t a 2>&1 | FileCheck %s --check-prefix=CHECK-ZERO +// RUN: %run %t a b int main(int argc, char **argv) { // CHECK-MINUS-ONE: vla.c:9:11: runtime error: variable length array bound evaluates to non-positive value -1 Index: test/ubsan/TestCases/TypeCheck/Function/function.cpp =================================================================== --- test/ubsan/TestCases/TypeCheck/Function/function.cpp +++ test/ubsan/TestCases/TypeCheck/Function/function.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsanitize=function %s -O3 -g -o %t -// RUN: %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include Index: test/ubsan/TestCases/TypeCheck/misaligned.cpp =================================================================== --- test/ubsan/TestCases/TypeCheck/misaligned.cpp +++ test/ubsan/TestCases/TypeCheck/misaligned.cpp @@ -1,11 +1,11 @@ // RUN: %clangxx -fsanitize=alignment %s -O3 -o %t -// RUN: %t l0 && %t s0 && %t r0 && %t m0 && %t f0 && %t n0 -// RUN: %t l1 2>&1 | FileCheck %s --check-prefix=CHECK-LOAD --strict-whitespace -// RUN: %t s1 2>&1 | FileCheck %s --check-prefix=CHECK-STORE -// RUN: %t r1 2>&1 | FileCheck %s --check-prefix=CHECK-REFERENCE -// RUN: %t m1 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER -// RUN: %t f1 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN -// RUN: %t n1 2>&1 | FileCheck %s --check-prefix=CHECK-NEW +// RUN: %run %t l0 && %run %t s0 && %run %t r0 && %run %t m0 && %run %t f0 && %run %t n0 +// RUN: %run %t l1 2>&1 | FileCheck %s --check-prefix=CHECK-LOAD --strict-whitespace +// RUN: %run %t s1 2>&1 | FileCheck %s --check-prefix=CHECK-STORE +// RUN: %run %t r1 2>&1 | FileCheck %s --check-prefix=CHECK-REFERENCE +// RUN: %run %t m1 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER +// RUN: %run %t f1 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN +// RUN: %run %t n1 2>&1 | FileCheck %s --check-prefix=CHECK-NEW #include Index: test/ubsan/TestCases/TypeCheck/null.cpp =================================================================== --- test/ubsan/TestCases/TypeCheck/null.cpp +++ test/ubsan/TestCases/TypeCheck/null.cpp @@ -1,9 +1,9 @@ // RUN: %clangxx -fsanitize=null %s -O3 -o %t -// RUN: %t l 2>&1 | FileCheck %s --check-prefix=CHECK-LOAD -// RUN: %t s 2>&1 | FileCheck %s --check-prefix=CHECK-STORE -// RUN: %t r 2>&1 | FileCheck %s --check-prefix=CHECK-REFERENCE -// RUN: %t m 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER -// RUN: %t f 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN +// RUN: %run %t l 2>&1 | FileCheck %s --check-prefix=CHECK-LOAD +// RUN: %run %t s 2>&1 | FileCheck %s --check-prefix=CHECK-STORE +// RUN: %run %t r 2>&1 | FileCheck %s --check-prefix=CHECK-REFERENCE +// RUN: %run %t m 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER +// RUN: %run %t f 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN struct S { int f() { return 0; } Index: test/ubsan/TestCases/TypeCheck/vptr.cpp =================================================================== --- test/ubsan/TestCases/TypeCheck/vptr.cpp +++ test/ubsan/TestCases/TypeCheck/vptr.cpp @@ -1,15 +1,15 @@ // RUN: %clangxx -fsanitize=vptr %s -O3 -o %t -// RUN: %t rT && %t mT && %t fT && %t cT -// RUN: %t rU && %t mU && %t fU && %t cU -// RUN: %t rS && %t rV && %t oV -// RUN: %t mS 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER --strict-whitespace -// RUN: %t fS 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN --strict-whitespace -// RUN: %t cS 2>&1 | FileCheck %s --check-prefix=CHECK-DOWNCAST --strict-whitespace -// RUN: %t mV 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER --strict-whitespace -// RUN: %t fV 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN --strict-whitespace -// RUN: %t cV 2>&1 | FileCheck %s --check-prefix=CHECK-DOWNCAST --strict-whitespace -// RUN: %t oU 2>&1 | FileCheck %s --check-prefix=CHECK-OFFSET --strict-whitespace -// RUN: %t m0 2>&1 | FileCheck %s --check-prefix=CHECK-NULL-MEMBER --strict-whitespace +// RUN: %run %t rT && %run %t mT && %run %t fT && %run %t cT +// RUN: %run %t rU && %run %t mU && %run %t fU && %run %t cU +// RUN: %run %t rS && %run %t rV && %run %t oV +// RUN: %run %t mS 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER --strict-whitespace +// RUN: %run %t fS 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN --strict-whitespace +// RUN: %run %t cS 2>&1 | FileCheck %s --check-prefix=CHECK-DOWNCAST --strict-whitespace +// RUN: %run %t mV 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER --strict-whitespace +// RUN: %run %t fV 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN --strict-whitespace +// RUN: %run %t cV 2>&1 | FileCheck %s --check-prefix=CHECK-DOWNCAST --strict-whitespace +// RUN: %run %t oU 2>&1 | FileCheck %s --check-prefix=CHECK-OFFSET --strict-whitespace +// RUN: %run %t m0 2>&1 | FileCheck %s --check-prefix=CHECK-NULL-MEMBER --strict-whitespace // FIXME: This test produces linker errors on Darwin. // XFAIL: darwin