summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/dumps
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2024-07-03 16:29:26 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2024-07-05 00:10:47 +0200
commit8047086e454f5696c1686fea98a32e1fe3e65f90 (patch)
treec3599a456daa2ec20b2c1d1bcc47cfc094a30929 /tests/shell/testcases/maps/dumps
parent551a4ad68b922fa6c942f5e79ac59f723a12e233 (diff)
tests: shell: cover set element deletion in maps
Extend existing coverage to deal with set element deletion, including catchall elements too. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/maps/dumps')
-rw-r--r--tests/shell/testcases/maps/dumps/delete_elem_catchall.nft12
-rw-r--r--tests/shell/testcases/maps/dumps/delete_element.nft12
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/shell/testcases/maps/dumps/delete_elem_catchall.nft b/tests/shell/testcases/maps/dumps/delete_elem_catchall.nft
new file mode 100644
index 00000000..14054f4d
--- /dev/null
+++ b/tests/shell/testcases/maps/dumps/delete_elem_catchall.nft
@@ -0,0 +1,12 @@
+table ip x {
+ map m {
+ typeof ct bytes : meta priority
+ flags interval
+ elements = { * : 1:3 }
+ }
+
+ chain y {
+ type filter hook output priority filter; policy accept;
+ meta priority set ct bytes map @m
+ }
+}
diff --git a/tests/shell/testcases/maps/dumps/delete_element.nft b/tests/shell/testcases/maps/dumps/delete_element.nft
new file mode 100644
index 00000000..5275b4dc
--- /dev/null
+++ b/tests/shell/testcases/maps/dumps/delete_element.nft
@@ -0,0 +1,12 @@
+table ip x {
+ map m {
+ typeof ct bytes : meta priority
+ flags interval
+ elements = { 2048001-4000000 : 1:2 }
+ }
+
+ chain y {
+ type filter hook output priority filter; policy accept;
+ meta priority set ct bytes map @m
+ }
+}