diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-03-30 13:22:30 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-03-30 13:22:30 +0000 |
commit | be927f586dcacc47d87993690654e177f17597ba (patch) | |
tree | dbce307148547bc7af8803cb384ada524db63ec2 | |
parent | 84b07dbd75a133d1f7437b8c23c2c83f4c95ad87 (diff) | |
download | bcm5719-llvm-be927f586dcacc47d87993690654e177f17597ba.tar.gz bcm5719-llvm-be927f586dcacc47d87993690654e177f17597ba.zip |
Use count instead of grep -c.
Using count is more common in llvm and avoids a subshell.
llvm-svn: 299076
-rw-r--r-- | compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc | 2 | ||||
-rw-r--r-- | compiler-rt/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc | 4 |
2 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 5d7eff06e34..1b26173d713 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 @@ -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 ||. diff --git a/compiler-rt/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc b/compiler-rt/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc index 98ef851657b..b9d85ef94b2 100644 --- a/compiler-rt/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc +++ b/compiler-rt/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc @@ -8,7 +8,7 @@ // 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: [ $(grep -c 'ERROR: AddressSanitizer: stack-buffer-overflow' %t1.log) -eq 25 ] +// RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t1.log | count 25 // // Check suppress_equal_pcs=true behavior is equal to default one. // RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=true %run %t 2>&1 | FileCheck %s @@ -16,7 +16,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: [ $(grep -c 'ERROR: AddressSanitizer: stack-buffer-overflow' %t2.log) -eq 30 ] +// RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t2.log | count 30 #define ACCESS_ARRAY_FIVE_ELEMENTS(array, i) \ array[i] = i; \ |