Enable pipefail for LSan tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187873 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/lsan/lit_tests/TestCases/disabler.cc b/lib/lsan/lit_tests/TestCases/disabler.cc
index 6aa9f7d..aef9e11 100644
--- a/lib/lsan/lit_tests/TestCases/disabler.cc
+++ b/lib/lsan/lit_tests/TestCases/disabler.cc
@@ -1,7 +1,7 @@
 // Test for ScopedDisabler.
 // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0"
 // RUN: %clangxx_lsan %s -o %t
-// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/lib/lsan/lit_tests/TestCases/do_leak_check_override.cc b/lib/lsan/lit_tests/TestCases/do_leak_check_override.cc
index 440ba42..213d260 100644
--- a/lib/lsan/lit_tests/TestCases/do_leak_check_override.cc
+++ b/lib/lsan/lit_tests/TestCases/do_leak_check_override.cc
@@ -3,8 +3,8 @@
 // "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: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s
-// RUN: LSAN_OPTIONS=$LSAN_BASE %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/lib/lsan/lit_tests/TestCases/ignore_object.cc b/lib/lsan/lit_tests/TestCases/ignore_object.cc
index 46d83f5..43744e4 100644
--- a/lib/lsan/lit_tests/TestCases/ignore_object.cc
+++ b/lib/lsan/lit_tests/TestCases/ignore_object.cc
@@ -1,7 +1,7 @@
 // Test for __lsan_ignore_object().
 // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:verbosity=3"
 // RUN: %clangxx_lsan %s -o %t
-// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc b/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc
index 2c36721..28e38ca 100644
--- a/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc
+++ b/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc
@@ -1,7 +1,7 @@
 // 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: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/lib/lsan/lit_tests/TestCases/link_turned_off.cc b/lib/lsan/lit_tests/TestCases/link_turned_off.cc
index d16762b..6db7a18 100644
--- a/lib/lsan/lit_tests/TestCases/link_turned_off.cc
+++ b/lib/lsan/lit_tests/TestCases/link_turned_off.cc
@@ -2,7 +2,7 @@
 // RUN: LSAN_BASE="use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE %t
-// RUN: LSAN_OPTIONS=$LSAN_BASE %t foo 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck %s
 
 #include <sanitizer/lsan_interface.h>
 
diff --git a/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc b/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc
index 5129a7e..4f2b26c 100644
--- a/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc
+++ b/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc
@@ -1,7 +1,7 @@
 // Test that out-of-scope local variables are ignored by LSan.
 // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=1"
 // RUN: %clangxx_lsan %s -o %t
-// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE":exitcode=0" %t 2>&1 | FileCheck --check-prefix=CHECK-sanity %s
 
 #include <stdio.h>
diff --git a/lib/lsan/lit_tests/TestCases/suppressions_default.cc b/lib/lsan/lit_tests/TestCases/suppressions_default.cc
index 92bf5a2..e8e0921 100644
--- a/lib/lsan/lit_tests/TestCases/suppressions_default.cc
+++ b/lib/lsan/lit_tests/TestCases/suppressions_default.cc
@@ -1,7 +1,7 @@
 // Test for ScopedDisabler.
 // RUN: LSAN_BASE="use_registers=0:use_stacks=0"
 // RUN: %clangxx_lsan %s -o %t
-// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/lib/lsan/lit_tests/TestCases/suppressions_file.cc b/lib/lsan/lit_tests/TestCases/suppressions_file.cc
index 92bf5a2..e8e0921 100644
--- a/lib/lsan/lit_tests/TestCases/suppressions_file.cc
+++ b/lib/lsan/lit_tests/TestCases/suppressions_file.cc
@@ -1,7 +1,7 @@
 // Test for ScopedDisabler.
 // RUN: LSAN_BASE="use_registers=0:use_stacks=0"
 // RUN: %clangxx_lsan %s -o %t
-// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc b/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc
index a53cdff..2849495 100644
--- a/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc
+++ b/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc b/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc
index d6f691f..f48d08f 100644
--- a/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc
+++ b/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_registers.cc b/lib/lsan/lit_tests/TestCases/use_registers.cc
index ed37042..636fac8 100644
--- a/lib/lsan/lit_tests/TestCases/use_registers.cc
+++ b/lib/lsan/lit_tests/TestCases/use_registers.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_registers=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_stacks.cc b/lib/lsan/lit_tests/TestCases/use_stacks.cc
index d095186..06a058e 100644
--- a/lib/lsan/lit_tests/TestCases/use_stacks.cc
+++ b/lib/lsan/lit_tests/TestCases/use_stacks.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc b/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc
index 479e4f7..9e1b1cf 100644
--- a/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc
+++ b/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc b/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc
index 944b7b8..3e45e1a 100644
--- a/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc
+++ b/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc
@@ -2,7 +2,7 @@
 // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx %p/SharedLibs/huge_tls_lib_so.cc -fPIC -shared -o %t-so.so
 // RUN: %clangxx_lsan %s -o %t
-// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc
index 8457ff9..032def7 100644
--- a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc
+++ b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc
index bd5a296..86e2b29 100644
--- a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc
+++ b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_tls_static.cc b/lib/lsan/lit_tests/TestCases/use_tls_static.cc
index 3ef5969..460aee4 100644
--- a/lib/lsan/lit_tests/TestCases/use_tls_static.cc
+++ b/lib/lsan/lit_tests/TestCases/use_tls_static.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
 // RUN: LSAN_OPTIONS="" %t 2>&1
 
diff --git a/lib/lsan/lit_tests/TestCases/use_unaligned.cc b/lib/lsan/lit_tests/TestCases/use_unaligned.cc
index 890d2a8..851d249 100644
--- a/lib/lsan/lit_tests/TestCases/use_unaligned.cc
+++ b/lib/lsan/lit_tests/TestCases/use_unaligned.cc
@@ -1,7 +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: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=0" %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=0" not %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=1" %t 2>&1
 
 #include <stdio.h>
diff --git a/lib/lsan/lit_tests/lit.common.cfg b/lib/lsan/lit_tests/lit.common.cfg
index 4ff672b..d52f64c 100644
--- a/lib/lsan/lit_tests/lit.common.cfg
+++ b/lib/lsan/lit_tests/lit.common.cfg
@@ -31,4 +31,3 @@
   config.unsupported = True
 
 config.suffixes = ['.c', '.cc', '.cpp']
-config.pipefail = False