From 9c92b22d04ba74be89fd2b49896e079c0980ed2d Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 29 May 2019 15:13:46 +0200 Subject: tests/shell: Test large transaction with echo output This reliably triggered ENOBUFS condition in mnl_batch_talk(). With the past changes, it passes even after increasing the number of rules to 300k. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/transactions/0049huge_0 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tests/shell/testcases/transactions/0049huge_0 (limited to 'tests/shell/testcases') diff --git a/tests/shell/testcases/transactions/0049huge_0 b/tests/shell/testcases/transactions/0049huge_0 new file mode 100755 index 00000000..12338087 --- /dev/null +++ b/tests/shell/testcases/transactions/0049huge_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +# let's try to exceed transaction buffer space + +$NFT flush ruleset +$NFT add table inet test +$NFT add chain inet test c + +RULESET=$( +for ((i = 0; i < 3000; i++)); do + echo "add rule inet test c accept comment rule$i" +done +) +$NFT -e -f - <<< "$RULESET" >/dev/null -- cgit v1.2.3