From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft] tests: shell: skip interval size tests on kernel that lack rbtree size fix
Date: Mon, 10 Mar 2025 13:42:29 +0100 [thread overview]
Message-ID: <20250310124232.11796-1-fw@strlen.de> (raw)
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
next reply other threads:[~2025-03-10 13:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 12:42 Florian Westphal [this message]
2025-03-12 0:15 ` [PATCH nft] tests: shell: skip interval size tests on kernel that lack rbtree size fix Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250310124232.11796-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).