diff options
author | Greg Fitzgerald <gregf@codeaurora.org> | 2014-04-30 21:34:17 +0000 |
---|---|---|
committer | Greg Fitzgerald <gregf@codeaurora.org> | 2014-04-30 21:34:17 +0000 |
commit | 226741d639dcde8838728f590fe0d2fd0c339d32 (patch) | |
tree | d4ebc5d36c6d8c6902c43fdad2bc03637eb2df5d | |
parent | 16bae2463f98c0e3988b3bd94fce5012ae6a68ba (diff) |
Add %run to all lit tests
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207709 91177308-0d34-0410-b5e6-96231b3b80d8
422 files changed, 938 insertions, 938 deletions
diff --git a/test/asan/TestCases/Darwin/cstring_literals_regtest.mm b/test/asan/TestCases/Darwin/cstring_literals_regtest.mm index 1bb696c47..bcb15d8f3 100644 --- a/test/asan/TestCases/Darwin/cstring_literals_regtest.mm +++ b/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 <Foundation/Foundation.h> #include <stdio.h> diff --git a/test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc b/test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc index a079f8579..e472a9dc6 100644 --- a/test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc +++ b/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 <stdio.h> #include <string.h> diff --git a/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc b/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc index 807a8283e..2c643bc03 100644 --- a/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc +++ b/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 <malloc/malloc.h> #include <stdlib.h> diff --git a/test/asan/TestCases/Darwin/malloc_zone-protected.cc b/test/asan/TestCases/Darwin/malloc_zone-protected.cc index d5f6c7c12..362b60e20 100644 --- a/test/asan/TestCases/Darwin/malloc_zone-protected.cc +++ b/test/asan/TestCases/Darwin/malloc_zone-protected.cc @@ -3,7 +3,7 @@ #include <stdio.h> // 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) { diff --git a/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc b/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc index 208fe43ac..db6005cba 100644 --- a/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc b/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc index fa0dd4f9d..1f566d898 100644 --- a/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc +++ b/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 <unistd.h> int main(int argc, char *argv[]) { execl(argv[1], argv[1], "DYLD_INSERT_LIBRARIES", NULL); diff --git a/test/asan/TestCases/Linux/asan_dlopen_test.cc b/test/asan/TestCases/Linux/asan_dlopen_test.cc index 83ce4f83b..663675c19 100644 --- a/test/asan/TestCases/Linux/asan_dlopen_test.cc +++ b/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 <dlfcn.h> diff --git a/test/asan/TestCases/Linux/asan_prelink_test.cc b/test/asan/TestCases/Linux/asan_prelink_test.cc index 0f158c1bb..798a542fa 100644 --- a/test/asan/TestCases/Linux/asan_prelink_test.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/asan_preload_test-1.cc b/test/asan/TestCases/Linux/asan_preload_test-1.cc index f6eff8ee1..bc2da3e41 100644 --- a/test/asan/TestCases/Linux/asan_preload_test-1.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/asan_preload_test-2.cc b/test/asan/TestCases/Linux/asan_preload_test-2.cc index a0f88ce93..c3d70426d 100644 --- a/test/asan/TestCases/Linux/asan_preload_test-2.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc b/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc index a66aaf2a8..5687f17c2 100644 --- a/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc b/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc index 3898e7bb1..9ae846815 100644 --- a/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/clone_test.cc b/test/asan/TestCases/Linux/clone_test.cc index 432190a18..bc6ef0857 100644 --- a/test/asan/TestCases/Linux/clone_test.cc +++ b/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 <stdio.h> #include <sched.h> diff --git a/test/asan/TestCases/Linux/coverage.cc b/test/asan/TestCases/Linux/coverage.cc index ea428bc9a..1c829909c 100644 --- a/test/asan/TestCases/Linux/coverage.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/function-sections-are-bad.cc b/test/asan/TestCases/Linux/function-sections-are-bad.cc index 148113297..15aaccbc9 100644 --- a/test/asan/TestCases/Linux/function-sections-are-bad.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/glob.cc b/test/asan/TestCases/Linux/glob.cc index 123768b09..c1dbeda43 100644 --- a/test/asan/TestCases/Linux/glob.cc +++ b/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 <assert.h> #include <glob.h> diff --git a/test/asan/TestCases/Linux/heap-overflow-large.cc b/test/asan/TestCases/Linux/heap-overflow-large.cc index 67e9c3718..26c701546 100644 --- a/test/asan/TestCases/Linux/heap-overflow-large.cc +++ b/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 <stdlib.h> #include <string.h> diff --git a/test/asan/TestCases/Linux/heavy_uar_test.cc b/test/asan/TestCases/Linux/heavy_uar_test.cc index 0e2bf2fee..594aa0545 100644 --- a/test/asan/TestCases/Linux/heavy_uar_test.cc +++ b/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 <stdio.h> #include <string.h> diff --git a/test/asan/TestCases/Linux/initialization-bug-any-order.cc b/test/asan/TestCases/Linux/initialization-bug-any-order.cc index 042a07e42..a462f4a16 100644 --- a/test/asan/TestCases/Linux/initialization-bug-any-order.cc +++ b/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. diff --git a/test/asan/TestCases/Linux/interception-in-shared-lib-test.cc b/test/asan/TestCases/Linux/interception-in-shared-lib-test.cc index 4d6d750bd..b828d5524 100644 --- a/test/asan/TestCases/Linux/interception-in-shared-lib-test.cc +++ b/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 <stdio.h> #include <string.h> diff --git a/test/asan/TestCases/Linux/interception_failure_test.cc b/test/asan/TestCases/Linux/interception_failure_test.cc index 9d161aa2d..a23fe6938 100644 --- a/test/asan/TestCases/Linux/interception_failure_test.cc +++ b/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 <stdlib.h> #include <stdio.h> diff --git a/test/asan/TestCases/Linux/interception_malloc_test.cc b/test/asan/TestCases/Linux/interception_malloc_test.cc index cdd7239ab..f6d6d340b 100644 --- a/test/asan/TestCases/Linux/interception_malloc_test.cc +++ b/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 <stdlib.h> #include <stdio.h> #include <unistd.h> diff --git a/test/asan/TestCases/Linux/interception_readdir_r_test.cc b/test/asan/TestCases/Linux/interception_readdir_r_test.cc index 198e1f388..347320a36 100644 --- a/test/asan/TestCases/Linux/interception_readdir_r_test.cc +++ b/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 <dirent.h> #include <memory.h> diff --git a/test/asan/TestCases/Linux/interception_test.cc b/test/asan/TestCases/Linux/interception_test.cc index 2b3316d7d..fb9d01cfe 100644 --- a/test/asan/TestCases/Linux/interception_test.cc +++ b/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 <stdlib.h> #include <stdio.h> diff --git a/test/asan/TestCases/Linux/kernel-area.cc b/test/asan/TestCases/Linux/kernel-area.cc index ca234d70c..b954ba76b 100644 --- a/test/asan/TestCases/Linux/kernel-area.cc +++ b/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 || diff --git a/test/asan/TestCases/Linux/leak.cc b/test/asan/TestCases/Linux/leak.cc index 85d55c3cb..df6d09034 100644 --- a/test/asan/TestCases/Linux/leak.cc +++ b/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 <stdio.h> int *t; diff --git a/test/asan/TestCases/Linux/malloc-in-qsort.cc b/test/asan/TestCases/Linux/malloc-in-qsort.cc index 3251b35e1..f589e06da 100644 --- a/test/asan/TestCases/Linux/malloc-in-qsort.cc +++ b/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). diff --git a/test/asan/TestCases/Linux/malloc_delete_mismatch.cc b/test/asan/TestCases/Linux/malloc_delete_mismatch.cc index 7010eb2de..c9f61d841 100644 --- a/test/asan/TestCases/Linux/malloc_delete_mismatch.cc +++ b/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 <stdlib.h> static volatile char *x; diff --git a/test/asan/TestCases/Linux/odr-violation.cc b/test/asan/TestCases/Linux/odr-violation.cc index 9deb0b985..cd07c72e9 100644 --- a/test/asan/TestCases/Linux/odr-violation.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/overflow-in-qsort.cc b/test/asan/TestCases/Linux/overflow-in-qsort.cc index 139977261..27b0671c0 100644 --- a/test/asan/TestCases/Linux/overflow-in-qsort.cc +++ b/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). diff --git a/test/asan/TestCases/Linux/preinit_test.cc b/test/asan/TestCases/Linux/preinit_test.cc index 28e509472..4444c1ca4 100644 --- a/test/asan/TestCases/Linux/preinit_test.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/ptrace.cc b/test/asan/TestCases/Linux/ptrace.cc index 8831b81ef..90086a057 100644 --- a/test/asan/TestCases/Linux/ptrace.cc +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/asan/TestCases/Linux/rlimit_mmap_test.cc b/test/asan/TestCases/Linux/rlimit_mmap_test.cc index 0d1d4baa7..7f37727b2 100644 --- a/test/asan/TestCases/Linux/rlimit_mmap_test.cc +++ b/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 <stdlib.h> #include <assert.h> #include <sys/time.h> diff --git a/test/asan/TestCases/Linux/shmctl.cc b/test/asan/TestCases/Linux/shmctl.cc index c2e650a40..5fc9b4642 100644 --- a/test/asan/TestCases/Linux/shmctl.cc +++ b/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 <stdio.h> diff --git a/test/asan/TestCases/Linux/stress_dtls.c b/test/asan/TestCases/Linux/stress_dtls.c index 474bd63f5..814adf3e8 100644 --- a/test/asan/TestCases/Linux/stress_dtls.c +++ b/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 diff --git a/test/asan/TestCases/Linux/swapcontext_test.cc b/test/asan/TestCases/Linux/swapcontext_test.cc index 6cbb69a35..86ed5930b 100644 --- a/test/asan/TestCases/Linux/swapcontext_test.cc +++ b/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 diff --git a/test/asan/TestCases/Linux/syscalls.cc b/test/asan/TestCases/Linux/syscalls.cc index 4bcbe4461..ec14bca76 100644 --- a/test/asan/TestCases/Linux/syscalls.cc +++ b/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 <assert.h> #include <errno.h> diff --git a/test/asan/TestCases/Linux/tsd_dtor_leak.cc b/test/asan/TestCases/Linux/tsd_dtor_leak.cc index 271698226..fdac964bf 100644 --- a/test/asan/TestCases/Linux/tsd_dtor_leak.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/Linux/uar_signals.cc b/test/asan/TestCases/Linux/uar_signals.cc index 0c75344bb..3c50fcfd1 100644 --- a/test/asan/TestCases/Linux/uar_signals.cc +++ b/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 <signal.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/asan/TestCases/Linux/unpoison_tls.cc b/test/asan/TestCases/Linux/unpoison_tls.cc index 60d8ff208..4c693b429 100644 --- a/test/asan/TestCases/Linux/unpoison_tls.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/asan/TestCases/allocator_returns_null.cc b/test/asan/TestCases/allocator_returns_null.cc index fe98eaea9..f3a535d23 100644 --- a/test/asan/TestCases/allocator_returns_null.cc +++ b/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 <limits.h> #include <stdlib.h> diff --git a/test/asan/TestCases/allow_user_segv.cc b/test/asan/TestCases/allow_user_segv.cc index 55cf6044e..1768643dd 100644 --- a/test/asan/TestCases/allow_user_segv.cc +++ b/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 <signal.h> #include <stdio.h> diff --git a/test/asan/TestCases/asan-symbolize-sanity-test.cc b/test/asan/TestCases/asan-symbolize-sanity-test.cc index 6ff3a46ae..8daeac9e4 100644 --- a/test/asan/TestCases/asan-symbolize-sanity-test.cc +++ b/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 <dlfcn.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/assign_large_valloc_to_global.cc b/test/asan/TestCases/assign_large_valloc_to_global.cc index b0a501576..7b49003b6 100644 --- a/test/asan/TestCases/assign_large_valloc_to_global.cc +++ b/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 <stdlib.h> #ifndef __APPLE__ #include <malloc.h> diff --git a/test/asan/TestCases/atexit_stats.cc b/test/asan/TestCases/atexit_stats.cc index eaa1beb47..9273d1c52 100644 --- a/test/asan/TestCases/atexit_stats.cc +++ b/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 diff --git a/test/asan/TestCases/blacklist.cc b/test/asan/TestCases/blacklist.cc index 46625ee7b..7c31484c2 100644 --- a/test/asan/TestCases/blacklist.cc +++ b/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 diff --git a/test/asan/TestCases/contiguous_container.cc b/test/asan/TestCases/contiguous_container.cc index ecb259b1c..e02f0e5eb 100644 --- a/test/asan/TestCases/contiguous_container.cc +++ b/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. diff --git a/test/asan/TestCases/contiguous_container_crash.cc b/test/asan/TestCases/contiguous_container_crash.cc index eba50b125..9f4d55017 100644 --- a/test/asan/TestCases/contiguous_container_crash.cc +++ b/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. diff --git a/test/asan/TestCases/current_allocated_bytes.cc b/test/asan/TestCases/current_allocated_bytes.cc index 353ed725a..a9cd15949 100644 --- a/test/asan/TestCases/current_allocated_bytes.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/asan/TestCases/deep_call_stack.cc b/test/asan/TestCases/deep_call_stack.cc index e24704b90..6716e0a6e 100644 --- a/test/asan/TestCases/deep_call_stack.cc +++ b/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 <stdio.h> __attribute__((noinline)) diff --git a/test/asan/TestCases/deep_stack_uaf.cc b/test/asan/TestCases/deep_stack_uaf.cc index 920411c4a..42b9db25d 100644 --- a/test/asan/TestCases/deep_stack_uaf.cc +++ b/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 <stdlib.h> #include <stdio.h> diff --git a/test/asan/TestCases/deep_tail_call.cc b/test/asan/TestCases/deep_tail_call.cc index 2e7aa8e02..628ef06db 100644 --- a/test/asan/TestCases/deep_tail_call.cc +++ b/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]; diff --git a/test/asan/TestCases/deep_thread_stack.cc b/test/asan/TestCases/deep_thread_stack.cc index 7ea1427a0..1e802b089 100644 --- a/test/asan/TestCases/deep_thread_stack.cc +++ b/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 <pthread.h> diff --git a/test/asan/TestCases/default_options.cc b/test/asan/TestCases/default_options.cc index 84b80557b..c77dd49e6 100644 --- a/test/asan/TestCases/default_options.cc +++ b/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"; diff --git a/test/asan/TestCases/dlclose-test.cc b/test/asan/TestCases/dlclose-test.cc index 2c81e47f9..82819c0a9 100644 --- a/test/asan/TestCases/dlclose-test.cc +++ b/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 <assert.h> #include <dlfcn.h> diff --git a/test/asan/TestCases/double-free.cc b/test/asan/TestCases/double-free.cc index 6bfd4fa2c..b530bfd81 100644 --- a/test/asan/TestCases/double-free.cc +++ b/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 <stdlib.h> #include <string.h> diff --git a/test/asan/TestCases/force_inline_opt0.cc b/test/asan/TestCases/force_inline_opt0.cc index 775a66dfe..e6e5d26c7 100644 --- a/test/asan/TestCases/force_inline_opt0.cc +++ b/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; diff --git a/test/asan/TestCases/free_hook_realloc.cc b/test/asan/TestCases/free_hook_realloc.cc index 7a71964b0..2040cad5d 100644 --- a/test/asan/TestCases/free_hook_realloc.cc +++ b/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 <stdlib.h> #include <unistd.h> diff --git a/test/asan/TestCases/gc-test.cc b/test/asan/TestCases/gc-test.cc index 8115262fa..da8d018f3 100644 --- a/test/asan/TestCases/gc-test.cc +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/asan/TestCases/global-demangle.cc b/test/asan/TestCases/global-demangle.cc index d050b70f0..5f7ff91b1 100644 --- a/test/asan/TestCases/global-demangle.cc +++ b/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 { diff --git a/test/asan/TestCases/global-overflow.cc b/test/asan/TestCases/global-overflow.cc index 0f080f55f..a39a95306 100644 --- a/test/asan/TestCases/global-overflow.cc +++ b/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 <string.h> int main(int argc, char **argv) { diff --git a/test/asan/TestCases/heap-overflow.cc b/test/asan/TestCases/heap-overflow.cc index 2c943a360..6b49c0955 100644 --- a/test/asan/TestCases/heap-overflow.cc +++ b/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 <stdlib.h> #include <string.h> diff --git a/test/asan/TestCases/huge_negative_hea_oob.cc b/test/asan/TestCases/huge_negative_hea_oob.cc index 58a44c5fb..96e7e613d 100644 --- a/test/asan/TestCases/huge_negative_hea_oob.cc +++ b/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 <stdlib.h> #include <string.h> diff --git a/test/asan/TestCases/init-order-atexit.cc b/test/asan/TestCases/init-order-atexit.cc index e38cdd273..c5c61c9d3 100644 --- a/test/asan/TestCases/init-order-atexit.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/init-order-dlopen.cc b/test/asan/TestCases/init-order-dlopen.cc index 4334defd0..18afb0ca1 100644 --- a/test/asan/TestCases/init-order-dlopen.cc +++ b/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 <dlfcn.h> #include <pthread.h> #include <stdio.h> diff --git a/test/asan/TestCases/init-order-pthread-create.cc b/test/asan/TestCases/init-order-pthread-create.cc index 96e0865dc..21abebd60 100644 --- a/test/asan/TestCases/init-order-pthread-create.cc +++ b/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 <stdio.h> #include <pthread.h> diff --git a/test/asan/TestCases/initialization-blacklist.cc b/test/asan/TestCases/initialization-blacklist.cc index f40fcc082..b6b459bdd 100644 --- a/test/asan/TestCases/initialization-blacklist.cc +++ b/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(); diff --git a/test/asan/TestCases/initialization-bug.cc b/test/asan/TestCases/initialization-bug.cc index fb289b1c7..6179f745c 100644 --- a/test/asan/TestCases/initialization-bug.cc +++ b/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. diff --git a/test/asan/TestCases/initialization-constexpr.cc b/test/asan/TestCases/initialization-constexpr.cc index 65c95edd5..3dbbc5e96 100644 --- a/test/asan/TestCases/initialization-constexpr.cc +++ b/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: diff --git a/test/asan/TestCases/initialization-nobug.cc b/test/asan/TestCases/initialization-nobug.cc index ed37d137f..54abd453a 100644 --- a/test/asan/TestCases/initialization-nobug.cc +++ b/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 diff --git a/test/asan/TestCases/inline.cc b/test/asan/TestCases/inline.cc index 792aff59f..daeb7b49e 100644 --- a/test/asan/TestCases/inline.cc +++ b/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. diff --git a/test/asan/TestCases/interface_test.cc b/test/asan/TestCases/interface_test.cc index c7135c15a..dc9d0652c 100644 --- a/test/asan/TestCases/interface_test.cc +++ b/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 <sanitizer/asan_interface.h> int main() { diff --git a/test/asan/TestCases/invalid-free.cc b/test/asan/TestCases/invalid-free.cc index f940b5012..a5c385d0a 100644 --- a/test/asan/TestCases/invalid-free.cc +++ b/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 <stdlib.h> #include <string.h> diff --git a/test/asan/TestCases/ioctl.cc b/test/asan/TestCases/ioctl.cc index 08ca688d3..78f152fe9 100644 --- a/test/asan/TestCases/ioctl.cc +++ b/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 <assert.h> #include <stdlib.h> diff --git a/test/asan/TestCases/large_allocator_unpoisons_on_free.cc b/test/asan/TestCases/large_allocator_unpoisons_on_free.cc index 4d7b7e950..e467f76bd 100644 --- a/test/asan/TestCases/large_allocator_unpoisons_on_free.cc +++ b/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 <assert.h> #include <string.h> diff --git a/test/asan/TestCases/large_func_test.cc b/test/asan/TestCases/large_func_test.cc index 0534bcd31..bdd6f8f23 100644 --- a/test/asan/TestCases/large_func_test.cc +++ b/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 <stdlib.h> __attribute__((noinline)) diff --git a/test/asan/TestCases/log-path_test.cc b/test/asan/TestCases/log-path_test.cc index 1072670fb..af1f53c5d 100644 --- a/test/asan/TestCases/log-path_test.cc +++ b/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.* diff --git a/test/asan/TestCases/log_path_fork_test.cc.disabled b/test/asan/TestCases/log_path_fork_test.cc.disabled index c6c1b49e9..5de95fed4 100644 --- a/test/asan/TestCases/log_path_fork_test.cc.disabled +++ b/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 ] diff --git a/test/asan/TestCases/lsan_annotations.cc b/test/asan/TestCases/lsan_annotations.cc index c55ab8692..f52b0ff66 100644 --- a/test/asan/TestCases/lsan_annotations.cc +++ b/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 <sanitizer/lsan_interface.h> #include <stdlib.h> diff --git a/test/asan/TestCases/malloc_context_size.cc b/test/asan/TestCases/malloc_context_size.cc index 8831de22f..12f02fedc 100644 --- a/test/asan/TestCases/malloc_context_size.cc +++ b/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]; diff --git a/test/asan/TestCases/malloc_fill.cc b/test/asan/TestCases/malloc_fill.cc index 57f50d143..cca8dba11 100644 --- a/test/asan/TestCases/malloc_fill.cc +++ b/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 <stdio.h> int main(int argc, char **argv) { diff --git a/test/asan/TestCases/malloc_hook.cc b/test/asan/TestCases/malloc_hook.cc index 83be1020e..c535ef856 100644 --- a/test/asan/TestCases/malloc_hook.cc +++ b/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 <stdlib.h> #include <unistd.h> diff --git a/test/asan/TestCases/max_redzone.cc b/test/asan/TestCases/max_redzone.cc index dbcedd044..a3beb7ab7 100644 --- a/test/asan/TestCases/max_redzone.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/memcmp_strict_test.cc b/test/asan/TestCases/memcmp_strict_test.cc index e06a8c7e9..1dcc57319 100644 --- a/test/asan/TestCases/memcmp_strict_test.cc +++ b/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 <stdio.h> #include <string.h> diff --git a/test/asan/TestCases/memcmp_test.cc b/test/asan/TestCases/memcmp_test.cc index 758311ddc..3b3b8894b 100644 --- a/test/asan/TestCases/memcmp_test.cc +++ b/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 diff --git a/test/asan/TestCases/memset_test.cc b/test/asan/TestCases/memset_test.cc index fc796f5bc..e244d54de 100644 --- a/test/asan/TestCases/memset_test.cc +++ b/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 <assert.h> diff --git a/test/asan/TestCases/mmap_limit_mb.cc b/test/asan/TestCases/mmap_limit_mb.cc index 5a2b573cf..f9772bd2f 100644 --- a/test/asan/TestCases/mmap_limit_mb.cc +++ b/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 <assert.h> #include <stdlib.h> diff --git a/test/asan/TestCases/null_deref.cc b/test/asan/TestCases/null_deref.cc index bae356ae1..e80657f27 100644 --- a/test/asan/TestCases/null_deref.cc +++ b/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) { diff --git a/test/asan/TestCases/on_error_callback.cc b/test/asan/TestCases/on_error_callback.cc index d0cec2eb2..0ad83d549 100644 --- a/test/asan/TestCases/on_error_callback.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/partial_right.cc b/test/asan/TestCases/partial_right.cc index a000a913d..b60c1a597 100644 --- a/test/asan/TestCases/partial_right.cc +++ b/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 <stdlib.h> int main(int argc, char **argv) { diff --git a/test/asan/TestCases/poison_partial.cc b/test/asan/TestCases/poison_partial.cc index f7c48bf59..320eeab5c 100644 --- a/test/asan/TestCases/poison_partial.cc +++ b/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 <string.h> char g[21]; char *x; diff --git a/test/asan/TestCases/print-stack-trace.cc b/test/asan/TestCases/print-stack-trace.cc index 923fa6580..d6fc65462 100644 --- a/test/asan/TestCases/print-stack-trace.cc +++ b/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 <sanitizer/asan_interface.h> diff --git a/test/asan/TestCases/print_summary.cc b/test/asan/TestCases/print_summary.cc index 949c9b54f..a2f1257c9 100644 --- a/test/asan/TestCases/print_summary.cc +++ b/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]; diff --git a/test/asan/TestCases/printf-1.c b/test/asan/TestCases/printf-1.c index 20618a250..0f1c12517 100644 --- a/test/asan/TestCases/printf-1.c +++ b/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 <stdio.h> int main() { diff --git a/test/asan/TestCases/printf-2.c b/test/asan/TestCases/printf-2.c index 80137d742..5558ad852 100644 --- a/test/asan/TestCases/printf-2.c +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/printf-3.c b/test/asan/TestCases/printf-3.c index 79f51fe24..ee87f7b9e 100644 --- a/test/asan/TestCases/printf-3.c +++ b/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 <stdio.h> int main() { diff --git a/test/asan/TestCases/printf-4.c b/test/asan/TestCases/printf-4.c index e5f9c4ed7..64224f634 100644 --- a/test/asan/TestCases/printf-4.c +++ b/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 <stdio.h> int main() { diff --git a/test/asan/TestCases/printf-5.c b/test/asan/TestCases/printf-5.c index 58f582256..7433ac094 100644 --- a/test/asan/TestCases/printf-5.c +++ b/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 <stdio.h> #include <string.h> diff --git a/test/asan/TestCases/readv.cc b/test/asan/TestCases/readv.cc index ba17505f3..27436a1ad 100644 --- a/test/asan/TestCases/readv.cc +++ b/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. diff --git a/test/asan/TestCases/sanity_check_pure_c.c b/test/asan/TestCases/sanity_check_pure_c.c index 6065532a5..0ec86af5d 100644 --- a/test/asan/TestCases/sanity_check_pure_c.c +++ b/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 <stdlib.h> int main() { diff --git a/test/asan/TestCases/shared-lib-test.cc b/test/asan/TestCases/shared-lib-test.cc index 275d7c753..e11a5066c 100644 --- a/test/asan/TestCases/shared-lib-test.cc +++ b/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 <dlfcn.h> #include <stdio.h> diff --git a/test/asan/TestCases/sleep_before_dying.c b/test/asan/TestCases/sleep_before_dying.c index 8dee9f277..aed4a7513 100644 --- a/test/asan/TestCases/sleep_before_dying.c +++ b/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 <stdlib.h> int main() { diff --git a/test/asan/TestCases/stack-buffer-overflow-with-position.cc b/test/asan/TestCases/stack-buffer-overflow-with-position.cc index 7fbe5c595..88f5825ba 100644 --- a/test/asan/TestCases/stack-buffer-overflow-with-position.cc +++ b/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 <string.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/stack-buffer-overflow.cc b/test/asan/TestCases/stack-buffer-overflow.cc index 325257398..bd0c4772c 100644 --- a/test/asan/TestCases/stack-buffer-overflow.cc +++ b/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 <string.h> int main(int argc, char **argv) { diff --git a/test/asan/TestCases/stack-frame-demangle.cc b/test/asan/TestCases/stack-frame-demangle.cc index 2b83ecc29..11a8b38e6 100644 --- a/test/asan/TestCases/stack-frame-demangle.cc +++ b/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 <string.h> diff --git a/test/asan/TestCases/stack-oob-frames.cc b/test/asan/TestCases/stack-oob-frames.cc index 909e700b3..3b5d511b2 100644 --- a/test/asan/TestCases/stack-oob-frames.cc +++ b/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) { diff --git a/test/asan/TestCases/stack-overflow.cc b/test/asan/TestCases/stack-overflow.cc index 12a5250d9..cde086c0c 100644 --- a/test/asan/TestCases/stack-overflow.cc +++ b/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 <assert.h> #include <stdlib.h> diff --git a/test/asan/TestCases/stack-use-after-return.cc b/test/asan/TestCases/stack-use-after-return.cc index 736eea241..6d30e545b 100644 --- a/test/asan/TestCases/stack-use-after-return.cc +++ b/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 <stdio.h> #include <pthread.h> diff --git a/test/asan/TestCases/start-deactivated.cc b/test/asan/TestCases/start-deactivated.cc index 7e703d67e..bf0b1277d 100644 --- a/test/asan/TestCases/start-deactivated.cc +++ b/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 <dlfcn.h> #include <stdio.h> diff --git a/test/asan/TestCases/strdup_oob_test.cc b/test/asan/TestCases/strdup_oob_test.cc index e92afd3ca..7716ee514 100644 --- a/test/asan/TestCases/strdup_oob_test.cc +++ b/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 <string.h> diff --git a/test/asan/TestCases/strerror_r_test.cc b/test/asan/TestCases/strerror_r_test.cc index d91ad3320..e6df44177 100644 --- a/test/asan/TestCases/strerror_r_test.cc +++ b/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. diff --git a/test/asan/TestCases/strip_path_prefix.c b/test/asan/TestCases/strip_path_prefix.c index c4d6ba49d..7db8245fd 100644 --- a/test/asan/TestCases/strip_path_prefix.c +++ b/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 <stdlib.h> int main() { diff --git a/test/asan/TestCases/strncpy-overflow.cc b/test/asan/TestCases/strncpy-overflow.cc index f91e191fd..0d70b7997 100644 --- a/test/asan/TestCases/strncpy-overflow.cc +++ b/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 diff --git a/test/asan/TestCases/throw_call_test.cc b/test/asan/TestCases/throw_call_test.cc index 3a97a94b6..dff112fca 100644 --- a/test/asan/TestCases/throw_call_test.cc +++ b/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 diff --git a/test/asan/TestCases/throw_catch.cc b/test/asan/TestCases/throw_catch.cc index 593a26981..bb41946ce 100644 --- a/test/asan/TestCases/throw_catch.cc +++ b/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 <assert.h> #include <setjmp.h> diff --git a/test/asan/TestCases/throw_invoke_test.cc b/test/asan/TestCases/throw_invoke_test.cc index 077a940e8..2fc557d68 100644 --- a/test/asan/TestCases/throw_invoke_test.cc +++ b/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 <stdio.h> static volatile int zero = 0; inline void pretend_to_do_something(void *x) { diff --git a/test/asan/TestCases/time_interceptor.cc b/test/asan/TestCases/time_interceptor.cc index 3be00d60c..4fbd43321 100644 --- a/test/asan/TestCases/time_interceptor.cc +++ b/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. diff --git a/test/asan/TestCases/uar_and_exceptions.cc b/test/asan/TestCases/uar_and_exceptions.cc index c967531c2..2e0c864b6 100644 --- a/test/asan/TestCases/uar_and_exceptions.cc +++ b/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 <stdio.h> diff --git a/test/asan/TestCases/unaligned_loads_and_stores.cc b/test/asan/TestCases/unaligned_loads_and_stores.cc index d50566c44..f1b1d0d45 100644 --- a/test/asan/TestCases/unaligned_loads_and_stores.cc +++ b/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 <sanitizer/asan_interface.h> diff --git a/test/asan/TestCases/use-after-delete.cc b/test/asan/TestCases/use-after-delete.cc index 92e172e58..a45c4cfbe 100644 --- a/test/asan/TestCases/use-after-delete.cc +++ b/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 <stdlib.h> int main() { diff --git a/test/asan/TestCases/use-after-free-right.cc b/test/asan/TestCases/use-after-free-right.cc index 88d91f53d..99525a5e4 100644 --- a/test/asan/TestCases/use-after-free-right.cc +++ b/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. diff --git a/test/asan/TestCases/use-after-free.cc b/test/asan/TestCases/use-after-free.cc index 4f31422be..5317b2a04 100644 --- a/test/asan/TestCases/use-after-free.cc +++ b/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 <stdlib.h> int main() { diff --git a/test/asan/TestCases/use-after-poison.cc b/test/asan/TestCases/use-after-poison.cc index e3bc6ecee..f117661ce 100644 --- a/test/asan/TestCases/use-after-poison.cc +++ b/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 <stdlib.h> diff --git a/test/asan/TestCases/use-after-scope-dtor-order.cc b/test/asan/TestCases/use-after-scope-dtor-order.cc index 32fa6ad8a..b045888ec 100644 --- a/test/asan/TestCases/use-after-scope-dtor-order.cc +++ b/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 <stdio.h> struct IntHolder { diff --git a/test/asan/TestCases/use-after-scope-inlined.cc b/test/asan/TestCases/use-after-scope-inlined.cc index 0bad048e3..7e57a6344 100644 --- a/test/asan/TestCases/use-after-scope-inlined.cc +++ b/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; diff --git a/test/asan/TestCases/use-after-scope-nobug.cc b/test/asan/TestCases/use-after-scope-nobug.cc index c23acf76e..0a1bbfed0 100644 --- a/test/asan/TestCases/use-after-scope-nobug.cc +++ b/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 <stdio.h> diff --git a/test/asan/TestCases/use-after-scope-temp.cc b/test/asan/TestCases/use-after-scope-temp.cc index 13d714f9d..f9bd779ac 100644 --- a/test/asan/TestCases/use-after-scope-temp.cc +++ b/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: * diff --git a/test/asan/TestCases/use-after-scope.cc b/test/asan/TestCases/use-after-scope.cc index c46c9594c..4a561e0cc 100644 --- a/test/asan/TestCases/use-after-scope.cc +++ b/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; diff --git a/test/asan/TestCases/wait.cc b/test/asan/TestCases/wait.cc index 730221b32..56a03bd96 100644 --- a/test/asan/TestCases/wait.cc +++ b/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 <assert.h> #include <sys/wait.h> diff --git a/test/asan/TestCases/waitid.cc b/test/asan/TestCases/waitid.cc index 4b42b2c64..edfe3ed72 100644 --- a/test/asan/TestCases/waitid.cc +++ b/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 <assert.h> #include <sys/wait.h> diff --git a/test/dfsan/basic.c b/test/dfsan/basic.c index b566c9271..3c87bdc70 100644 --- a/test/dfsan/basic.c +++ b/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. diff --git a/test/dfsan/custom.c b/test/dfsan/custom.c index 26cf54718..8a7a5483d 100644 --- a/test/dfsan/custom.c +++ b/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. diff --git a/test/dfsan/flags.c b/test/dfsan/flags.c index 5cf970dce..79069b96f 100644 --- a/test/dfsan/flags.c +++ b/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. diff --git a/test/dfsan/fncall.c b/test/dfsan/fncall.c index 15b77bd67..e780f3145 100644 --- a/test/dfsan/fncall.c +++ b/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. diff --git a/test/dfsan/label_count.c b/test/dfsan/label_count.c index 5e368ca1b..a4b608701 100644 --- a/test/dfsan/label_count.c +++ b/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 <sanitizer/dfsan_interface.h> #include <assert.h> diff --git a/test/dfsan/propagate.c b/test/dfsan/propagate.c index 86d182b8a..733538cb1 100644 --- a/test/dfsan/propagate.c +++ b/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. diff --git a/test/dfsan/write_callback.c b/test/dfsan/write_callback.c index f9c74ec68..bb35f3250 100644 --- a/test/dfsan/write_callback.c +++ b/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(). diff --git a/test/lsan/TestCases/cleanup_in_tsd_destructor.cc b/test/lsan/TestCases/cleanup_in_tsd_destructor.cc index 1cae226d4..5335454ff 100644 --- a/test/lsan/TestCases/cleanup_in_tsd_destructor.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/lsan/TestCases/disabler.cc b/test/lsan/TestCases/disabler.cc index db0cd8fab..f83106501 100644 --- a/test/lsan/TestCases/disabler.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/disabler_in_tsd_destructor.cc b/test/lsan/TestCases/disabler_in_tsd_destructor.cc index 94e4fc390..a0012c74d 100644 --- a/test/lsan/TestCases/disabler_in_tsd_destructor.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/lsan/TestCases/do_leak_check_override.cc b/test/lsan/TestCases/do_leak_check_override.cc index be0ed0a6d..bedb0cad6 100644 --- a/test/lsan/TestCases/do_leak_check_override.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/fork.cc b/test/lsan/TestCases/fork.cc index 69258d9a0..9e72fe871 100644 --- a/test/lsan/TestCases/fork.cc +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/lsan/TestCases/fork_threaded.cc b/test/lsan/TestCases/fork_threaded.cc index 24a586109..62702b4df 100644 --- a/test/lsan/TestCases/fork_threaded.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/lsan/TestCases/high_allocator_contention.cc b/test/lsan/TestCases/high_allocator_contention.cc index 1cecb2a55..2543897bc 100644 --- a/test/lsan/TestCases/high_allocator_contention.cc +++ b/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 <assert.h> #include <pthread.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/ignore_object.cc b/test/lsan/TestCases/ignore_object.cc index 4cf303b00..133ccc75f 100644 --- a/test/lsan/TestCases/ignore_object.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/ignore_object_errors.cc b/test/lsan/TestCases/ignore_object_errors.cc index c49d2c7ea..7ca2a4f82 100644 --- a/test/lsan/TestCases/ignore_object_errors.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/large_allocation_leak.cc b/test/lsan/TestCases/large_allocation_leak.cc index 38219341d..f41143a8a 100644 --- a/test/lsan/TestCases/large_allocation_leak.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/leak_check_at_exit.cc b/test/lsan/TestCases/leak_check_at_exit.cc index d921afc84..3e4ccd782 100644 --- a/test/lsan/TestCases/leak_check_at_exit.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/link_turned_off.cc b/test/lsan/TestCases/link_turned_off.cc index 93628a1d1..2482f6197 100644 --- a/test/lsan/TestCases/link_turned_off.cc +++ b/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 <sanitizer/lsan_interface.h> diff --git a/test/lsan/TestCases/new_array_with_dtor_0.cc b/test/lsan/TestCases/new_array_with_dtor_0.cc index 3784d81a5..59259616e 100644 --- a/test/lsan/TestCases/new_array_with_dtor_0.cc +++ b/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 <stdio.h> diff --git a/test/lsan/TestCases/pointer_to_self.cc b/test/lsan/TestCases/pointer_to_self.cc index c638c2b7e..63bde2ccf 100644 --- a/test/lsan/TestCases/pointer_to_self.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/print_suppressions.cc b/test/lsan/TestCases/print_suppressions.cc index 97e67a016..b292c0a7c 100644 --- a/test/lsan/TestCases/print_suppressions.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/register_root_region.cc b/test/lsan/TestCases/register_root_region.cc index 27349aaef..acc8e1b27 100644 --- a/test/lsan/TestCases/register_root_region.cc +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/lsan/TestCases/stale_stack_leak.cc b/test/lsan/TestCases/stale_stack_leak.cc index 4a53910ab..0fbe42ce9 100644 --- a/test/lsan/TestCases/stale_stack_leak.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/suppressions_default.cc b/test/lsan/TestCases/suppressions_default.cc index 968074662..b4c0de016 100644 --- a/test/lsan/TestCases/suppressions_default.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/suppressions_file.cc b/test/lsan/TestCases/suppressions_file.cc index bc8913a6c..16ad93234 100644 --- a/test/lsan/TestCases/suppressions_file.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/swapcontext.cc b/test/lsan/TestCases/swapcontext.cc index a06685ca2..1bb6057ff 100644 --- a/test/lsan/TestCases/swapcontext.cc +++ b/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 <stdio.h> #include <ucontext.h> diff --git a/test/lsan/TestCases/use_after_return.cc b/test/lsan/TestCases/use_after_return.cc index ffa20f399..eb917c01e 100644 --- a/test/lsan/TestCases/use_after_return.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/use_globals_initialized.cc b/test/lsan/TestCases/use_globals_initialized.cc index 2a5331cfd..172d22a9f 100644 --- a/test/lsan/TestCases/use_globals_initialized.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/use_globals_uninitialized.cc b/test/lsan/TestCases/use_globals_uninitialized.cc index 9fdb1fdd5..2daa66161 100644 --- a/test/lsan/TestCases/use_globals_uninitialized.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/use_poisoned_asan.cc b/test/lsan/TestCases/use_poisoned_asan.cc index 1a72ac223..a1c544c55 100644 --- a/test/lsan/TestCases/use_poisoned_asan.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/use_registers.cc b/test/lsan/TestCases/use_registers.cc index 1a90994e3..d436144a8 100644 --- a/test/lsan/TestCases/use_registers.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/lsan/TestCases/use_stacks.cc b/test/lsan/TestCases/use_stacks.cc index aea90bba1..7afcde15c 100644 --- a/test/lsan/TestCases/use_stacks.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/use_stacks_threaded.cc b/test/lsan/TestCases/use_stacks_threaded.cc index bcb4b1e2d..fc4e661c2 100644 --- a/test/lsan/TestCases/use_stacks_threaded.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/lsan/TestCases/use_tls_dynamic.cc b/test/lsan/TestCases/use_tls_dynamic.cc index 552206a14..860db041a 100644 --- a/test/lsan/TestCases/use_tls_dynamic.cc +++ b/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 <assert.h> diff --git a/test/lsan/TestCases/use_tls_pthread_specific_dynamic.cc b/test/lsan/TestCases/use_tls_pthread_specific_dynamic.cc index cfb6b2dd9..14883712e 100644 --- a/test/lsan/TestCases/use_tls_pthread_specific_dynamic.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/lsan/TestCases/use_tls_pthread_specific_static.cc b/test/lsan/TestCases/use_tls_pthread_specific_static.cc index 4def4c021..1fd5681b6 100644 --- a/test/lsan/TestCases/use_tls_pthread_specific_static.cc +++ b/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 <assert.h> #include <pthread.h> diff --git a/test/lsan/TestCases/use_tls_static.cc b/test/lsan/TestCases/use_tls_static.cc index 1c5512568..50db23abb 100644 --- a/test/lsan/TestCases/use_tls_static.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/use_unaligned.cc b/test/lsan/TestCases/use_unaligned.cc index 50eb74952..3e43ed4c0 100644 --- a/test/lsan/TestCases/use_unaligned.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/msan/Linux/getresid.cc b/test/msan/Linux/getresid.cc index 5021009e8..385351dfd 100644 --- a/test/msan/Linux/getresid.cc +++ b/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 <assert.h> #include <unistd.h> diff --git a/test/msan/Linux/glob.cc b/test/msan/Linux/glob.cc index 387ce3cf5..8604e4d76 100644 --- a/test/msan/Linux/glob.cc +++ b/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 <assert.h> #include <glob.h> diff --git a/test/msan/Linux/glob_altdirfunc.cc b/test/msan/Linux/glob_altdirfunc.cc index b8200c3ee..2c02e735e 100644 --- a/test/msan/Linux/glob_altdirfunc.cc +++ b/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 <assert.h> #include <glob.h> diff --git a/test/msan/Linux/glob_nomatch.cc b/test/msan/Linux/glob_nomatch.cc index 0262034ae..bc35c30d6 100644 --- a/test/msan/Linux/glob_nomatch.cc +++ b/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 <assert.h> #include <glob.h> diff --git a/test/msan/Linux/sunrpc.cc b/test/msan/Linux/sunrpc.cc index 3d2bb3994..78645a7dc 100644 --- a/test/msan/Linux/sunrpc.cc +++ b/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 <assert.h> #include <rpc/xdr.h> diff --git a/test/msan/Linux/sunrpc_bytes.cc b/test/msan/Linux/sunrpc_bytes.cc index be8f6be8f..f0c35746f 100644 --- a/test/msan/Linux/sunrpc_bytes.cc +++ b/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 <assert.h> #include <string.h> diff --git a/test/msan/Linux/sunrpc_string.cc b/test/msan/Linux/sunrpc_string.cc index e800dea19..3f44a96d1 100644 --- a/test/msan/Linux/sunrpc_string.cc +++ b/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 <assert.h> #include <string.h> diff --git a/test/msan/Linux/syscalls.cc b/test/msan/Linux/syscalls.cc index ab5be3802..39b893b8e 100644 --- a/test/msan/Linux/syscalls.cc +++ b/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 <assert.h> #include <errno.h> diff --git a/test/msan/Linux/tcgetattr.cc b/test/msan/Linux/tcgetattr.cc index e6e101db8..e1425b84f 100644 --- a/test/msan/Linux/tcgetattr.cc +++ b/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 <assert.h> #include <glob.h> diff --git a/test/msan/Linux/xattr.cc b/test/msan/Linux/xattr.cc index 43d5e1f67..1beba117d 100644 --- a/test/msan/Linux/xattr.cc +++ b/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 <argz.h> #include <assert.h> diff --git a/test/msan/allocator_returns_null.cc b/test/msan/allocator_returns_null.cc index aaa85cce7..f4ea51d58 100644 --- a/test/msan/allocator_returns_null.cc +++ b/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 <limits.h> #include <stdlib.h> diff --git a/test/msan/backtrace.cc b/test/msan/backtrace.cc index 48684c29c..473e0ae8f 100644 --- a/test/msan/backtrace.cc +++ b/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 <assert.h> #include <execinfo.h> diff --git a/test/msan/c-strdup.c b/test/msan/c-strdup.c index 7772f0f30..059300e42 100644 --- a/test/msan/c-strdup.c +++ b/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. diff --git a/test/msan/chained_origin.cc b/test/msan/chained_origin.cc index 4dd357bbc..f69de9aba 100644 --- a/test/msan/chained_origin.cc +++ b/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 <stdio.h> diff --git a/test/msan/chained_origin_memcpy.cc b/test/msan/chained_origin_memcpy.cc index e53416403..e56db9c87 100644 --- a/test/msan/chained_origin_memcpy.cc +++ b/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 <stdio.h> diff --git a/test/msan/chained_origin_with_signals.cc b/test/msan/chained_origin_with_signals.cc index 7141d41e0..5fd497eae 100644 --- a/test/msan/chained_origin_with_signals.cc +++ b/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 <signal.h> diff --git a/test/msan/check_mem_is_initialized.cc b/test/msan/check_mem_is_initialized.cc index ece8995d9..7d2328810 100644 --- a/test/msan/check_mem_is_initialized.cc +++ b/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 <sanitizer/msan_interface.h> diff --git a/test/msan/cxa_atexit.cc b/test/msan/cxa_atexit.cc index f3641aadc..0aa36ecee 100644 --- a/test/msan/cxa_atexit.cc +++ b/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. diff --git a/test/msan/death-callback.cc b/test/msan/death-callback.cc index 103b0e66a..6d0488339 100644 --- a/test/msan/death-callback.cc +++ b/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 <sanitizer/msan_interface.h> diff --git a/test/msan/dlerror.cc b/test/msan/dlerror.cc index 281b3164f..2c726d360 100644 --- a/test/msan/dlerror.cc +++ b/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 <assert.h> #include <dlfcn.h> diff --git a/test/msan/dso-origin.cc b/test/msan/dso-origin.cc index 13661c65e..9bde029a9 100644 --- a/test/msan/dso-origin.cc +++ b/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 <stdlib.h> diff --git a/test/msan/dtls_test.c b/test/msan/dtls_test.c index c88e50f1d..5086389f6 100644 --- a/test/msan/dtls_test.c +++ b/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, diff --git a/test/msan/errno.cc b/test/msan/errno.cc index af27ad0b0..8af8eb5ee 100644 --- a/test/msan/errno.cc +++ b/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 <assert.h> #include <errno.h> diff --git a/test/msan/ftime.cc b/test/msan/ftime.cc index 2e908febe..2d0935d18 100644 --- a/test/msan/ftime.cc +++ b/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 <assert.h> #include <sys/timeb.h> diff --git a/test/msan/getaddrinfo-positive.cc b/test/msan/getaddrinfo-positive.cc index 7fde1fdfa..d169cfb01 100644 --- a/test/msan/getaddrinfo-positive.cc +++ b/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 <sys/types.h> diff --git a/test/msan/getaddrinfo.cc b/test/msan/getaddrinfo.cc index 0518cf473..abab8bd78 100644 --- a/test/msan/getaddrinfo.cc +++ b/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 <sys/types.h> #include <sys/socket.h> diff --git a/test/msan/getc_unlocked.c b/test/msan/getc_unlocked.c index 805806ffb..7df958ad6 100644 --- a/test/msan/getc_unlocked.c +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/msan/getline.cc b/test/msan/getline.cc index 27168a885..086d0b951 100644 --- a/test/msan/getline.cc +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/msan/heap-origin.cc b/test/msan/heap-origin.cc index dfe7edd27..0920001be 100644 --- a/test/msan/heap-origin.cc +++ b/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 <stdlib.h> diff --git a/test/msan/iconv.cc b/test/msan/iconv.cc index e7c30edd9..ea6958b79 100644 --- a/test/msan/iconv.cc +++ b/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 <assert.h> #include <iconv.h> diff --git a/test/msan/if_indextoname.cc b/test/msan/if_indextoname.cc index 7a5ba3599..b74aec16c 100644 --- a/test/msan/if_indextoname.cc +++ b/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 <assert.h> #include <errno.h> diff --git a/test/msan/ifaddrs.cc b/test/msan/ifaddrs.cc index fe11a9542..6a0db3a5b 100644 --- a/test/msan/ifaddrs.cc +++ b/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 <assert.h> #include <errno.h> diff --git a/test/msan/initgroups.cc b/test/msan/initgroups.cc index adba53695..94f6cd825 100644 --- a/test/msan/initgroups.cc +++ b/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 <sys/types.h> #include <grp.h> diff --git a/test/msan/inline.cc b/test/msan/inline.cc index 4aeb15583..b2fa96150 100644 --- a/test/msan/inline.cc +++ b/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. diff --git a/test/msan/insertvalue_origin.cc b/test/msan/insertvalue_origin.cc index 769ea45f8..545debffa 100644 --- a/test/msan/insertvalue_origin.cc +++ b/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. diff --git a/test/msan/ioctl.cc b/test/msan/ioctl.cc index caff80c2e..caa5c274f 100644 --- a/test/msan/ioctl.cc +++ b/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 <assert.h> #include <stdlib.h> diff --git a/test/msan/ioctl_custom.cc b/test/msan/ioctl_custom.cc index 94ed528c7..dea65153e 100644 --- a/test/msan/ioctl_custom.cc +++ b/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 <assert.h> #include <stdlib.h> diff --git a/test/msan/ioctl_sound.cc b/test/msan/ioctl_sound.cc index 0611e0dc4..ed896f761 100644 --- a/test/msan/ioctl_sound.cc +++ b/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 <assert.h> #include <fcntl.h> diff --git a/test/msan/keep-going-dso.cc b/test/msan/keep-going-dso.cc index 6d006756a..7975306c5 100644 --- a/test/msan/keep-going-dso.cc +++ b/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 diff --git a/test/msan/keep-going.cc b/test/msan/keep-going.cc index e33b137c7..6426574a9 100644 --- a/test/msan/keep-going.cc +++ b/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. diff --git a/test/msan/mallinfo.cc b/test/msan/mallinfo.cc index ddd218b7d..3f3086830 100644 --- a/test/msan/mallinfo.cc +++ b/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 <assert.h> #include <malloc.h> diff --git a/test/msan/malloc_hook.cc b/test/msan/malloc_hook.cc index fc68fbc35..539308034 100644 --- a/test/msan/malloc_hook.cc +++ b/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 <stdlib.h> #include <unistd.h> diff --git a/test/msan/mktime.cc b/test/msan/mktime.cc index d347ee3c1..c419057c3 100644 --- a/test/msan/mktime.cc +++ b/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 <assert.h> #include <time.h> diff --git a/test/msan/mmap_below_shadow.cc b/test/msan/mmap_below_shadow.cc index eb8b0e981..4b5890ba0 100644 --- a/test/msan/mmap_below_shadow.cc +++ b/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 <assert.h> #include <errno.h> diff --git a/test/msan/msan_dump_shadow.cc b/test/msan/msan_dump_shadow.cc index 507a09991..08371e306 100644 --- a/test/msan/msan_dump_shadow.cc +++ b/test/msan/msan_dump_shadow.cc @@ -1,10 +1,10 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out #include <sanitizer/msan_interface.h> diff --git a/test/msan/msan_print_shadow.cc b/test/msan/msan_print_shadow.cc index b33bae0e9..0cc1d660b 100644 --- a/test/msan/msan_print_shadow.cc +++ b/test/msan/msan_print_shadow.cc @@ -1,10 +1,10 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NO-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ORIGINS --check-prefix=CHECK-ORIGINS-2 < %t.out #include <sanitizer/msan_interface.h> diff --git a/test/msan/msan_print_shadow2.cc b/test/msan/msan_print_shadow2.cc index bd7a78794..8994b9e3c 100644 --- a/test/msan/msan_print_shadow2.cc +++ b/test/msan/msan_print_shadow2.cc @@ -1,10 +1,10 @@ -// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NO-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ORIGINS < %t.out -// RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O0 -g %s -o %t && %t >%t.out 2>&1 +// RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O0 -g %s -o %t && %run %t >%t.out 2>&1 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ORIGINS < %t.out #include <sanitizer/msan_interface.h> diff --git a/test/msan/no_sanitize_memory.cc b/test/msan/no_sanitize_memory.cc index 48afc17e3..c5643816c 100644 --- a/test/msan/no_sanitize_memory.cc +++ b/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) diff --git a/test/msan/no_sanitize_memory_prop.cc b/test/msan/no_sanitize_memory_prop.cc index 355152478..b41e8a151 100644 --- a/test/msan/no_sanitize_memory_prop.cc +++ b/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. diff --git a/test/msan/open_memstream.cc b/test/msan/open_memstream.cc index af3f795d9..e2b914b0f 100644 --- a/test/msan/open_memstream.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/msan/poison_in_free.cc b/test/msan/poison_in_free.cc index f134d05ab..16e2124c3 100644 --- a/test/msan/poison_in_free.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/msan/pthread_getattr_np_deadlock.cc b/test/msan/pthread_getattr_np_deadlock.cc index 44dfc19b9..07f19cb61 100644 --- a/test/msan/pthread_getattr_np_deadlock.cc +++ b/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 diff --git a/test/msan/ptrace.cc b/test/msan/ptrace.cc index d0e83eabd..1dd4fae29 100644 --- a/test/msan/ptrace.cc +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/msan/rand_r.cc b/test/msan/rand_r.cc index 57574f00b..d6bdb1dea 100644 --- a/test/msan/rand_r.cc +++ b/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 <assert.h> #include <stdio.h> diff --git a/test/msan/readdir64.cc b/test/msan/readdir64.cc index 0ec106c74..4f00d1838 100644 --- a/test/msan/readdir64.cc +++ b/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. diff --git a/test/msan/scandir.cc b/test/msan/scandir.cc index 94672e1ad..571ba4f60 100644 --- a/test/msan/scandir.cc +++ b/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 <assert.h> #include <glob.h> diff --git a/test/msan/scandir_null.cc b/test/msan/scandir_null.cc index 84af7f418..e7663dc43 100644 --- a/test/msan/scandir_null.cc +++ b/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 <assert.h> #include <glob.h> diff --git a/test/msan/select.cc b/test/msan/select.cc index a169a2dd9..89de75eba 100644 --- a/test/msan/select.cc +++ b/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 <stdlib.h> diff --git a/test/msan/select_origin.cc b/test/msan/select_origin.cc index f6f6a61b4..e832c02e9 100644 --- a/test/msan/select_origin.cc +++ b/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. diff --git a/test/msan/setlocale.cc b/test/msan/setlocale.cc index a22b744d7..b7007f78d 100644 --- a/test/msan/setlocale.cc +++ b/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 <assert.h> #include <locale.h> diff --git a/test/msan/signal_stress_test.cc b/test/msan/signal_stress_test.cc index ea75eae1b..654b9676f 100644 --- a/test/msan/signal_stress_test.cc +++ b/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. diff --git a/test/msan/sigwait.cc b/test/msan/sigwait.cc index 29aa86c93..f2e77cfd6 100644 --- a/test/msan/sigwait.cc +++ b/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 <assert.h> #include <sanitizer/msan_interface.h> diff --git a/test/msan/sigwaitinfo.cc b/test/msan/sigwaitinfo.cc index d4f004598..be7a2c009 100644 --- a/test/msan/sigwaitinfo.cc +++ b/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 <assert.h> #include <sanitizer/msan_interface.h> diff --git a/test/msan/stack-origin.cc b/test/msan/stack-origin.cc index b0b05d965..c39c3a8cf 100644 --- a/test/msan/stack-origin.cc +++ b/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 <stdlib.h> diff --git a/test/msan/strerror_r-non-gnu.c b/test/msan/strerror_r-non-gnu.c index 8fb470558..d55bf42ef 100644 --- a/test/msan/strerror_r-non-gnu.c +++ b/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. diff --git a/test/msan/strlen_of_shadow.cc b/test/msan/strlen_of_shadow.cc index cb2530e8f..bb9fe17d4 100644 --- a/test/msan/strlen_of_shadow.cc +++ b/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. diff --git a/test/msan/sync_lock_set_and_test.cc b/test/msan/sync_lock_set_and_test.cc index 1023b3e54..b6d344a61 100644 --- a/test/msan/sync_lock_set_and_test.cc +++ b/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; diff --git a/test/msan/textdomain.cc b/test/msan/textdomain.cc index e3968233a..47e991e8c 100644 --- a/test/msan/textdomain.cc +++ b/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 <libintl.h> #include <stdio.h> diff --git a/test/msan/times.cc b/test/msan/times.cc index 1b7d00052..a042f548d 100644 --- a/test/msan/times.cc +++ b/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 <assert.h> #include <stdlib.h> diff --git a/test/msan/tls_reuse.cc b/test/msan/tls_reuse.cc index e1de7e87a..e024a5a8d 100644 --- a/test/msan/tls_reuse.cc +++ b/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. diff --git a/test/msan/tsearch.cc b/test/msan/tsearch.cc index cae017ead..653dc6037 100644 --- a/test/msan/tsearch.cc +++ b/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 <assert.h> #include <search.h> diff --git a/test/msan/tzset.cc b/test/msan/tzset.cc index 7e1c2cfad..ed61d7bcc 100644 --- a/test/msan/tzset.cc +++ b/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 <stdlib.h> #include <string.h> diff --git a/test/msan/unaligned_read_origin.cc b/test/msan/unaligned_read_origin.cc index fa29ab69d..e5618efbd 100644 --- a/test/msan/unaligned_read_origin.cc +++ b/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 <sanitizer/msan_interface.h> diff --git a/test/msan/unpoison_string.cc b/test/msan/unpoison_string.cc index 089616df0..ac947b9cf 100644 --- a/test/msan/unpoison_string.cc +++ b/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 <assert.h> #include <string.h> diff --git a/test/msan/use-after-free.cc b/test/msan/use-after-free.cc index ac47c0233..5b408c536 100644 --- a/test/msan/use-after-free.cc +++ b/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 <stdlib.h> diff --git a/test/msan/vector_cvt.cc b/test/msan/vector_cvt.cc index c200c77de..6393339ec 100644 --- a/test/msan/vector_cvt.cc +++ b/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 <emmintrin.h> diff --git a/test/msan/wrap_indirect_calls.cc b/test/msan/wrap_indirect_calls.cc index b4bac1ecb..be17bd824 100644 --- a/test/msan/wrap_indirect_calls.cc +++ b/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(); diff --git a/test/msan/wrap_indirect_calls2.cc b/test/msan/wrap_indirect_calls2.cc index c188047ce..fb4e6c798 100644 --- a/test/msan/wrap_indirect_calls2.cc +++ b/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. diff --git a/test/msan/wrap_indirect_calls_in_rtl.cc b/test/msan/wrap_indirect_calls_in_rtl.cc index 0d9051ba7..bfc60d7c2 100644 --- a/test/msan/wrap_indirect_calls_in_rtl.cc +++ b/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 <assert.h> #include <math.h> diff --git a/test/tsan/aligned_vs_unaligned_race.cc b/test/tsan/aligned_vs_unaligned_race.cc index f4533d083..f82542ed2 100644 --- a/test/tsan/aligned_vs_unaligned_race.cc +++ b/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. diff --git a/test/tsan/allocator_returns_null.cc b/test/tsan/allocator_returns_null.cc index 4b5eb5504..2058c961c 100644 --- a/test/tsan/allocator_returns_null.cc +++ b/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 <limits.h> #include <stdlib.h> diff --git a/test/tsan/atomic_free.cc b/test/tsan/atomic_free.cc index 87d559362..c36b8fb36 100644 --- a/test/tsan/atomic_free.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/atomic_free2.cc b/test/tsan/atomic_free2.cc index 961ff38c8..11204ba77 100644 --- a/test/tsan/atomic_free2.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/atomic_norace.cc b/test/tsan/atomic_norace.cc index 265459b07..d9ccda588 100644 --- a/test/tsan/atomic_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/atomic_race.cc b/test/tsan/atomic_race.cc index 0dfe4d93d..e64ef96ed 100644 --- a/test/tsan/atomic_race.cc +++ b/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 <pthread.h> #include <unistd.h> #include <stdio.h> diff --git a/test/tsan/atomic_stack.cc b/test/tsan/atomic_stack.cc index 841f74b89..d28b5b962 100644 --- a/test/tsan/atomic_stack.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/barrier.cc b/test/tsan/barrier.cc index f912e154f..d8c2b6ffe 100644 --- a/test/tsan/barrier.cc +++ b/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 diff --git a/test/tsan/bench_acquire_only.cc b/test/tsan/bench_acquire_only.cc index f480f0914..5cd6bd74e 100644 --- a/test/tsan/bench_acquire_only.cc +++ b/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" diff --git a/test/tsan/bench_acquire_release.cc b/test/tsan/bench_acquire_release.cc index 270f00745..9e53a7b26 100644 --- a/test/tsan/bench_acquire_release.cc +++ b/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" diff --git a/test/tsan/bench_local_mutex.cc b/test/tsan/bench_local_mutex.cc index 3b656b7b0..0fa1db0c8 100644 --- a/test/tsan/bench_local_mutex.cc +++ b/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" diff --git a/test/tsan/bench_mutex.cc b/test/tsan/bench_mutex.cc index 4e5b3d6eb..324d53fd7 100644 --- a/test/tsan/bench_mutex.cc +++ b/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" diff --git a/test/tsan/bench_release_only.cc b/test/tsan/bench_release_only.cc index 556c8bcd9..0a86f73f2 100644 --- a/test/tsan/bench_release_only.cc +++ b/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" diff --git a/test/tsan/bench_rwmutex.cc b/test/tsan/bench_rwmutex.cc index f38f6e516..818ee8c82 100644 --- a/test/tsan/bench_rwmutex.cc +++ b/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" diff --git a/test/tsan/bench_shadow_flush.cc b/test/tsan/bench_shadow_flush.cc index bd85cba51..cdad47750 100644 --- a/test/tsan/bench_shadow_flush.cc +++ b/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 <pthread.h> #include <stdlib.h> diff --git a/test/tsan/bench_single_writer.cc b/test/tsan/bench_single_writer.cc index bd3d87ede..0d3810a03 100644 --- a/test/tsan/bench_single_writer.cc +++ b/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" diff --git a/test/tsan/bench_ten_mutexes.cc b/test/tsan/bench_ten_mutexes.cc index 994d2ac99..876f1365e 100644 --- a/test/tsan/bench_ten_mutexes.cc +++ b/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" diff --git a/test/tsan/benign_race.cc b/test/tsan/benign_race.cc index a4d4d23c3..b6cba19aa 100644 --- a/test/tsan/benign_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/blacklist.cc b/test/tsan/blacklist.cc index 5baf926e6..ab6f1d13d 100644 --- a/test/tsan/blacklist.cc +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/cond.c b/test/tsan/cond.c index 52c87a413..05ea672c6 100644 --- a/test/tsan/cond.c +++ b/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 diff --git a/test/tsan/cond_cancel.c b/test/tsan/cond_cancel.c index e37621dda..397cad4b1 100644 --- a/test/tsan/cond_cancel.c +++ b/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 diff --git a/test/tsan/cond_race.cc b/test/tsan/cond_race.cc index 08d6901e6..375bd920a 100644 --- a/test/tsan/cond_race.cc +++ b/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 diff --git a/test/tsan/cond_version.c b/test/tsan/cond_version.c index 1f966bfac..2282c3ad7 100644 --- a/test/tsan/cond_version.c +++ b/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 diff --git a/test/tsan/deadlock_detector_stress_test.cc b/test/tsan/deadlock_detector_stress_test.cc index cd1ef5b41..ac9fcbd5e 100644 --- a/test/tsan/deadlock_detector_stress_test.cc +++ b/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 <pthread.h> #undef NDEBUG #include <assert.h> diff --git a/test/tsan/deep_stack1.cc b/test/tsan/deep_stack1.cc index 3048aa874..617f102b1 100644 --- a/test/tsan/deep_stack1.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/default_options.cc b/test/tsan/default_options.cc index 62c6c028f..77bdcd508 100644 --- a/test/tsan/default_options.cc +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/fd_close_norace.cc b/test/tsan/fd_close_norace.cc index a8b1a6d7b..7238d64b4 100644 --- a/test/tsan/fd_close_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fd_close_norace2.cc b/test/tsan/fd_close_norace2.cc index b42b334a2..bf94fd551 100644 --- a/test/tsan/fd_close_norace2.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fd_dup_norace.cc b/test/tsan/fd_dup_norace.cc index 8826f90fc..5045325b2 100644 --- a/test/tsan/fd_dup_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fd_location.cc b/test/tsan/fd_location.cc index 2b1e9c56e..ebe33be75 100644 --- a/test/tsan/fd_location.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fd_pipe_norace.cc b/test/tsan/fd_pipe_norace.cc index 2da69ea21..b434703d7 100644 --- a/test/tsan/fd_pipe_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fd_pipe_race.cc b/test/tsan/fd_pipe_race.cc index 4dd2b7786..384cafa19 100644 --- a/test/tsan/fd_pipe_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fd_socket_connect_norace.cc b/test/tsan/fd_socket_connect_norace.cc index 065299a9c..ab2a950f1 100644 --- a/test/tsan/fd_socket_connect_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/fd_socket_norace.cc b/test/tsan/fd_socket_norace.cc index 243fc9de2..0f41c4357 100644 --- a/test/tsan/fd_socket_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/fd_socketpair_norace.cc b/test/tsan/fd_socketpair_norace.cc index f91e4eca0..a455d44a3 100644 --- a/test/tsan/fd_socketpair_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fd_stdout_race.cc b/test/tsan/fd_stdout_race.cc index 4b512bb78..47f3c6f6c 100644 --- a/test/tsan/fd_stdout_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/fork_atexit.cc b/test/tsan/fork_atexit.cc index 1692b6cb5..6801d3fff 100644 --- a/test/tsan/fork_atexit.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/fork_deadlock.cc b/test/tsan/fork_deadlock.cc index 09500b5be..cc5b12214 100644 --- a/test/tsan/fork_deadlock.cc +++ b/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 <stdlib.h> #include <stdio.h> #include <errno.h> diff --git a/test/tsan/fork_multithreaded.cc b/test/tsan/fork_multithreaded.cc index cceb83ec2..5176a14d6 100644 --- a/test/tsan/fork_multithreaded.cc +++ b/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 <stdlib.h> #include <stdio.h> #include <errno.h> diff --git a/test/tsan/fork_multithreaded3.cc b/test/tsan/fork_multithreaded3.cc index c4ebcce1a..a651b3c18 100644 --- a/test/tsan/fork_multithreaded3.cc +++ b/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 <stdlib.h> #include <stdio.h> #include <errno.h> diff --git a/test/tsan/free_race.c b/test/tsan/free_race.c index d1db9fece..040f22334 100644 --- a/test/tsan/free_race.c +++ b/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 <pthread.h> #include <stdlib.h> diff --git a/test/tsan/free_race2.c b/test/tsan/free_race2.c index 2b9a41927..2b979f311 100644 --- a/test/tsan/free_race2.c +++ b/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 <stdlib.h> void __attribute__((noinline)) foo(int *mem) { diff --git a/test/tsan/getline_nohang.cc b/test/tsan/getline_nohang.cc index 1dd17f064..ce9d35881 100644 --- a/test/tsan/getline_nohang.cc +++ b/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 diff --git a/test/tsan/global_race.cc b/test/tsan/global_race.cc index 0e3ce2e50..d28700cbc 100644 --- a/test/tsan/global_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stddef.h> diff --git a/test/tsan/halt_on_error.cc b/test/tsan/halt_on_error.cc index c99543ad6..457480178 100644 --- a/test/tsan/halt_on_error.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/heap_race.cc b/test/tsan/heap_race.cc index cc2c1fee5..63591e07b 100644 --- a/test/tsan/heap_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stddef.h> diff --git a/test/tsan/ignore_free.cc b/test/tsan/ignore_free.cc index 60369cc1b..1df6dce2f 100644 --- a/test/tsan/ignore_free.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/ignore_lib0.cc b/test/tsan/ignore_lib0.cc index e24cf804b..d62aa99dc 100644 --- a/test/tsan/ignore_lib0.cc +++ b/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. diff --git a/test/tsan/ignore_lib1.cc b/test/tsan/ignore_lib1.cc index c4f2e7344..b848350d7 100644 --- a/test/tsan/ignore_lib1.cc +++ b/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. diff --git a/test/tsan/ignore_lib2.cc b/test/tsan/ignore_lib2.cc index 97f9419e4..7467ec0f2 100644 --- a/test/tsan/ignore_lib2.cc +++ b/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). diff --git a/test/tsan/ignore_lib3.cc b/test/tsan/ignore_lib3.cc index 8f237fcc8..6a5f5ccea 100644 --- a/test/tsan/ignore_lib3.cc +++ b/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). diff --git a/test/tsan/ignore_malloc.cc b/test/tsan/ignore_malloc.cc index 63bd4241b..0f1fb5e3d 100644 --- a/test/tsan/ignore_malloc.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/ignore_race.cc b/test/tsan/ignore_race.cc index 23d74d0ed..c6e067fab 100644 --- a/test/tsan/ignore_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/ignore_sync.cc b/test/tsan/ignore_sync.cc index 67f2d906d..ae6edaea0 100644 --- a/test/tsan/ignore_sync.cc +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/inlined_memcpy_race.cc b/test/tsan/inlined_memcpy_race.cc index 5dda36e4b..12f82d264 100644 --- a/test/tsan/inlined_memcpy_race.cc +++ b/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 <pthread.h> #include <stddef.h> #include <stdio.h> diff --git a/test/tsan/interface_atomic_test.c b/test/tsan/interface_atomic_test.c index 7f274a0d1..18d860ea0 100644 --- a/test/tsan/interface_atomic_test.c +++ b/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 <sanitizer/tsan_interface_atomic.h> #include <stdio.h> diff --git a/test/tsan/java_alloc.cc b/test/tsan/java_alloc.cc index 4dbce70c3..0c9c4eb18 100644 --- a/test/tsan/java_alloc.cc +++ b/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; diff --git a/test/tsan/java_lock.cc b/test/tsan/java_lock.cc index d9db10350..e5513cd2d 100644 --- a/test/tsan/java_lock.cc +++ b/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 <unistd.h> diff --git a/test/tsan/java_lock_move.cc b/test/tsan/java_lock_move.cc index 48b5a5a88..15a72c738 100644 --- a/test/tsan/java_lock_move.cc +++ b/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; diff --git a/test/tsan/java_lock_rec.cc b/test/tsan/java_lock_rec.cc index 5cc80d4a3..922369571 100644 --- a/test/tsan/java_lock_rec.cc +++ b/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 <unistd.h> diff --git a/test/tsan/java_lock_rec_race.cc b/test/tsan/java_lock_rec_race.cc index a868e260c..41aa1ca6f 100644 --- a/test/tsan/java_lock_rec_race.cc +++ b/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 <unistd.h> diff --git a/test/tsan/java_race.cc b/test/tsan/java_race.cc index 4841a7db0..70ad8c438 100644 --- a/test/tsan/java_race.cc +++ b/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) { diff --git a/test/tsan/java_race_move.cc b/test/tsan/java_race_move.cc index 6da8a1064..76da91b93 100644 --- a/test/tsan/java_race_move.cc +++ b/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; diff --git a/test/tsan/java_rwlock.cc b/test/tsan/java_rwlock.cc index d1f38733b..d43dfe17d 100644 --- a/test/tsan/java_rwlock.cc +++ b/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 <unistd.h> diff --git a/test/tsan/load_shared_lib.cc b/test/tsan/load_shared_lib.cc index 5b6b72b6e..2b250e3e6 100644 --- a/test/tsan/load_shared_lib.cc +++ b/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 <dlfcn.h> #include <pthread.h> diff --git a/test/tsan/longjmp.cc b/test/tsan/longjmp.cc index d9ca4ca5e..d7371c5e4 100644 --- a/test/tsan/longjmp.cc +++ b/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 <stdio.h> #include <stdlib.h> #include <setjmp.h> diff --git a/test/tsan/longjmp2.cc b/test/tsan/longjmp2.cc index 0d551fa19..546019b2d 100644 --- a/test/tsan/longjmp2.cc +++ b/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 <stdio.h> #include <stdlib.h> #include <setjmp.h> diff --git a/test/tsan/longjmp3.cc b/test/tsan/longjmp3.cc index ae2cfd05f..afb4996d4 100644 --- a/test/tsan/longjmp3.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/longjmp4.cc b/test/tsan/longjmp4.cc index 6b0526ef3..1ec3b4b7e 100644 --- a/test/tsan/longjmp4.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/malloc_hook.cc b/test/tsan/malloc_hook.cc index 82eb6900e..63e1c3cac 100644 --- a/test/tsan/malloc_hook.cc +++ b/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 <pthread.h> #include <unistd.h> #include <stdio.h> diff --git a/test/tsan/malloc_overflow.cc b/test/tsan/malloc_overflow.cc index afbebc8be..dadc94484 100644 --- a/test/tsan/malloc_overflow.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/tsan/malloc_stack.cc b/test/tsan/malloc_stack.cc index 3603497ef..cea602018 100644 --- a/test/tsan/malloc_stack.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/memcpy_race.cc b/test/tsan/memcpy_race.cc index 8f3911367..d7314d255 100644 --- a/test/tsan/memcpy_race.cc +++ b/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 <pthread.h> #include <stddef.h> #include <stdio.h> diff --git a/test/tsan/mmap_large.cc b/test/tsan/mmap_large.cc index dfe649e1f..44233b0d1 100644 --- a/test/tsan/mmap_large.cc +++ b/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 <stdint.h> #include <stdio.h> #include <sys/mman.h> diff --git a/test/tsan/mop_with_offset.cc b/test/tsan/mop_with_offset.cc index 2b6a4ff50..e9342794d 100644 --- a/test/tsan/mop_with_offset.cc +++ b/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 <pthread.h> #include <stddef.h> #include <stdio.h> diff --git a/test/tsan/mop_with_offset2.cc b/test/tsan/mop_with_offset2.cc index 037c4db5f..31b4a406d 100644 --- a/test/tsan/mop_with_offset2.cc +++ b/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 <pthread.h> #include <stddef.h> #include <stdio.h> diff --git a/test/tsan/mutex_bad_read_lock.cc b/test/tsan/mutex_bad_read_lock.cc index 0f348f53e..c64bf8849 100644 --- a/test/tsan/mutex_bad_read_lock.cc +++ b/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() { diff --git a/test/tsan/mutex_bad_read_unlock.cc b/test/tsan/mutex_bad_read_unlock.cc index 486600dd0..ab417f43c 100644 --- a/test/tsan/mutex_bad_read_unlock.cc +++ b/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); diff --git a/test/tsan/mutex_bad_unlock.cc b/test/tsan/mutex_bad_unlock.cc index 2421e74a0..301903571 100644 --- a/test/tsan/mutex_bad_unlock.cc +++ b/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() { diff --git a/test/tsan/mutex_cycle2.c b/test/tsan/mutex_cycle2.c index bb4c1b049..fb2b533a1 100644 --- a/test/tsan/mutex_cycle2.c +++ b/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 <pthread.h> int main() { diff --git a/test/tsan/mutex_destroy_locked.cc b/test/tsan/mutex_destroy_locked.cc index 9b020d31b..6c5dcbf11 100644 --- a/test/tsan/mutex_destroy_locked.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/mutex_double_lock.cc b/test/tsan/mutex_double_lock.cc index 5bcd3e6c3..551d911e6 100644 --- a/test/tsan/mutex_double_lock.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/mutex_robust.cc b/test/tsan/mutex_robust.cc index b82661607..5ca5e70d4 100644 --- a/test/tsan/mutex_robust.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/mutex_robust2.cc b/test/tsan/mutex_robust2.cc index 5bd7ff682..f3125c115 100644 --- a/test/tsan/mutex_robust2.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/mutexset1.cc b/test/tsan/mutexset1.cc index acba2f33e..49607d7a2 100644 --- a/test/tsan/mutexset1.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/mutexset2.cc b/test/tsan/mutexset2.cc index 4bc25b736..80b690df7 100644 --- a/test/tsan/mutexset2.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/mutexset3.cc b/test/tsan/mutexset3.cc index 57393bbf4..17c27ea26 100644 --- a/test/tsan/mutexset3.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/mutexset4.cc b/test/tsan/mutexset4.cc index 26c95cac7..f56d37a73 100644 --- a/test/tsan/mutexset4.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/mutexset5.cc b/test/tsan/mutexset5.cc index 45ae8bb5e..ea1255373 100644 --- a/test/tsan/mutexset5.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/mutexset6.cc b/test/tsan/mutexset6.cc index c8392d899..a42a74364 100644 --- a/test/tsan/mutexset6.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/mutexset7.cc b/test/tsan/mutexset7.cc index 51451b215..a8a907a88 100644 --- a/test/tsan/mutexset7.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/mutexset8.cc b/test/tsan/mutexset8.cc index afc064c5e..23449ab0d 100644 --- a/test/tsan/mutexset8.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/oob_race.cc b/test/tsan/oob_race.cc index c84e819cb..16c59c678 100644 --- a/test/tsan/oob_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/printf-1.c b/test/tsan/printf-1.c index a76048e85..9116c956e 100644 --- a/test/tsan/printf-1.c +++ b/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 <stdio.h> int main() { diff --git a/test/tsan/race_on_barrier.c b/test/tsan/race_on_barrier.c index 3c0199dec..e93995ade 100644 --- a/test/tsan/race_on_barrier.c +++ b/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 <pthread.h> #include <stdio.h> #include <stddef.h> diff --git a/test/tsan/race_on_barrier2.c b/test/tsan/race_on_barrier2.c index 62773d43e..75f9b4a09 100644 --- a/test/tsan/race_on_barrier2.c +++ b/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 <pthread.h> #include <stdio.h> #include <stddef.h> diff --git a/test/tsan/race_on_heap.cc b/test/tsan/race_on_heap.cc index a84c0de96..54c4a9b02 100644 --- a/test/tsan/race_on_heap.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/race_on_mutex.c b/test/tsan/race_on_mutex.c index e66341414..d3e621062 100644 --- a/test/tsan/race_on_mutex.c +++ b/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 <pthread.h> #include <stdio.h> #include <stddef.h> diff --git a/test/tsan/race_on_mutex2.c b/test/tsan/race_on_mutex2.c index 80c395e1f..c860fc6d8 100644 --- a/test/tsan/race_on_mutex2.c +++ b/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 <pthread.h> #include <stdio.h> #include <stddef.h> diff --git a/test/tsan/race_on_read.cc b/test/tsan/race_on_read.cc index bae3e5ba9..4dc976d00 100644 --- a/test/tsan/race_on_read.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/race_on_speculative_load.cc b/test/tsan/race_on_speculative_load.cc index 31f0e4f2a..f816db9e8 100644 --- a/test/tsan/race_on_speculative_load.cc +++ b/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 <pthread.h> diff --git a/test/tsan/race_on_write.cc b/test/tsan/race_on_write.cc index 8a56c8464..add22ce60 100644 --- a/test/tsan/race_on_write.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/race_with_finished_thread.cc b/test/tsan/race_with_finished_thread.cc index c713c67a3..b3f9b7066 100644 --- a/test/tsan/race_with_finished_thread.cc +++ b/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 <pthread.h> #include <stddef.h> #include <stdio.h> diff --git a/test/tsan/signal_errno.cc b/test/tsan/signal_errno.cc index 51e4d855d..326953ea2 100644 --- a/test/tsan/signal_errno.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/signal_malloc.cc b/test/tsan/signal_malloc.cc index ef180b8a2..f6fc3facb 100644 --- a/test/tsan/signal_malloc.cc +++ b/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 <stdio.h> #include <stdlib.h> #include <signal.h> diff --git a/test/tsan/sigsuspend.cc b/test/tsan/sigsuspend.cc index 503bd5629..dc9606637 100644 --- a/test/tsan/sigsuspend.cc +++ b/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 diff --git a/test/tsan/simple_race.c b/test/tsan/simple_race.c index c3b1262ec..78f105fa1 100644 --- a/test/tsan/simple_race.c +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/simple_race.cc b/test/tsan/simple_race.cc index 47854cfd9..9010ed5f5 100644 --- a/test/tsan/simple_race.cc +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/simple_stack.c b/test/tsan/simple_stack.c index a447e2880..f2326eb09 100644 --- a/test/tsan/simple_stack.c +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/simple_stack2.cc b/test/tsan/simple_stack2.cc index 7a034c4cd..080387a87 100644 --- a/test/tsan/simple_stack2.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/sleep_sync.cc b/test/tsan/sleep_sync.cc index 217a52a09..5047fdf04 100644 --- a/test/tsan/sleep_sync.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/sleep_sync2.cc b/test/tsan/sleep_sync2.cc index e22999279..773940525 100644 --- a/test/tsan/sleep_sync2.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/stack_race.cc b/test/tsan/stack_race.cc index 01ff2e839..90da2f8c8 100644 --- a/test/tsan/stack_race.cc +++ b/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 <pthread.h> #include <stddef.h> #include <unistd.h> diff --git a/test/tsan/stack_race2.cc b/test/tsan/stack_race2.cc index 577f12c95..83a67f49a 100644 --- a/test/tsan/stack_race2.cc +++ b/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 <pthread.h> #include <stddef.h> #include <unistd.h> diff --git a/test/tsan/static_init1.cc b/test/tsan/static_init1.cc index 4faf5bc54..3e5fb14ba 100644 --- a/test/tsan/static_init1.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/static_init2.cc b/test/tsan/static_init2.cc index 96ef821a7..667aed134 100644 --- a/test/tsan/static_init2.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/static_init3.cc b/test/tsan/static_init3.cc index 70a3c1687..94934b4a9 100644 --- a/test/tsan/static_init3.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/static_init4.cc b/test/tsan/static_init4.cc index 5ecc39926..85835a252 100644 --- a/test/tsan/static_init4.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/static_init5.cc b/test/tsan/static_init5.cc index 1d0ed6d54..961e3a3b6 100644 --- a/test/tsan/static_init5.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/static_init6.cc b/test/tsan/static_init6.cc index c9099f9b6..77253eac1 100644 --- a/test/tsan/static_init6.cc +++ b/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 <pthread.h> #include <stdlib.h> #include <stdio.h> diff --git a/test/tsan/sunrpc.cc b/test/tsan/sunrpc.cc index a621c5f65..579eb725c 100644 --- a/test/tsan/sunrpc.cc +++ b/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 <pthread.h> #include <rpc/xdr.h> diff --git a/test/tsan/suppress_same_address.cc b/test/tsan/suppress_same_address.cc index 8fbf7b9ed..c1721409a 100644 --- a/test/tsan/suppress_same_address.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/suppress_same_stacks.cc b/test/tsan/suppress_same_stacks.cc index f0ab8b304..23008b4bb 100644 --- a/test/tsan/suppress_same_stacks.cc +++ b/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 <pthread.h> volatile int N; // Prevent loop unrolling. diff --git a/test/tsan/suppressions_global.cc b/test/tsan/suppressions_global.cc index 181cb56cf..c808a63d9 100644 --- a/test/tsan/suppressions_global.cc +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/suppressions_race.cc b/test/tsan/suppressions_race.cc index c88e69bec..1d72874d9 100644 --- a/test/tsan/suppressions_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/suppressions_race2.cc b/test/tsan/suppressions_race2.cc index 57146f96a..4ababddf6 100644 --- a/test/tsan/suppressions_race2.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/thread_end_with_ignore.cc b/test/tsan/thread_end_with_ignore.cc index 8bb52e3e8..438a738e2 100644 --- a/test/tsan/thread_end_with_ignore.cc +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/thread_end_with_ignore2.cc b/test/tsan/thread_end_with_ignore2.cc index 224599c95..ca9b5ca89 100644 --- a/test/tsan/thread_end_with_ignore2.cc +++ b/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() { diff --git a/test/tsan/thread_end_with_ignore3.cc b/test/tsan/thread_end_with_ignore3.cc index bf46eb89b..f066f9e1d 100644 --- a/test/tsan/thread_end_with_ignore3.cc +++ b/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); diff --git a/test/tsan/thread_leak.c b/test/tsan/thread_leak.c index c5e669e5d..9b850dd4b 100644 --- a/test/tsan/thread_leak.c +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/thread_leak2.c b/test/tsan/thread_leak2.c index 39f6b5e02..fc2942b2a 100644 --- a/test/tsan/thread_leak2.c +++ b/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 <pthread.h> #include <stdio.h> diff --git a/test/tsan/thread_leak3.c b/test/tsan/thread_leak3.c index 5f447dbdb..efc4dd024 100644 --- a/test/tsan/thread_leak3.c +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/thread_leak4.c b/test/tsan/thread_leak4.c index f9fad0360..0d3b83070 100644 --- a/test/tsan/thread_leak4.c +++ b/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 <pthread.h> #include <unistd.h> #include <stdio.h> diff --git a/test/tsan/thread_leak5.c b/test/tsan/thread_leak5.c index c19d6177f..130858cfb 100644 --- a/test/tsan/thread_leak5.c +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/thread_name.cc b/test/tsan/thread_name.cc index 646ab5836..af29a2ee4 100644 --- a/test/tsan/thread_name.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/thread_name2.cc b/test/tsan/thread_name2.cc index 8c5cb741f..0530c9888 100644 --- a/test/tsan/thread_name2.cc +++ b/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 <pthread.h> #include <stdio.h> #include <unistd.h> diff --git a/test/tsan/tiny_race.c b/test/tsan/tiny_race.c index f77e1606c..9d8422480 100644 --- a/test/tsan/tiny_race.c +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/tsan/tls_race.cc b/test/tsan/tls_race.cc index 7b1f38d62..dbfc5531b 100644 --- a/test/tsan/tls_race.cc +++ b/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 <pthread.h> #include <stddef.h> #include <unistd.h> diff --git a/test/tsan/tls_race2.cc b/test/tsan/tls_race2.cc index 2cf44ae54..ed9f4d0fa 100644 --- a/test/tsan/tls_race2.cc +++ b/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 <pthread.h> #include <stddef.h> #include <unistd.h> diff --git a/test/tsan/tsan-vs-gvn.cc b/test/tsan/tsan-vs-gvn.cc index 40ae724b7..950f5d30d 100644 --- a/test/tsan/tsan-vs-gvn.cc +++ b/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 <pthread.h> diff --git a/test/tsan/unaligned_norace.cc b/test/tsan/unaligned_norace.cc index 792224b80..20cb545f7 100644 --- a/test/tsan/unaligned_norace.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/unaligned_race.cc b/test/tsan/unaligned_race.cc index 3534ff5d6..a2b267514 100644 --- a/test/tsan/unaligned_race.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/user_fopen.cc b/test/tsan/user_fopen.cc index 794d59871..f350a9911 100644 --- a/test/tsan/user_fopen.cc +++ b/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 <stdio.h> #include <stdlib.h> diff --git a/test/tsan/user_malloc.cc b/test/tsan/user_malloc.cc index 0be6d54fb..210677074 100644 --- a/test/tsan/user_malloc.cc +++ b/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 <stdio.h> // defined by tsan. diff --git a/test/tsan/vfork.cc b/test/tsan/vfork.cc index b9d50a37e..5ae1dd1ab 100644 --- a/test/tsan/vfork.cc +++ b/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 <pthread.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/tsan/virtual_inheritance_compile_bug.cc b/test/tsan/virtual_inheritance_compile_bug.cc index 2275b8b8d..2a50c2e88 100644 --- a/test/tsan/virtual_inheritance_compile_bug.cc +++ b/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 <stdio.h> struct AAA { virtual long aaa () { return 0; } }; // NOLINT struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT diff --git a/test/tsan/vptr_benign_race.cc b/test/tsan/vptr_benign_race.cc index 8c9fc596e..92a2b326e 100644 --- a/test/tsan/vptr_benign_race.cc +++ b/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 <pthread.h> #include <semaphore.h> #include <stdio.h> diff --git a/test/tsan/vptr_harmful_race.cc b/test/tsan/vptr_harmful_race.cc index 0105c4ced..c7d4b74df 100644 --- a/test/tsan/vptr_harmful_race.cc +++ b/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 <pthread.h> #include <semaphore.h> #include <stdio.h> diff --git a/test/tsan/vptr_harmful_race2.cc b/test/tsan/vptr_harmful_race2.cc index 378790c62..b018d5cb9 100644 --- a/test/tsan/vptr_harmful_race2.cc +++ b/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 <pthread.h> #include <semaphore.h> #include <stdio.h> diff --git a/test/tsan/vptr_harmful_race3.cc b/test/tsan/vptr_harmful_race3.cc index 2ec6a02e8..01c94e284 100644 --- a/test/tsan/vptr_harmful_race3.cc +++ b/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 <pthread.h> #include <semaphore.h> #include <stdio.h> diff --git a/test/tsan/write_in_reader_lock.cc b/test/tsan/write_in_reader_lock.cc index e872fe3ff..77373bedc 100644 --- a/test/tsan/write_in_reader_lock.cc +++ b/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 <pthread.h> #include <unistd.h> diff --git a/test/ubsan/TestCases/Float/cast-overflow.cpp b/test/ubsan/TestCases/Float/cast-overflow.cpp index 35f9336c9..801a99f9a 100644 --- a/test/ubsan/TestCases/Float/cast-overflow.cpp +++ b/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. diff --git a/test/ubsan/TestCases/Integer/add-overflow.cpp b/test/ubsan/TestCases/Integer/add-overflow.cpp index 412eb7621..d3425828e 100644 --- a/test/ubsan/TestCases/Integer/add-overflow.cpp +++ b/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 <stdint.h> #include <stdio.h> diff --git a/test/ubsan/TestCases/Integer/div-overflow.cpp b/test/ubsan/TestCases/Integer/div-overflow.cpp index 83aa85448..76dd60de4 100644 --- a/test/ubsan/TestCases/Integer/div-overflow.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/Integer/div-zero.cpp b/test/ubsan/TestCases/Integer/div-zero.cpp index 6b8aadfe1..9a223312e 100644 --- a/test/ubsan/TestCases/Integer/div-zero.cpp +++ b/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; diff --git a/test/ubsan/TestCases/Integer/incdec-overflow.cpp b/test/ubsan/TestCases/Integer/incdec-overflow.cpp index 904250a76..fc7141c80 100644 --- a/test/ubsan/TestCases/Integer/incdec-overflow.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/Integer/mul-overflow.cpp b/test/ubsan/TestCases/Integer/mul-overflow.cpp index 1cfe23f57..20fece5f9 100644 --- a/test/ubsan/TestCases/Integer/mul-overflow.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/Integer/negate-overflow.cpp b/test/ubsan/TestCases/Integer/negate-overflow.cpp index 6bee3eea2..bde0bdabb 100644 --- a/test/ubsan/TestCases/Integer/negate-overflow.cpp +++ b/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 diff --git a/test/ubsan/TestCases/Integer/no-recover.cpp b/test/ubsan/TestCases/Integer/no-recover.cpp index 64787b7cf..90dfd2eef 100644 --- a/test/ubsan/TestCases/Integer/no-recover.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/Integer/shift.cpp b/test/ubsan/TestCases/Integer/shift.cpp index f35fa1f95..e86fac8d5 100644 --- a/test/ubsan/TestCases/Integer/shift.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/Integer/sub-overflow.cpp b/test/ubsan/TestCases/Integer/sub-overflow.cpp index bf33d2937..15e64d951 100644 --- a/test/ubsan/TestCases/Integer/sub-overflow.cpp +++ b/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 <stdint.h> #include <stdio.h> diff --git a/test/ubsan/TestCases/Integer/uadd-overflow.cpp b/test/ubsan/TestCases/Integer/uadd-overflow.cpp index 2ef31c064..7a96880fe 100644 --- a/test/ubsan/TestCases/Integer/uadd-overflow.cpp +++ b/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 <stdint.h> #include <stdio.h> diff --git a/test/ubsan/TestCases/Integer/uincdec-overflow.cpp b/test/ubsan/TestCases/Integer/uincdec-overflow.cpp index a14bd6a77..a236d21fc 100644 --- a/test/ubsan/TestCases/Integer/uincdec-overflow.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/Integer/umul-overflow.cpp b/test/ubsan/TestCases/Integer/umul-overflow.cpp index c84bb39ef..ad5d1bd0d 100644 --- a/test/ubsan/TestCases/Integer/umul-overflow.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/Integer/usub-overflow.cpp b/test/ubsan/TestCases/Integer/usub-overflow.cpp index 78f745578..e5de7de54 100644 --- a/test/ubsan/TestCases/Integer/usub-overflow.cpp +++ b/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 <stdint.h> #include <stdio.h> diff --git a/test/ubsan/TestCases/Misc/deduplication.cpp b/test/ubsan/TestCases/Misc/deduplication.cpp index d325bf6dd..7d7b0bd58 100644 --- a/test/ubsan/TestCases/Misc/deduplication.cpp +++ b/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 <limits.h> #include <stdio.h> diff --git a/test/ubsan/TestCases/Misc/enum.cpp b/test/ubsan/TestCases/Misc/enum.cpp index c5642507a..c95ce8270 100644 --- a/test/ubsan/TestCases/Misc/enum.cpp +++ b/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 diff --git a/test/ubsan/TestCases/Misc/missing_return.cpp b/test/ubsan/TestCases/Misc/missing_return.cpp index 7da238e25..04bc791e1 100644 --- a/test/ubsan/TestCases/Misc/missing_return.cpp +++ b/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() { diff --git a/test/ubsan/TestCases/Misc/unreachable.cpp b/test/ubsan/TestCases/Misc/unreachable.cpp index 75fc3e5bd..ba760635e 100644 --- a/test/ubsan/TestCases/Misc/unreachable.cpp +++ b/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 diff --git a/test/ubsan/TestCases/Misc/vla.c b/test/ubsan/TestCases/Misc/vla.c index 2fa88addc..10721537b 100644 --- a/test/ubsan/TestCases/Misc/vla.c +++ b/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 diff --git a/test/ubsan/TestCases/TypeCheck/Function/function.cpp b/test/ubsan/TestCases/TypeCheck/Function/function.cpp index 8106ae47e..33c2d1c7f 100644 --- a/test/ubsan/TestCases/TypeCheck/Function/function.cpp +++ b/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 <stdint.h> diff --git a/test/ubsan/TestCases/TypeCheck/misaligned.cpp b/test/ubsan/TestCases/TypeCheck/misaligned.cpp index 9b0b9a119..71d82e0c3 100644 --- a/test/ubsan/TestCases/TypeCheck/misaligned.cpp +++ b/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 <new> diff --git a/test/ubsan/TestCases/TypeCheck/null.cpp b/test/ubsan/TestCases/TypeCheck/null.cpp index 79726924d..47f5270e5 100644 --- a/test/ubsan/TestCases/TypeCheck/null.cpp +++ b/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; } diff --git a/test/ubsan/TestCases/TypeCheck/vptr.cpp b/test/ubsan/TestCases/TypeCheck/vptr.cpp index 9d23b3fc8..7a75142d7 100644 --- a/test/ubsan/TestCases/TypeCheck/vptr.cpp +++ b/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 |