[compiler-rt] r313843 - [asan] Remove "rm -f" in tests where it was needed only because of >>

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 17:06:08 PDT 2017


Author: vitalybuka
Date: Wed Sep 20 17:06:08 2017
New Revision: 313843

URL: http://llvm.org/viewvc/llvm-project?rev=313843&view=rev
Log:
[asan] Remove "rm -f" in tests where it was needed only because of >>

Modified:
    compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-signals.c
    compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-signals.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-signals.c?rev=313843&r1=313842&r2=313843&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-signals.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-signals.c Wed Sep 20 17:06:08 2017
@@ -2,10 +2,9 @@
 //
 // RUN: %clang_asan -fsanitize-recover=address -pthread %s -o %t
 //
-// RUN: rm -f %t.log
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 100 >>%t.log 2>&1 || true
+// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 100 >%t.log 2>&1 || true
 // Collision will almost always get triggered but we still need to check the unlikely case:
-// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < %t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s < %t.log
+// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
 
 #define _SVID_SOURCE 1  // SA_NODEFER
 

Modified: compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc?rev=313843&r1=313842&r2=313843&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc Wed Sep 20 17:06:08 2017
@@ -2,21 +2,18 @@
 //
 // RUN: %clangxx_asan -fsanitize-recover=address -pthread %s -o %t
 //
-// RUN: rm -f 1.txt
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 1 10 >>1.txt 2>&1
-// RUN: FileCheck %s < 1.txt
-// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' 1.txt | count 10
-// RUN: FileCheck --check-prefix=CHECK-NO-COLLISION %s < 1.txt
+// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 1 10 >%t.log 2>&1
+// RUN: FileCheck %s <%t.log
+// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 10
+// RUN: FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
 //
 // 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 2>&1 | cat > 10.txt
-// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 10.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 10.txt
+// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
+// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
 //
 // 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 2>&1 | cat > 20.txt
-// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 20.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 20.txt
+// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
+// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc?rev=313843&r1=313842&r2=313843&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc Wed Sep 20 17:06:08 2017
@@ -6,8 +6,7 @@
 // RUN: %env_asan_opts=halt_on_error=false %run %t 2>&1 | FileCheck %s
 //
 // Check that we die after reaching different reports number threshold.
-// RUN: rm -f %t1.log
-// RUN: %env_asan_opts=halt_on_error=false not %run %t 1 >> %t1.log 2>&1
+// RUN: %env_asan_opts=halt_on_error=false not %run %t 1 >%t1.log 2>&1
 // RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t1.log | count 25
 //
 // Check suppress_equal_pcs=true behavior is equal to default one.
@@ -15,7 +14,7 @@
 //
 // Check suppress_equal_pcs=false behavior isn't equal to default one.
 // RUN: rm -f %t2.log
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t >> %t2.log 2>&1
+// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t >%t2.log 2>&1
 // RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t2.log | count 30
 
 #define ACCESS_ARRAY_FIVE_ELEMENTS(array, i)     \




More information about the llvm-commits mailing list