tests: shell: skip interval size tests on kernel that lack rbtree size fix
Florian Westphal
maintainerPATCH 1/1 tests: shell: skip interval size tests on kernel that lack rbtree size fix
Skip these tests for older kernels.
Signed-off-by Florian Westphal <[email protected]>
--- tests/shell/features/rbtree_size_limit.nft | 10 ++++++++++ tests/shell/testcases/sets/interval_size | 2 ++ tests/shell/testcases/sets/interval_size_random | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 tests/shell/features/rbtree_size_limit.nft
tests/shell/features/rbtree_size_limit.nft new file +10 -0
@@ -0,0 +1,10 @@ +# 8d738c1869f6 ("netfilter: nf_tables: fix set size with rbtree backend") +# v6.14-rc1~162^2~7^2~13 +table inet x { + set y { + typeof ip saddr + flags interval + size 1 + elements = { 10.1.1.0/24 } + } +}
tests/shell/testcases/sets/interval_size +2 -0
@@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_rbtree_size_limit) + RULESET="table inet x { set x { typeof ip saddr
tests/shell/testcases/sets/interval_size_random +2 -0
@@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_rbtree_size_limit) + generate_ip() { local first=($1) echo -n "$first.$((RANDOM % 256)).$((RANDOM % 256)).$((RANDOM % 256))"
Signature · 1 line
2.45.3
Quoted 3 lines · Florian Westphal
Skip these tests for older kernels.
Signed-off-by Florian Westphal <[email protected]>
Quoted 51 lines
--- tests/shell/features/rbtree_size_limit.nft | 10 ++++++++++ tests/shell/testcases/sets/interval_size | 2 ++ tests/shell/testcases/sets/interval_size_random | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 tests/shell/features/rbtree_size_limit.nfttests/shell/features/rbtree_size_limit.nft new file +10
-0@@ -0,0 +1,10 @@ +# 8d738c1869f6 ("netfilter: nf_tables: fix set size with rbtree backend") +# v6.14-rc1~162^2~7^2~13 +table inet x { + set y { + typeof ip saddr + flags interval + size 1 + elements = { 10.1.1.0/24 } + } +}tests/shell/testcases/sets/interval_size +2
-0@@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_rbtree_size_limit) + RULESET="table inet x { set x { typeof ip saddrtests/shell/testcases/sets/interval_size_random +2
-0@@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_rbtree_size_limit) + generate_ip() { local first=($1) echo -n "$first.$((RANDOM % 256)).$((RANDOM % 256)).$((RANDOM % 256))"Signature · 1 line
2.45.3