[PATCH] D14641: [tsan] Fix mutex_cycle2.c testcase by including default TSAN_OPTIONS

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 02:10:49 PST 2015


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, kcc, samsonov, glider.
kubabrecka added subscribers: llvm-commits, zaks.anna, ismailp.

On OS X, we need to inherit "abort_on_error=0" so that the testcase doesn't crash.

http://reviews.llvm.org/D14641

Files:
  test/tsan/mutex_cycle2.c

Index: test/tsan/mutex_cycle2.c
===================================================================
--- test/tsan/mutex_cycle2.c
+++ test/tsan/mutex_cycle2.c
@@ -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: TSAN_OPTIONS=$TSAN_OPTIONS:detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s
+// RUN: TSAN_OPTIONS=$TSAN_OPTIONS: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: TSAN_OPTIONS=$TSAN_OPTIONS:"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: TSAN_OPTIONS=$TSAN_OPTIONS:"suppressions='%t.supp'" not %run %t 2>&1 | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14641.40122.patch
Type: text/x-patch
Size: 1157 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151113/1aee6833/attachment.bin>


More information about the llvm-commits mailing list