]> git.feebdaed.xyz Git - 0xmirror/nftables.git/commit
tests: shell: add feature check for count output change
authorFlorian Westphal <fw@strlen.de>
Tue, 8 Apr 2025 14:21:32 +0000 (16:21 +0200)
committerFlorian Westphal <fw@strlen.de>
Sun, 22 Jun 2025 19:40:40 +0000 (21:40 +0200)
commit7b21b7e387e30de4c4147c82247655cca608d2fd
tree37d4390cfe185733c8215f6e905248ced9508678
parent8ff87c8fd483eb3fdab5839cccaf100b593fe92e
tests: shell: add feature check for count output change

New kernels with latest nft release will print the number
of set elements allocated on the kernel side.

This causes shell test dump validation to fail in several
places.  We can't just update the affected dump files
because the test cases are also supposed to pass on current
-stable releases.

Add a feature check for this.  Dump failure can then use
sed to postprocess the stored dump file and can then call

diff a second time.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/features/setcount.sh [new file with mode: 0755]
tests/shell/helpers/test-wrapper.sh
tests/shell/testcases/rule_management/0011reset_0
tests/shell/testcases/rule_management/dumps/0011reset_0.nft
tests/shell/testcases/sets/dumps/0016element_leak_0.nft
tests/shell/testcases/sets/dumps/0017add_after_flush_0.nft
tests/shell/testcases/sets/dumps/0018set_check_size_1.nft
tests/shell/testcases/sets/dumps/0019set_check_size_0.nft
tests/shell/testcases/sets/dumps/0045concat_ipv4_service.nft
tests/shell/testcases/sets/dumps/0057set_create_fails_0.nft
tests/shell/testcases/sets/dumps/0060set_multistmt_1.nft