summaryrefslogtreecommitdiffstats
path: root/tests/py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py')
-rw-r--r--tests/py/any/ct.t2
-rw-r--r--tests/py/any/ct.t.payload13
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t
index 059402e2..d4022525 100644
--- a/tests/py/any/ct.t
+++ b/tests/py/any/ct.t
@@ -56,6 +56,8 @@ ct mark set 0x11 xor 0x1331;ok;ct mark set 0x00001320
ct mark set 0x11333 and 0x11;ok;ct mark set 0x00000011
ct mark set 0x12 or 0x11;ok;ct mark set 0x00000013
ct mark set 0x11;ok;ct mark set 0x00000011
+ct mark set mark;ok;ct mark set mark
+ct mark set mark map { 1 : 10, 2 : 20, 3 : 30 };ok;ct mark set mark map { 0x00000003 : 0x0000001e, 0x00000002 : 0x00000014, 0x00000001 : 0x0000000a}
ct expiration 30;ok;ct expiration 30s
ct expiration 22;ok;ct expiration 22s
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload
index 2bebaccd..651b6449 100644
--- a/tests/py/any/ct.t.payload
+++ b/tests/py/any/ct.t.payload
@@ -273,3 +273,16 @@ ip test-ip4 output
[ ct load mark => reg 9 ]
[ lookup reg 1 set map%d dreg 0 ]
+# ct mark set mark
+ip test-ip4 output
+ [ meta load mark => reg 1 ]
+ [ ct set mark with reg 1 ]
+
+# ct mark set mark map { 1 : 10, 2 : 20, 3 : 30 }
+map%d test-ip4 b
+map%d test-ip4 0
+ element 00000001 : 0000000a 0 [end] element 00000002 : 00000014 0 [end] element 00000003 : 0000001e 0 [end]
+ip test-ip4 output
+ [ meta load mark => reg 1 ]
+ [ lookup reg 1 set map%d dreg 1 ]
+ [ ct set mark with reg 1 ]