summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/dumps
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-08-16 14:22:01 +0200
committerFlorian Westphal <fw@strlen.de>2019-12-17 23:10:46 +0100
commite7069f617fb70dccb52f3de1beab7851a08eade9 (patch)
tree3b70fe154221db752b43ac83311c85072e7eff85 /tests/shell/testcases/maps/dumps
parent6a0fb05cc335350c92738a88d7434514ab4548cb (diff)
tests: add typeof test cases
Add sets using unspecific string/integer types, one with osf name, other with vlan id. Neither type can be used directly, as they lack the type size information. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases/maps/dumps')
-rw-r--r--tests/shell/testcases/maps/dumps/typeof_maps_0.nft16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/shell/testcases/maps/dumps/typeof_maps_0.nft b/tests/shell/testcases/maps/dumps/typeof_maps_0.nft
new file mode 100644
index 00000000..4361ca3d
--- /dev/null
+++ b/tests/shell/testcases/maps/dumps/typeof_maps_0.nft
@@ -0,0 +1,16 @@
+table inet t {
+ map m1 {
+ typeof osf name : ct mark
+ elements = { "Linux" : 0x00000001 }
+ }
+
+ map m2 {
+ typeof vlan id : meta mark
+ elements = { 1 : 0x00000001, 4095 : 0x00004095 }
+ }
+
+ chain c {
+ ct mark set osf name map @m1
+ meta mark set vlan id map @m2
+ }
+}