aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-06-05 22:23:15 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-06-05 22:23:15 +0000
commiteffb794346dacae2be07ab8793f529648cfe0bdf (patch)
tree7ee91e5d3df9c9bd5befe14cc4dc1932ea7503d3
parentebe6bb90060f79821332845d244981e75ddf82b1 (diff)
downloadllvm-effb794346dacae2be07ab8793f529648cfe0bdf.zip
llvm-effb794346dacae2be07ab8793f529648cfe0bdf.tar.gz
llvm-effb794346dacae2be07ab8793f529648cfe0bdf.tar.bz2
[ASan] A speculative attempt to fix a flaky test on ppc64be.
Summary: As mentioned in test/msan/fork.cc, if test output is redirected to a file (as opposed to being piped directly to FileCheck), we may lose some "done"s due to a kernel bug: https://lkml.org/lkml/2014/2/17/324, so let's pipe the output of the test. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D33915 llvm-svn: 304744
-rw-r--r--compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc b/compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc
index ec66e02..829568e 100644
--- a/compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc
@@ -10,12 +10,12 @@
//
// Collisions are unlikely but still possible so we need the ||.
// RUN: rm -f 10.txt
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 >>10.txt 2>&1
+// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 2>&1 | cat > 10.txt
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 10.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 10.txt
//
// Collisions are unlikely but still possible so we need the ||.
// RUN: rm -f 20.txt
-// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 >>20.txt 2>&1
+// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 2>&1 | cat > 20.txt
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 20.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 20.txt
#include <stdio.h>
@@ -38,7 +38,7 @@ void *run(void *arg) {
unsigned seed = (unsigned)(size_t)arg;
volatile char tmp[2];
- __asan_poison_memory_region(&tmp, sizeof(tmp));
+ __asan_poison_memory_region(&tmp, sizeof(tmp));
for (size_t i = 0; i < niter; ++i) {
random_delay(&seed);