[compiler-rt] r209629 - [ASan tests] Use ASAN_OPTIONS in a portable way

Timur Iskhodzhanov timurrrr at google.com
Mon May 26 06:44:58 PDT 2014


Author: timurrrr
Date: Mon May 26 08:44:57 2014
New Revision: 209629

URL: http://llvm.org/viewvc/llvm-project?rev=209629&view=rev
Log:
[ASan tests] Use ASAN_OPTIONS in a portable way

Modified:
    compiler-rt/trunk/test/asan/TestCases/allocator_returns_null.cc
    compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc
    compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc
    compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc
    compiler-rt/trunk/test/asan/TestCases/deep_call_stack.cc
    compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/double-free.cc
    compiler-rt/trunk/test/asan/TestCases/gc-test.cc
    compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc
    compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-free.cc
    compiler-rt/trunk/test/asan/TestCases/log-path_test.cc
    compiler-rt/trunk/test/asan/TestCases/log_path_fork_test.cc.disabled
    compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc
    compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc
    compiler-rt/trunk/test/asan/TestCases/max_redzone.cc
    compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc
    compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc
    compiler-rt/trunk/test/asan/TestCases/poison_partial.cc
    compiler-rt/trunk/test/asan/TestCases/print_summary.cc
    compiler-rt/trunk/test/asan/TestCases/printf-1.c
    compiler-rt/trunk/test/asan/TestCases/printf-2.c
    compiler-rt/trunk/test/asan/TestCases/printf-3.c
    compiler-rt/trunk/test/asan/TestCases/printf-4.c
    compiler-rt/trunk/test/asan/TestCases/printf-5.c
    compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c
    compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc
    compiler-rt/trunk/test/asan/TestCases/strip_path_prefix.c
    compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc

Modified: compiler-rt/trunk/test/asan/TestCases/allocator_returns_null.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/allocator_returns_null.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/allocator_returns_null.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/allocator_returns_null.cc Mon May 26 08:44:57 2014
@@ -4,16 +4,16 @@
 //
 // RUN: %clangxx_asan -O0 %s -o %t
 // 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
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=0 not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=1     %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mNULL
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=1     %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cNULL
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=0 not %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=1     %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coNULL
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=1     %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rNULL
+// RUN: env ASAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH
+// RUN: env 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>

Modified: compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc Mon May 26 08:44:57 2014
@@ -3,7 +3,7 @@
 
 // RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
 // RUN: %clangxx_asan -O0 %s -ldl -o %t
-// RUN: ASAN_OPTIONS=symbolize=0 not %run %t 2>&1 | %asan_symbolize | FileCheck %s
+// RUN: env ASAN_OPTIONS=symbolize=0 not %run %t 2>&1 | %asan_symbolize | FileCheck %s
 
 #if !defined(SHARED_LIB)
 #include <dlfcn.h>

Modified: compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc Mon May 26 08:44:57 2014
@@ -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 %run %t 2>&1 | FileCheck %s
+// RUN: env 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

Modified: compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc Mon May 26 08:44:57 2014
@@ -1,7 +1,7 @@
 // RUN: %clangxx_asan -O %s -o %t
 // 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
+// RUN: env ASAN_OPTIONS=detect_container_overflow=0 %run %t crash
 //
 // Test crash due to __sanitizer_annotate_contiguous_container.
 

Modified: compiler-rt/trunk/test/asan/TestCases/deep_call_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/deep_call_stack.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/deep_call_stack.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/deep_call_stack.cc Mon May 26 08:44:57 2014
@@ -3,7 +3,7 @@
 // RUN: %clangxx_asan -O2 %s -o %t && \
 // RUN:   %run %t 2>&1 | FileCheck %s
 // Also check that use_sigaltstack+verbosity doesn't crash.
-// RUN: ASAN_OPTIONS=verbosity=1:use_sigaltstack=1 %run %t  | FileCheck %s
+// RUN: env ASAN_OPTIONS=verbosity=1:use_sigaltstack=1 %run %t  | FileCheck %s
 #include <stdio.h>
 
 __attribute__((noinline))

Modified: compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc Mon May 26 08:44:57 2014
@@ -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 %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=malloc_context_size=120:redzone=512 not %run %t 2>&1 | FileCheck %s
 #include <stdlib.h>
 #include <stdio.h>
 

Modified: compiler-rt/trunk/test/asan/TestCases/double-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/double-free.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/double-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/double-free.cc Mon May 26 08:44:57 2014
@@ -2,8 +2,8 @@
 // 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 %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
+// RUN: env ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s
 
 #include <stdlib.h>
 #include <string.h>

Modified: compiler-rt/trunk/test/asan/TestCases/gc-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/gc-test.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/gc-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/gc-test.cc Mon May 26 08:44:57 2014
@@ -1,6 +1,6 @@
 // RUN: %clangxx_asan %s -lpthread -o %t
-// 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
+// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
+// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
 
 #include <assert.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc Mon May 26 08:44:57 2014
@@ -2,7 +2,7 @@
 // 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
-// RUN: ASAN_OPTIONS=print_stats=1 not %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=print_stats=1 not %run %t 2>&1 | FileCheck %s
 
 // FIXME: Fix this test under GCC.
 // REQUIRES: Clang

Modified: compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc Mon May 26 08:44:57 2014
@@ -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 %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=strict_init_order=true not %run %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc Mon May 26 08:44:57 2014
@@ -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 %run %t
+// RUN: env ASAN_OPTIONS=strict_init_order=true %run %t
 
 #include <stdio.h>
 #include <pthread.h>

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc Mon May 26 08:44:57 2014
@@ -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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 
 // Function is defined in another TU.
 int readBadGlobal();

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc Mon May 26 08:44:57 2014
@@ -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 %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=check_initialization_order=true not %run %t 2>&1 | FileCheck %s
 
 // Do not test with optimization -- the error may be optimized away.
 

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc Mon May 26 08:44:57 2014
@@ -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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 
 class Integer {
   private:

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc Mon May 26 08:44:57 2014
@@ -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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env 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 %run %t 2>&1
+// RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 
 // Simple access:
 // Make sure that accessing a global in the same TU is safe

Modified: compiler-rt/trunk/test/asan/TestCases/invalid-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-free.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-free.cc Mon May 26 08:44:57 2014
@@ -2,8 +2,8 @@
 // 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 %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
+// RUN: env ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s
 
 #include <stdlib.h>
 #include <string.h>

Modified: compiler-rt/trunk/test/asan/TestCases/log-path_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/log-path_test.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/log-path_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/log-path_test.cc Mon May 26 08:44:57 2014
@@ -6,21 +6,21 @@
 
 // Good log_path.
 // RUN: rm -f %t.log.*
-// RUN: ASAN_OPTIONS=log_path=%t.log not %run %t 2> %t.out
+// RUN: env 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 %run %t 2> %t.out
+// RUN: env 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: env ASAN_OPTIONS=log_path=`for((i=0;i<10000;i++)); do echo -n $i; done` \
 // 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  %run %t ARG ARG ARG
+// RUN: env ASAN_OPTIONS=log_path=%t.log  %run %t ARG ARG ARG
 // RUN: not cat %t.log.*
 
 

Modified: compiler-rt/trunk/test/asan/TestCases/log_path_fork_test.cc.disabled
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/log_path_fork_test.cc.disabled?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/log_path_fork_test.cc.disabled (original)
+++ compiler-rt/trunk/test/asan/TestCases/log_path_fork_test.cc.disabled Mon May 26 08:44:57 2014
@@ -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 %run %t 2> %t.out
+// RUN: env 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 ]
 

Modified: compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc Mon May 26 08:44:57 2014
@@ -1,9 +1,9 @@
 // RUN: %clangxx_asan -O0 %s -o %t
-// 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
+// RUN: env ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os
+// RUN: env ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os
+// RUN: env ASAN_OPTIONS=malloc_context_size=1:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os
+// RUN: env ASAN_OPTIONS=malloc_context_size=1:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os
+// RUN: env ASAN_OPTIONS=malloc_context_size=2 not %run %t 2>&1 | FileCheck %s --check-prefix=TWO
 
 int main() {
   char *x = new char[20];

Modified: compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc Mon May 26 08:44:57 2014
@@ -1,8 +1,8 @@
 // Check that we fill malloc-ed memory correctly.
 // RUN: %clangxx_asan %s -o %t
 // 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
+// RUN: env ASAN_OPTIONS=max_malloc_fill_size=10:malloc_fill_byte=8 %run %t | FileCheck %s --check-prefix=CHECK-10-8
+// RUN: env 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) {

Modified: compiler-rt/trunk/test/asan/TestCases/max_redzone.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/max_redzone.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/max_redzone.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/max_redzone.cc Mon May 26 08:44:57 2014
@@ -1,8 +1,8 @@
 // Test max_redzone runtime option.
 
-// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=max_redzone=16 %run %t 0 2>&1
+// RUN: %clangxx_asan -O0 %s -o %t && env 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 && env 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>

Modified: compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc Mon May 26 08:44:57 2014
@@ -1,5 +1,5 @@
-// 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
+// RUN: %clangxx_asan -O0 %s -o %t && env ASAN_OPTIONS=strict_memcmp=0 %run %t
+// RUN: %clangxx_asan -O0 %s -o %t && env 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 %run %t 2>&1 | FileCheck %s
 

Modified: compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc Mon May 26 08:44:57 2014
@@ -3,10 +3,10 @@
 // RUN: %clangxx_asan -O2 %s -o %t
 // 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
+// RUN: env ASAN_OPTIONS=mmap_limit_mb=500 %run %t 50 16
+// RUN: env ASAN_OPTIONS=mmap_limit_mb=500 %run %t 50 1000000
+// RUN: env ASAN_OPTIONS=mmap_limit_mb=500 not %run %t 500 16 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=mmap_limit_mb=500 not %run %t 500 1000000 2>&1 | FileCheck %s
 
 #include <assert.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/asan/TestCases/poison_partial.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/poison_partial.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/poison_partial.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/poison_partial.cc Mon May 26 08:44:57 2014
@@ -1,8 +1,8 @@
 // RUN: %clangxx_asan -O0 %s -o %t
 // 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
+// RUN: env ASAN_OPTIONS=poison_partial=0 %run %t
+// RUN: env ASAN_OPTIONS=poison_partial=0 %run %t heap
 #include <string.h>
 char g[21];
 char *x;

Modified: compiler-rt/trunk/test/asan/TestCases/print_summary.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/print_summary.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/print_summary.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/print_summary.cc Mon May 26 08:44:57 2014
@@ -1,6 +1,6 @@
 // RUN: %clangxx_asan -O0 %s -o %t
 // 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
+// RUN: env ASAN_OPTIONS=print_summary=false not %run %t 2>&1 | FileCheck %s --check-prefix=NO
 
 int main() {
   char *x = new char[20];

Modified: compiler-rt/trunk/test/asan/TestCases/printf-1.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/printf-1.c?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/printf-1.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/printf-1.c Mon May 26 08:44:57 2014
@@ -1,6 +1,6 @@
 // RUN: %clang_asan -O2 %s -o %t
-// 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: env ASAN_OPTIONS=check_printf=1 %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS=check_printf=0 %run %t 2>&1 | FileCheck %s
 // RUN: %run %t 2>&1 | FileCheck %s
 
 #include <stdio.h>

Modified: compiler-rt/trunk/test/asan/TestCases/printf-2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/printf-2.c?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/printf-2.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/printf-2.c Mon May 26 08:44:57 2014
@@ -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 %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
+// RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
+// RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s
+// RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/asan/TestCases/printf-3.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/printf-3.c?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/printf-3.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/printf-3.c Mon May 26 08:44:57 2014
@@ -1,6 +1,6 @@
 // RUN: %clang_asan -O2 %s -o %t
-// 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: env ASAN_OPTIONS=check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
+// RUN: env ASAN_OPTIONS=check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s
 // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 
 #include <stdio.h>

Modified: compiler-rt/trunk/test/asan/TestCases/printf-4.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/printf-4.c?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/printf-4.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/printf-4.c Mon May 26 08:44:57 2014
@@ -1,8 +1,8 @@
 // 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 %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
-// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
+// RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
+// RUN: env ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 
 #include <stdio.h>
 int main() {

Modified: compiler-rt/trunk/test/asan/TestCases/printf-5.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/printf-5.c?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/printf-5.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/printf-5.c Mon May 26 08:44:57 2014
@@ -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 %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
+// RUN: env ASAN_OPTIONS=replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
+// RUN: env ASAN_OPTIONS=replace_intrin=0:check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s
+// RUN: env ASAN_OPTIONS=replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 
 #include <stdio.h>
 #include <string.h>

Modified: compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c Mon May 26 08:44:57 2014
@@ -1,5 +1,5 @@
 // RUN: %clang_asan -O2 %s -o %t
-// RUN: ASAN_OPTIONS="sleep_before_dying=1" not %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS="sleep_before_dying=1" not %run %t 2>&1 | FileCheck %s
 
 #include <stdlib.h>
 int main() {

Modified: compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc Mon May 26 08:44:57 2014
@@ -1,18 +1,18 @@
 // Test ASan detection of stack-overflow condition.
 
-// 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 -DSMALL_FRAME -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DSMALL_FRAME -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -lpthread -o %t && env 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 %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: %clangxx_asan -O0 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && env 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 && env 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 && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -DTHREAD -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DTHREAD -lpthread -o %t && env ASAN_OPTIONS=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
 // RUN: not %run %t 2>&1 | FileCheck %s
 
 #include <assert.h>

Modified: compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc Mon May 26 08:44:57 2014
@@ -3,7 +3,7 @@
 // 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
+// RUN: env 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 %run %t 2>&1 | FileCheck --check-prefix=THREAD %s
 //
@@ -12,8 +12,8 @@
 //
 // 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 %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
+// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:max_uar_stack_size_log=20:verbosity=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-20 %s
+// RUN: env 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>

Modified: compiler-rt/trunk/test/asan/TestCases/strip_path_prefix.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strip_path_prefix.c?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strip_path_prefix.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strip_path_prefix.c Mon May 26 08:44:57 2014
@@ -1,5 +1,5 @@
 // RUN: %clang_asan -O2 %s -o %t
-// RUN: ASAN_OPTIONS="strip_path_prefix='/'" not %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS="strip_path_prefix='/'" not %run %t 2>&1 | FileCheck %s
 
 #include <stdlib.h>
 int main() {

Modified: compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc Mon May 26 08:44:57 2014
@@ -2,7 +2,7 @@
 // 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 %run %t
+// RUN: env ASAN_OPTIONS=allow_user_poisoning=0 %run %t
 
 #include <stdlib.h>
 

Modified: compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc?rev=209629&r1=209628&r2=209629&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc Mon May 26 08:44:57 2014
@@ -1,6 +1,6 @@
 // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \
 // RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: ASAN_OPTIONS="detect_stack_use_after_return=1" not %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS="detect_stack_use_after_return=1" not %run %t 2>&1 | FileCheck %s
 
 int main() {
   int *p = 0;





More information about the llvm-commits mailing list