From: Phil Sutter Date: Wed, 29 May 2019 13:13:46 +0000 (+0200) Subject: tests/shell: Test large transaction with echo output X-Git-Tag: v0.9.1~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c92b22d04ba74be89fd2b49896e079c0980ed2d;p=thirdparty%2Fnftables.git 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 --- 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