[PATCH] D31433: Use count instead of grep -c

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 12:33:13 PDT 2017


rafael created this revision.
Herald added a subscriber: kubamracek.

Using count is more common in llvm and avoids a subshell.


https://reviews.llvm.org/D31433

Files:
  compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc


Index: compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc
===================================================================
--- compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc
+++ compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc
@@ -5,7 +5,7 @@
 // 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 -c 'ERROR: AddressSanitizer: use-after-poison' 1.txt) -eq 10 ]
+// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' 1.txt | count 10
 // RUN: FileCheck --check-prefix=CHECK-NO-COLLISION %s < 1.txt
 //
 // Collisions are unlikely but still possible so we need the ||.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31433.93271.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170328/a3b26854/attachment.bin>


More information about the llvm-commits mailing list