* [PATCH nft] tests: shell: skip interval size tests on kernel that lack rbtree size fix
@ 2025-03-10 12:42 Florian Westphal
2025-03-12 0:15 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2025-03-10 12:42 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal
Skip these tests for older kernels.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
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
diff --git a/tests/shell/features/rbtree_size_limit.nft b/tests/shell/features/rbtree_size_limit.nft
new file mode 100644
index 000000000000..7eb44face077
--- /dev/null
+++ b/tests/shell/features/rbtree_size_limit.nft
@@ -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 }
+ }
+}
diff --git a/tests/shell/testcases/sets/interval_size b/tests/shell/testcases/sets/interval_size
index 6d0759672999..55a6cd4948e2 100755
--- a/tests/shell/testcases/sets/interval_size
+++ b/tests/shell/testcases/sets/interval_size
@@ -1,5 +1,7 @@
#!/bin/bash
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_rbtree_size_limit)
+
RULESET="table inet x {
set x {
typeof ip saddr
diff --git a/tests/shell/testcases/sets/interval_size_random b/tests/shell/testcases/sets/interval_size_random
index 701a1e73956c..3320b51245db 100755
--- a/tests/shell/testcases/sets/interval_size_random
+++ b/tests/shell/testcases/sets/interval_size_random
@@ -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))"
--
2.45.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nft] tests: shell: skip interval size tests on kernel that lack rbtree size fix
2025-03-10 12:42 [PATCH nft] tests: shell: skip interval size tests on kernel that lack rbtree size fix Florian Westphal
@ 2025-03-12 0:15 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2025-03-12 0:15 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel
On Mon, Mar 10, 2025 at 01:42:29PM +0100, Florian Westphal wrote:
> Skip these tests for older kernels.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
> ---
> 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
>
> diff --git a/tests/shell/features/rbtree_size_limit.nft b/tests/shell/features/rbtree_size_limit.nft
> new file mode 100644
> index 000000000000..7eb44face077
> --- /dev/null
> +++ b/tests/shell/features/rbtree_size_limit.nft
> @@ -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 }
> + }
> +}
> diff --git a/tests/shell/testcases/sets/interval_size b/tests/shell/testcases/sets/interval_size
> index 6d0759672999..55a6cd4948e2 100755
> --- a/tests/shell/testcases/sets/interval_size
> +++ b/tests/shell/testcases/sets/interval_size
> @@ -1,5 +1,7 @@
> #!/bin/bash
>
> +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_rbtree_size_limit)
> +
> RULESET="table inet x {
> set x {
> typeof ip saddr
> diff --git a/tests/shell/testcases/sets/interval_size_random b/tests/shell/testcases/sets/interval_size_random
> index 701a1e73956c..3320b51245db 100755
> --- a/tests/shell/testcases/sets/interval_size_random
> +++ b/tests/shell/testcases/sets/interval_size_random
> @@ -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))"
> --
> 2.45.3
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-12 0:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 12:42 [PATCH nft] tests: shell: skip interval size tests on kernel that lack rbtree size fix Florian Westphal
2025-03-12 0:15 ` Pablo Neira Ayuso
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).