summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-11-20 13:56:01 +0100
committerFlorian Westphal <fw@strlen.de>2023-11-21 18:53:50 +0100
commitb757ac80d88bc161ffa793864b9219a1e16f13b8 (patch)
treebea39ff392ae96941ee5dc3923b9b6a5c4d75b9f /tests
parent4e8b044c30d8d3748df96925f2c8e8cf4bc76fb2 (diff)
tests: shell: skip maps delete test if dynset lacks delete op
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/shell/features/dynset_op_delete.nft12
-rwxr-xr-xtests/shell/testcases/maps/typeof_maps_add_delete2
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/shell/features/dynset_op_delete.nft b/tests/shell/features/dynset_op_delete.nft
new file mode 100644
index 00000000..125b4526
--- /dev/null
+++ b/tests/shell/features/dynset_op_delete.nft
@@ -0,0 +1,12 @@
+# d0a8d877da97 ("netfilter: nft_dynset: support for element deletion")
+# v5.4-rc1~131^2~59^2~4
+table ip x {
+ set s {
+ flags dynamic;
+ type inet_service;
+ }
+
+ chain y {
+ delete @s { tcp dport }
+ }
+}
diff --git a/tests/shell/testcases/maps/typeof_maps_add_delete b/tests/shell/testcases/maps/typeof_maps_add_delete
index 5e2f8ecc..d2ac9f1c 100755
--- a/tests/shell/testcases/maps/typeof_maps_add_delete
+++ b/tests/shell/testcases/maps/typeof_maps_add_delete
@@ -1,5 +1,7 @@
#!/bin/bash
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_dynset_op_delete)
+
CONDMATCH="ip saddr @dynmark"
NCONDMATCH="ip saddr != @dynmark"