netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 1/3] tests: shell: verify huge transaction returns expected number of rules
@ 2019-09-10 13:43 Eric Garver
  2019-09-10 13:43 ` [PATCH nft 2/3] tests: shell: add huge JSON transaction Eric Garver
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Garver @ 2019-09-10 13:43 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Pablo Neira Ayuso, Florian Westphal, Phil Sutter

Verify that we get the expected number of rules with --echo (i.e. the
reply wasn't truncated).

Signed-off-by: Eric Garver <eric@garver.life>
---
 tests/shell/testcases/transactions/0049huge_0 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/shell/testcases/transactions/0049huge_0 b/tests/shell/testcases/transactions/0049huge_0
index 12338087c63e..2791249512b6 100755
--- a/tests/shell/testcases/transactions/0049huge_0
+++ b/tests/shell/testcases/transactions/0049huge_0
@@ -6,9 +6,10 @@ $NFT flush ruleset
 $NFT add table inet test
 $NFT add chain inet test c
 
+RULE_COUNT=3000
 RULESET=$(
-for ((i = 0; i < 3000; i++)); do
+for ((i = 0; i < ${RULE_COUNT}; i++)); do
 	echo "add rule inet test c accept comment rule$i"
 done
 )
-$NFT -e -f - <<< "$RULESET" >/dev/null
+test $($NFT -e -a -f - <<< "$RULESET" |grep "#[ ]\+handle[ ]\+[0-9]\+" |wc -l) -eq ${RULE_COUNT} || exit 1
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-10 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 13:43 [PATCH nft 1/3] tests: shell: verify huge transaction returns expected number of rules Eric Garver
2019-09-10 13:43 ` [PATCH nft 2/3] tests: shell: add huge JSON transaction Eric Garver
2019-09-10 13:43 ` [PATCH nft 3/3] tests: shell: add huge transaction from firewalld Eric Garver
2019-09-10 16:25 ` [PATCH nft 1/3] tests: shell: verify huge transaction returns expected number of rules Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).