summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@cumulusnetworks.com>2019-12-16 15:43:38 +0900
committerStephen Hemminger <stephen@networkplumber.org>2019-12-16 20:49:28 -0800
commitd88a6a98e86da9446487ecc4f1fea435323ef21d (patch)
tree4e32d3a017e18788f0ddef84da0321a4c9147c40 /testsuite
parent15322f46c3427a7d065b41fc5b0e513755329295 (diff)
downloadiproute2-d88a6a98e86da9446487ecc4f1fea435323ef21d.tar.gz
testsuite: Fix line count test
a substring match is not enough, ex: 10 != 1 Fixes: 30383b074de1 ("tests: Add output testing") Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/lib/generic.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/lib/generic.sh b/testsuite/lib/generic.sh
index f92260fc..e909008a 100644
--- a/testsuite/lib/generic.sh
+++ b/testsuite/lib/generic.sh
@@ -121,7 +121,7 @@ test_on_not()
test_lines_count()
{
echo -n "test on lines count ($1): "
- if cat "$STD_OUT" | wc -l | grep -q "$1"
+ if [ $(cat "$STD_OUT" | wc -l) -eq "$1" ]
then
pr_success
else