[compiler-rt] r253579 - [tsan] Implement "%env_tsan_opts" substitution to inherit default TSAN_OPTIONS
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 09:28:46 PST 2015
Author: kuba.brecka
Date: Thu Nov 19 11:28:46 2015
New Revision: 253579
URL: http://llvm.org/viewvc/llvm-project?rev=253579&view=rev
Log:
[tsan] Implement "%env_tsan_opts" substitution to inherit default TSAN_OPTIONS
We already have %env_asan_opts for ASan, let's implement the same for TSan.
Differential Revision: http://reviews.llvm.org/D14698
Modified:
compiler-rt/trunk/test/tsan/Darwin/symbolizer-atos.cc
compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc
compiler-rt/trunk/test/tsan/allocator_returns_null.cc
compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
compiler-rt/trunk/test/tsan/fork_atexit.cc
compiler-rt/trunk/test/tsan/fork_deadlock.cc
compiler-rt/trunk/test/tsan/fork_multithreaded.cc
compiler-rt/trunk/test/tsan/free_race.c
compiler-rt/trunk/test/tsan/halt_on_error.cc
compiler-rt/trunk/test/tsan/ignore_lib0.cc
compiler-rt/trunk/test/tsan/ignore_lib1.cc
compiler-rt/trunk/test/tsan/ignore_lib2.cc
compiler-rt/trunk/test/tsan/ignore_lib3.cc
compiler-rt/trunk/test/tsan/lit.cfg
compiler-rt/trunk/test/tsan/malloc_overflow.cc
compiler-rt/trunk/test/tsan/mutex_cycle2.c
compiler-rt/trunk/test/tsan/race_top_suppression.cc
compiler-rt/trunk/test/tsan/race_top_suppression1.cc
compiler-rt/trunk/test/tsan/setuid2.c
compiler-rt/trunk/test/tsan/suppressions_global.cc
compiler-rt/trunk/test/tsan/suppressions_race.cc
compiler-rt/trunk/test/tsan/suppressions_race2.cc
Modified: compiler-rt/trunk/test/tsan/Darwin/symbolizer-atos.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/symbolizer-atos.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/symbolizer-atos.cc (original)
+++ compiler-rt/trunk/test/tsan/Darwin/symbolizer-atos.cc Thu Nov 19 11:28:46 2015
@@ -1,5 +1,5 @@
// RUN: %clangxx_tsan %s -o %t
-// RUN: TSAN_OPTIONS=$TSAN_OPTIONS:verbosity=2:external_symbolizer_path=/usr/bin/atos %deflake %run %t | FileCheck %s
+// RUN: %env_tsan_opts=verbosity=2:external_symbolizer_path=/usr/bin/atos %deflake %run %t | FileCheck %s
#include "../test.h"
int GlobalData[10];
Modified: compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc (original)
+++ compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc Thu Nov 19 11:28:46 2015
@@ -1,5 +1,5 @@
// RUN: %clangxx_tsan %s -o %t
-// RUN: TSAN_OPTIONS=$TSAN_OPTIONS:verbosity=2:external_symbolizer_path= %deflake %run %t | FileCheck %s
+// RUN: %env_tsan_opts=verbosity=2:external_symbolizer_path= %deflake %run %t | FileCheck %s
#include "../test.h"
int GlobalData[10];
Modified: compiler-rt/trunk/test/tsan/allocator_returns_null.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/allocator_returns_null.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/allocator_returns_null.cc (original)
+++ compiler-rt/trunk/test/tsan/allocator_returns_null.cc Thu Nov 19 11:28:46 2015
@@ -4,11 +4,11 @@
//
// RUN: %clangxx_tsan -O0 %s -o %t
// 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
+// RUN: %env_tsan_opts=allocator_may_return_null=0 not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mCRASH
+// RUN: %env_tsan_opts=allocator_may_return_null=0 not %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-cCRASH
+// RUN: %env_tsan_opts=allocator_may_return_null=0 not %run %t calloc-overflow 2>&1 | FileCheck %s --check-prefix=CHECK-coCRASH
+// RUN: %env_tsan_opts=allocator_may_return_null=0 not %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH
+// RUN: %env_tsan_opts=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>
Modified: compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc (original)
+++ compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc Thu Nov 19 11:28:46 2015
@@ -1,12 +1,12 @@
// RUN: %clangxx_tsan %s -o %t -DLockType=PthreadMutex
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOT-SECOND
-// RUN: TSAN_OPTIONS="detect_deadlocks=1 second_deadlock_stack=1" %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-SECOND
+// RUN: %env_tsan_opts=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOT-SECOND
+// RUN: %env_tsan_opts=detect_deadlocks=1:second_deadlock_stack=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-SECOND
// RUN: %clangxx_tsan %s -o %t -DLockType=PthreadSpinLock
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s
+// RUN: %env_tsan_opts=detect_deadlocks=1 %deflake %run %t | FileCheck %s
// RUN: %clangxx_tsan %s -o %t -DLockType=PthreadRWLock
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RD
+// RUN: %env_tsan_opts=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RD
// RUN: %clangxx_tsan %s -o %t -DLockType=PthreadRecursiveMutex
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-REC
+// RUN: %env_tsan_opts=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-REC
#include "test.h"
#undef NDEBUG
#include <assert.h>
Modified: compiler-rt/trunk/test/tsan/fork_atexit.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/fork_atexit.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/fork_atexit.cc (original)
+++ compiler-rt/trunk/test/tsan/fork_atexit.cc Thu Nov 19 11:28:46 2015
@@ -1,4 +1,4 @@
-// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t && %env_tsan_opts=atexit_sleep_ms=50 %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: darwin
#include <pthread.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/tsan/fork_deadlock.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/fork_deadlock.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/fork_deadlock.cc (original)
+++ compiler-rt/trunk/test/tsan/fork_deadlock.cc Thu Nov 19 11:28:46 2015
@@ -1,4 +1,4 @@
-// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t && %env_tsan_opts=atexit_sleep_ms=50 %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: darwin
#include "test.h"
#include <errno.h>
Modified: compiler-rt/trunk/test/tsan/fork_multithreaded.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/fork_multithreaded.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/fork_multithreaded.cc (original)
+++ compiler-rt/trunk/test/tsan/fork_multithreaded.cc Thu Nov 19 11:28:46 2015
@@ -1,5 +1,5 @@
// 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
+// RUN: %clangxx_tsan -O1 %s -o %t && %env_tsan_opts=die_after_fork=0 %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-NODIE
// UNSUPPORTED: darwin
#include "test.h"
#include <errno.h>
Modified: compiler-rt/trunk/test/tsan/free_race.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/free_race.c?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/free_race.c (original)
+++ compiler-rt/trunk/test/tsan/free_race.c Thu Nov 19 11:28:46 2015
@@ -1,6 +1,6 @@
// RUN: %clang_tsan -O1 %s -o %t
// RUN: %deflake %run %t | 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
+// RUN: %env_tsan_opts=suppressions='%s.supp':print_suppressions=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUPP
#include "test.h"
Modified: compiler-rt/trunk/test/tsan/halt_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/halt_on_error.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/halt_on_error.cc (original)
+++ compiler-rt/trunk/test/tsan/halt_on_error.cc Thu Nov 19 11:28:46 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS halt_on_error=1" %deflake %run %t | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=halt_on_error=1 %deflake %run %t | FileCheck %s
#include "test.h"
int X;
Modified: compiler-rt/trunk/test/tsan/ignore_lib0.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib0.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib0.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib0.cc Thu Nov 19 11:28:46 2015
@@ -3,7 +3,7 @@
// RUN: echo running w/o suppressions:
// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | 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'" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
+// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %env_tsan_opts=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.
Modified: compiler-rt/trunk/test/tsan/ignore_lib1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib1.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib1.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib1.cc Thu Nov 19 11:28:46 2015
@@ -3,7 +3,7 @@
// RUN: echo running w/o suppressions:
// RUN: %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
// RUN: echo running with suppressions:
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
+// RUN: %env_tsan_opts=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.
Modified: compiler-rt/trunk/test/tsan/ignore_lib2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib2.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib2.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib2.cc Thu Nov 19 11:28:46 2015
@@ -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'" %deflake %run %t | FileCheck %s
+// RUN: %env_tsan_opts=suppressions='%s.supp' %deflake %run %t | FileCheck %s
// Tests that called_from_lib suppression matched against 2 libraries
// causes program crash (this is not supported).
Modified: compiler-rt/trunk/test/tsan/ignore_lib3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib3.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib3.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib3.cc Thu Nov 19 11:28:46 2015
@@ -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'" %deflake %run %t | FileCheck %s
+// RUN: %env_tsan_opts=suppressions='%s.supp' %deflake %run %t | FileCheck %s
// Tests that unloading of a library matched against called_from_lib suppression
// causes program crash (this is not supported).
Modified: compiler-rt/trunk/test/tsan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/lit.cfg?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/lit.cfg (original)
+++ compiler-rt/trunk/test/tsan/lit.cfg Thu Nov 19 11:28:46 2015
@@ -18,14 +18,19 @@ config.name = 'ThreadSanitizer'
config.test_source_root = os.path.dirname(__file__)
# Setup environment variables for running ThreadSanitizer.
-tsan_options = "atexit_sleep_ms=0"
+default_tsan_opts = "atexit_sleep_ms=0"
if config.host_os == 'Darwin':
# On Darwin, we default to `abort_on_error=1`, which would make tests run
# much slower. Let's override this and run lit tests with 'abort_on_error=0'.
- tsan_options += ':abort_on_error=0'
+ default_tsan_opts += ':abort_on_error=0'
-config.environment['TSAN_OPTIONS'] = tsan_options
+# Platform-specific default TSAN_OPTIONS for lit tests.
+if default_tsan_opts:
+ config.environment['TSAN_OPTIONS'] = default_tsan_opts
+ default_tsan_opts += ':'
+config.substitutions.append(('%env_tsan_opts=',
+ 'env TSAN_OPTIONS=' + default_tsan_opts))
# GCC driver doesn't add necessary compile/link flags with -fsanitize=thread.
if config.compiler_id == 'GNU':
Modified: compiler-rt/trunk/test/tsan/malloc_overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/malloc_overflow.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/malloc_overflow.cc (original)
+++ compiler-rt/trunk/test/tsan/malloc_overflow.cc Thu Nov 19 11:28:46 2015
@@ -1,5 +1,5 @@
// RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: TSAN_OPTIONS=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s
+// RUN: %env_tsan_opts=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s
#include <stdio.h>
#include <stdlib.h>
Modified: compiler-rt/trunk/test/tsan/mutex_cycle2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_cycle2.c?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_cycle2.c (original)
+++ compiler-rt/trunk/test/tsan/mutex_cycle2.c Thu Nov 19 11:28:46 2015
@@ -1,11 +1,11 @@
// RUN: %clangxx_tsan %s -o %t
// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s
-// RUN: TSAN_OPTIONS=detect_deadlocks=0 %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN: %env_tsan_opts=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s
+// RUN: %env_tsan_opts=detect_deadlocks=0 %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
// RUN: echo "deadlock:main" > %t.supp
-// RUN: TSAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN: %env_tsan_opts=suppressions='%t.supp' %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
// RUN: echo "deadlock:zzzz" > %t.supp
-// RUN: TSAN_OPTIONS="suppressions='%t.supp'" not %run %t 2>&1 | FileCheck %s
+// RUN: %env_tsan_opts=suppressions='%t.supp' not %run %t 2>&1 | FileCheck %s
#include <pthread.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/tsan/race_top_suppression.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_top_suppression.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_top_suppression.cc (original)
+++ compiler-rt/trunk/test/tsan/race_top_suppression.cc Thu Nov 19 11:28:46 2015
@@ -1,6 +1,6 @@
// RUN: echo "race_top:TopFunction" > %t.supp
// RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%t.supp'" %run %t 2>&1 | FileCheck %s
+// RUN: %env_tsan_opts=suppressions='%t.supp' %run %t 2>&1 | FileCheck %s
// RUN: rm %t.supp
#include "test.h"
Modified: compiler-rt/trunk/test/tsan/race_top_suppression1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_top_suppression1.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_top_suppression1.cc (original)
+++ compiler-rt/trunk/test/tsan/race_top_suppression1.cc Thu Nov 19 11:28:46 2015
@@ -1,6 +1,6 @@
// RUN: echo "race_top:TopFunction" > %t.supp
// RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%t.supp'" %deflake %run %t 2>&1 | FileCheck %s
+// RUN: %env_tsan_opts=suppressions='%t.supp' %deflake %run %t 2>&1 | FileCheck %s
// RUN: rm %t.supp
#include "test.h"
Modified: compiler-rt/trunk/test/tsan/setuid2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/setuid2.c?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/setuid2.c (original)
+++ compiler-rt/trunk/test/tsan/setuid2.c Thu Nov 19 11:28:46 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="flush_memory_ms=1 memory_limit_mb=1" %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=flush_memory_ms=1:memory_limit_mb=1 %run %t 2>&1 | FileCheck %s
#include "test.h"
#include <sys/types.h>
#include <unistd.h>
Modified: compiler-rt/trunk/test/tsan/suppressions_global.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppressions_global.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppressions_global.cc (original)
+++ compiler-rt/trunk/test/tsan/suppressions_global.cc Thu Nov 19 11:28:46 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s
#include <pthread.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/tsan/suppressions_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppressions_race.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppressions_race.cc (original)
+++ compiler-rt/trunk/test/tsan/suppressions_race.cc Thu Nov 19 11:28:46 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s
#include "test.h"
int Global;
Modified: compiler-rt/trunk/test/tsan/suppressions_race2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppressions_race2.cc?rev=253579&r1=253578&r2=253579&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppressions_race2.cc (original)
+++ compiler-rt/trunk/test/tsan/suppressions_race2.cc Thu Nov 19 11:28:46 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s
#include "test.h"
int Global;
More information about the llvm-commits
mailing list