[iproute2,2/8] testsuite: Fix line count test
diff mbox series

Message ID 20191216064344.1470824-3-bpoirier@cumulusnetworks.com
State Accepted
Delegated to: stephen hemminger
Headers show
Series
  • bridge vlan tunnelshow fixes
Related show

Commit Message

Benjamin Poirier Dec. 16, 2019, 6:43 a.m. UTC
a substring match is not enough, ex: 10 != 1

Fixes: 30383b074de1 ("tests: Add output testing")
Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
---
 testsuite/lib/generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

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