diff --git a/compiler-rt/test/lsan/TestCases/Darwin/dispatch.mm b/compiler-rt/test/lsan/TestCases/Darwin/dispatch.mm --- a/compiler-rt/test/lsan/TestCases/Darwin/dispatch.mm +++ b/compiler-rt/test/lsan/TestCases/Darwin/dispatch.mm @@ -1,9 +1,8 @@ // Test for threads spawned with wqthread_start -// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -DDISPATCH_ASYNC -o %t-async -framework Foundation // RUN: %clangxx_lsan %s -DDISPATCH_SYNC -o %t-sync -framework Foundation -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t-async 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t-sync 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0" not %run %t-async 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0" not %run %t-sync 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c b/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c --- a/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c +++ b/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c @@ -3,10 +3,9 @@ // user-installed TSD destructors have finished running (since they may contain // additional cleanup tasks). LSan doesn't actually meet that goal 100%, but it // makes its best effort. -// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0" // RUN: %clang_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE:use_tls=1 %run %t -// RUN: %env_lsan_opts=$LSAN_BASE:use_tls=0 not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0:use_tls=1" %run %t +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0:use_tls=0" not %run %t 2>&1 | FileCheck %s // Investigate why it does not fail with use_stack=0 // UNSUPPORTED: arm-linux || armhf-linux diff --git a/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c b/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c --- a/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c +++ b/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c @@ -1,7 +1,6 @@ // Regression test. Disabler should not depend on TSD validity. -// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_tls=1:use_ld_allocations=0" // RUN: %clang_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE %run %t +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0:use_tls=1:use_ld_allocations=0" %run %t #include #include diff --git a/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp b/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp --- a/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp +++ b/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp @@ -4,11 +4,10 @@ // https://bugs.llvm.org/show_bug.cgi?id=37804 // XFAIL: glibc-2.27 -// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0:use_ld_allocations=0" // RUN: %clangxx %s -DBUILD_DSO -fPIC -shared -o %t-so.so // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_ld_allocations=0:use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_ld_allocations=0:use_tls=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 // UNSUPPORTED: arm,powerpc,i386-linux && !android diff --git a/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp b/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp --- a/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp +++ b/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 // Investigate why it does not fail with use_tls=0 diff --git a/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cpp b/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cpp --- a/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cpp +++ b/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 #include diff --git a/compiler-rt/test/lsan/TestCases/Linux/use_tls_static.cpp b/compiler-rt/test/lsan/TestCases/Linux/use_tls_static.cpp --- a/compiler-rt/test/lsan/TestCases/Linux/use_tls_static.cpp +++ b/compiler-rt/test/lsan/TestCases/Linux/use_tls_static.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 #include diff --git a/compiler-rt/test/lsan/TestCases/disabler.c b/compiler-rt/test/lsan/TestCases/disabler.c --- a/compiler-rt/test/lsan/TestCases/disabler.c +++ b/compiler-rt/test/lsan/TestCases/disabler.c @@ -1,7 +1,6 @@ // Test for __lsan_disable() / __lsan_enable(). -// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_tls=0" // RUN: %clang_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=report_objects=1:use_registers=0:use_stacks=0:use_tls=0 not %run %t 2>&1 | FileCheck %s // Investigate why it does not fail with use_tls=0 // UNSUPPORTED: arm-linux || armhf-linux diff --git a/compiler-rt/test/lsan/TestCases/disabler.cpp b/compiler-rt/test/lsan/TestCases/disabler.cpp --- a/compiler-rt/test/lsan/TestCases/disabler.cpp +++ b/compiler-rt/test/lsan/TestCases/disabler.cpp @@ -1,7 +1,6 @@ // Test for ScopedDisabler. -// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_tls=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=report_objects=1:use_registers=0:use_stacks=0:use_tls=0 not %run %t 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp b/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp --- a/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp +++ b/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp @@ -1,10 +1,9 @@ // Test for __lsan_do_leak_check(). We test it by making the leak check run // before global destructors, which also tests compatibility with HeapChecker's // "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: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s // Investigate why LeakyGlobal leak does show // UNSUPPORTED: arm-linux || armhf-linux diff --git a/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp b/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp --- a/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp +++ b/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp @@ -1,8 +1,7 @@ // A benchmark that executes malloc/free pairs in parallel. // Usage: ./a.out number_of_threads total_number_of_allocations -// RUN: LSAN_BASE="use_ld_allocations=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE %run %t 5 1000000 2>&1 +// RUN: %env_lsan_opts=use_ld_allocations=0 %run %t 5 1000000 2>&1 #include #include #include diff --git a/compiler-rt/test/lsan/TestCases/ignore_object.c b/compiler-rt/test/lsan/TestCases/ignore_object.c --- a/compiler-rt/test/lsan/TestCases/ignore_object.c +++ b/compiler-rt/test/lsan/TestCases/ignore_object.c @@ -1,7 +1,6 @@ // Test for __lsan_ignore_object(). -// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_tls=0" // RUN: %clang_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=report_objects=1:use_registers=0:use_stacks=0:use_tls=0 not %run %t 2>&1 | FileCheck %s // Investigate why it does not fail with use_stack=0 // UNSUPPORTED: arm-linux || armhf-linux diff --git a/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp b/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp --- a/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp +++ b/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp @@ -1,7 +1,6 @@ // 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: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=report_objects=1:use_stacks=0:use_registers=0 not %run %t 2>&1 | FileCheck %s // For 32 bit LSan it's pretty likely that large chunks are "reachable" from some // internal data structures (e.g. Glibc global data). diff --git a/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp b/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp --- a/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp +++ b/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp @@ -1,10 +1,9 @@ // Test for the leak_check_at_exit flag. -// RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: %env_lsan_opts=$LSAN_BASE:"leak_check_at_exit=0" not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: %env_lsan_opts=$LSAN_BASE:"leak_check_at_exit=0" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-do +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0:leak_check_at_exit=0 not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0:leak_check_at_exit=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont #include #include diff --git a/compiler-rt/test/lsan/TestCases/link_turned_off.cpp b/compiler-rt/test/lsan/TestCases/link_turned_off.cpp --- a/compiler-rt/test/lsan/TestCases/link_turned_off.cpp +++ b/compiler-rt/test/lsan/TestCases/link_turned_off.cpp @@ -1,8 +1,7 @@ // Test for disabling LSan at link-time. -// RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE %run %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s // // UNSUPPORTED: darwin diff --git a/compiler-rt/test/lsan/TestCases/many_tls_keys_pthread.cpp b/compiler-rt/test/lsan/TestCases/many_tls_keys_pthread.cpp --- a/compiler-rt/test/lsan/TestCases/many_tls_keys_pthread.cpp +++ b/compiler-rt/test/lsan/TestCases/many_tls_keys_pthread.cpp @@ -1,8 +1,7 @@ // Test that lsan handles tls correctly for many threads -// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 // On glibc, this requires the range returned by GetTLS to include diff --git a/compiler-rt/test/lsan/TestCases/many_tls_keys_thread.cpp b/compiler-rt/test/lsan/TestCases/many_tls_keys_thread.cpp --- a/compiler-rt/test/lsan/TestCases/many_tls_keys_thread.cpp +++ b/compiler-rt/test/lsan/TestCases/many_tls_keys_thread.cpp @@ -1,8 +1,7 @@ // Test that lsan handles tls correctly for many threads -// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_tls=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 // Patch r303906 did not fix all the problems. diff --git a/compiler-rt/test/lsan/TestCases/pointer_to_self.cpp b/compiler-rt/test/lsan/TestCases/pointer_to_self.cpp --- a/compiler-rt/test/lsan/TestCases/pointer_to_self.cpp +++ b/compiler-rt/test/lsan/TestCases/pointer_to_self.cpp @@ -1,8 +1,7 @@ // Regression test: pointers to self should not confuse LSan into thinking the // object is indirectly leaked. Only external pointers count. -// RUN: LSAN_BASE="report_objects=1:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0" not %run %t 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/lsan/TestCases/print_suppressions.cpp b/compiler-rt/test/lsan/TestCases/print_suppressions.cpp --- a/compiler-rt/test/lsan/TestCases/print_suppressions.cpp +++ b/compiler-rt/test/lsan/TestCases/print_suppressions.cpp @@ -1,11 +1,10 @@ // Print matched suppressions only if print_suppressions=1 AND at least one is // matched. Default is print_suppressions=true. -// RUN: LSAN_BASE="use_registers=0:use_stacks=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE:print_suppressions=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print -// RUN: %env_lsan_opts=$LSAN_BASE %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print -// RUN: %env_lsan_opts=$LSAN_BASE:print_suppressions=0 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print -// RUN: %env_lsan_opts=$LSAN_BASE %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-print +// RUN: %env_lsan_opts=use_registers=0:use_stacks=0:print_suppressions=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: %env_lsan_opts=use_registers=0:use_stacks=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: %env_lsan_opts=use_registers=0:use_stacks=0:print_suppressions=0 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: %env_lsan_opts=use_registers=0:use_stacks=0 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-print #include #include diff --git a/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp b/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp --- a/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp +++ b/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp @@ -1,8 +1,7 @@ // Test for on-demand leak checking. -// RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE %run %t foo 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t foo 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t 2>&1 | FileCheck %s // // UNSUPPORTED: darwin diff --git a/compiler-rt/test/lsan/TestCases/register_root_region.cpp b/compiler-rt/test/lsan/TestCases/register_root_region.cpp --- a/compiler-rt/test/lsan/TestCases/register_root_region.cpp +++ b/compiler-rt/test/lsan/TestCases/register_root_region.cpp @@ -1,9 +1,8 @@ // Test for __lsan_(un)register_root_region(). -// RUN: LSAN_BASE="use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE %run %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:use_root_regions=0 not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=use_stacks=0:use_registers=0:use_root_regions=0 not %run %t 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp b/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp --- a/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp +++ b/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp @@ -1,5 +1,4 @@ // Test that out-of-scope local variables are ignored by LSan. -// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=1" // LSan-in-ASan fails at -O0 on aarch64, because the stack use-after-return // instrumentation stashes the argument to `PutPointerOnStaleStack` on the stack @@ -10,8 +9,8 @@ // callee-saved register for rematerialization instead. // RUN: %clangxx_lsan -O1 %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE":exitcode=0" %run %t 2>&1 | FileCheck --check-prefix=CHECK-sanity %s +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=1" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=1:exitcode=0" %run %t 2>&1 | FileCheck --check-prefix=CHECK-sanity %s // // x86 passes parameters through stack that may lead to false negatives // The same applies to s390x register save areas. diff --git a/compiler-rt/test/lsan/TestCases/suppressions_default.cpp b/compiler-rt/test/lsan/TestCases/suppressions_default.cpp --- a/compiler-rt/test/lsan/TestCases/suppressions_default.cpp +++ b/compiler-rt/test/lsan/TestCases/suppressions_default.cpp @@ -1,6 +1,5 @@ -// RUN: LSAN_BASE="use_registers=0:use_stacks=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts=use_registers=0:use_stacks=0 not %run %t 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/lsan/TestCases/suppressions_file.cpp b/compiler-rt/test/lsan/TestCases/suppressions_file.cpp --- a/compiler-rt/test/lsan/TestCases/suppressions_file.cpp +++ b/compiler-rt/test/lsan/TestCases/suppressions_file.cpp @@ -1,18 +1,17 @@ -// RUN: LSAN_BASE="use_registers=0:use_stacks=0" // RUN: %clangxx_lsan %s -o %t // RUN: rm -f %t.supp // RUN: touch %t.supp // RUN: %push_to_device %t.supp %device_rundir/%t.supp -// RUN: %env_lsan_opts="$LSAN_BASE:suppressions='%device_rundir/%t.supp'" not %run %t 2>&1 | FileCheck %s --check-prefix=NOSUPP +// RUN: %env_lsan_opts="use_registers=0:use_stacks=0:suppressions='%device_rundir/%t.supp'" not %run %t 2>&1 | FileCheck %s --check-prefix=NOSUPP // RUN: echo "leak:*LSanTestLeakingFunc*" > %t.supp // RUN: %push_to_device %t.supp %device_rundir/%t.supp -// RUN: %env_lsan_opts="$LSAN_BASE:suppressions='%device_rundir/%t.supp'" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="use_registers=0:use_stacks=0:suppressions='%device_rundir/%t.supp'" not %run %t 2>&1 | FileCheck %s // // RUN: echo "leak:%t" > %t.supp // RUN: %push_to_device %t.supp %device_rundir/%t.supp -// RUN: %env_lsan_opts="$LSAN_BASE:suppressions='%device_rundir/%t.supp':symbolize=false" %run %t +// RUN: %env_lsan_opts="use_registers=0:use_stacks=0:suppressions='%device_rundir/%t.supp':symbolize=false" %run %t #include #include diff --git a/compiler-rt/test/lsan/TestCases/use_after_return.cpp b/compiler-rt/test/lsan/TestCases/use_after_return.cpp --- a/compiler-rt/test/lsan/TestCases/use_after_return.cpp +++ b/compiler-rt/test/lsan/TestCases/use_after_return.cpp @@ -1,10 +1,9 @@ // Test that fake stack (introduced by ASan's use-after-return mode) is included // in the root set. -// RUN: LSAN_BASE="report_objects=1:use_registers=0" // RUN: %clangxx_lsan %s -O2 -o %t -// RUN: ASAN_OPTIONS=detect_stack_use_after_return=1 %env_lsan_opts=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s -// RUN: ASAN_OPTIONS=detect_stack_use_after_return=1 %env_lsan_opts=$LSAN_BASE:"use_stacks=1" %run %t 2>&1 -// RUN: ASAN_OPTIONS=detect_stack_use_after_return=1 %env_lsan_opts="" %run %t 2>&1 +// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0" not %run %t 2>&1 | FileCheck %s +// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=1" %run %t 2>&1 +// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 %env_lsan_opts="" %run %t 2>&1 // Investigate why it does not fail with use_stack=0 // UNSUPPORTED: arm-linux || armhf-linux diff --git a/compiler-rt/test/lsan/TestCases/use_globals_initialized.cpp b/compiler-rt/test/lsan/TestCases/use_globals_initialized.cpp --- a/compiler-rt/test/lsan/TestCases/use_globals_initialized.cpp +++ b/compiler-rt/test/lsan/TestCases/use_globals_initialized.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_globals=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_globals=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_globals=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_globals=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 #include diff --git a/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp b/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp --- a/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp +++ b/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_globals=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_globals=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_globals=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_globals=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 #include diff --git a/compiler-rt/test/lsan/TestCases/use_globals_unused.cpp b/compiler-rt/test/lsan/TestCases/use_globals_unused.cpp --- a/compiler-rt/test/lsan/TestCases/use_globals_unused.cpp +++ b/compiler-rt/test/lsan/TestCases/use_globals_unused.cpp @@ -1,12 +1,11 @@ // Test that unused globals are included in the root set. // RUN: %clangxx_lsan -O2 %s -DTEST_LIB -c -o %t.o // RUN: %clangxx_lsan -O2 %s %t.o -o %t -// RUN: LSAN_BASE="use_stacks=0:use_registers=0" -// RUN: %env_lsan_opts=$LSAN_BASE:"use_globals=1" %run %t 2>&1 | FileCheck %s --implicit-check-not=leak +// RUN: %env_lsan_opts="use_stacks=0:use_registers=0:use_globals=1" %run %t 2>&1 | FileCheck %s --implicit-check-not=leak // RUN: %env_lsan_opts="" %run %t 2>&1 | FileCheck %s --implicit-check-not=leak // FIXME: This check is not very important and fails on arm7. -// %env_lsan_opts=$LSAN_BASE:"use_globals=0" not %run %t 2>&1 | FileCheck %s --check-prefixes=LEAK +// %env_lsan_opts="use_stacks=0:use_registers=0:use_globals=0" not %run %t 2>&1 | FileCheck %s --check-prefixes=LEAK #include #include diff --git a/compiler-rt/test/lsan/TestCases/use_poisoned_asan.cpp b/compiler-rt/test/lsan/TestCases/use_poisoned_asan.cpp --- a/compiler-rt/test/lsan/TestCases/use_poisoned_asan.cpp +++ b/compiler-rt/test/lsan/TestCases/use_poisoned_asan.cpp @@ -1,9 +1,8 @@ // ASan-poisoned memory should be ignored if use_poisoned is false. // REQUIRES: asan -// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0" // RUN: %clangxx_lsan %s -o %t -// RUN: %env_lsan_opts=$LSAN_BASE:"use_poisoned=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_poisoned=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_poisoned=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_poisoned=1" %run %t 2>&1 #include #include diff --git a/compiler-rt/test/lsan/TestCases/use_registers.cpp b/compiler-rt/test/lsan/TestCases/use_registers.cpp --- a/compiler-rt/test/lsan/TestCases/use_registers.cpp +++ b/compiler-rt/test/lsan/TestCases/use_registers.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_registers=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_registers=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 #include "sanitizer_common/print_address.h" diff --git a/compiler-rt/test/lsan/TestCases/use_registers_extra.cpp b/compiler-rt/test/lsan/TestCases/use_registers_extra.cpp --- a/compiler-rt/test/lsan/TestCases/use_registers_extra.cpp +++ b/compiler-rt/test/lsan/TestCases/use_registers_extra.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_registers=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_registers=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 // FIXME: Support more platforms. diff --git a/compiler-rt/test/lsan/TestCases/use_stacks.cpp b/compiler-rt/test/lsan/TestCases/use_stacks.cpp --- a/compiler-rt/test/lsan/TestCases/use_stacks.cpp +++ b/compiler-rt/test/lsan/TestCases/use_stacks.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_stacks=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 #include diff --git a/compiler-rt/test/lsan/TestCases/use_stacks_threaded.cpp b/compiler-rt/test/lsan/TestCases/use_stacks_threaded.cpp --- a/compiler-rt/test/lsan/TestCases/use_stacks_threaded.cpp +++ b/compiler-rt/test/lsan/TestCases/use_stacks_threaded.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_stacks=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_stacks=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=1" %run %t 2>&1 // RUN: %env_lsan_opts="" %run %t 2>&1 #include diff --git a/compiler-rt/test/lsan/TestCases/use_unaligned.cpp b/compiler-rt/test/lsan/TestCases/use_unaligned.cpp --- a/compiler-rt/test/lsan/TestCases/use_unaligned.cpp +++ b/compiler-rt/test/lsan/TestCases/use_unaligned.cpp @@ -1,8 +1,7 @@ // 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: %env_lsan_opts=$LSAN_BASE:"use_unaligned=0" not %run %t 2>&1 | FileCheck %s -// RUN: %env_lsan_opts=$LSAN_BASE:"use_unaligned=1" %run %t 2>&1 +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_unaligned=0" not %run %t 2>&1 | FileCheck %s +// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_unaligned=1" %run %t 2>&1 #include #include