[PATCH] tsan: automatically deflake flaky tests

Alexey Samsonov vonosmas at gmail.com
Tue May 27 12:28:56 PDT 2014


================
Comment at: test/tsan/deflake.bash:8
@@ +7,3 @@
+
+BIN=$1
+SRC=$2
----------------
What about the %run argument? If it is expanded to anything non-empty, this script won't work.

================
Comment at: test/tsan/free_race.c:2
@@ -1,3 +1,3 @@
 // RUN: %clang_tsan -O1 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOZUPP
+// RUN: $(dirname %s)/deflake.bash %run %t %s --check-prefix=CHECK-NOZUPP
 // RUN: TSAN_OPTIONS="suppressions=%s.supp print_suppressions=1" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUPP
----------------
You can add a lit substitution to test/tsan/lit.cfg and instead invoke this "tool" as smth. like %tsan_deflake

http://reviews.llvm.org/D3913






More information about the llvm-commits mailing list