[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191216064344.1470824-3-bpoirier@cumulusnetworks.com>
Date: Mon, 16 Dec 2019 15:43:38 +0900
From: Benjamin Poirier <bpoirier@...ulusnetworks.com>
To: netdev@...r.kernel.org
Cc: Roopa Prabhu <roopa@...ulusnetworks.com>
Subject: [PATCH iproute2 2/8] 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@...ulusnetworks.com>
---
testsuite/lib/generic.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.24.0
Powered by blists - more mailing lists