From 19fd6ae16cbc61a34f046accf3e6076d8b1128e6 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 28 Dec 2015 13:07:43 +0100 Subject: tests: py: check set value from selector and map Signed-off-by: Pablo Neira Ayuso --- tests/py/any/ct.t | 2 ++ tests/py/any/ct.t.payload | 13 +++++++++++++ 2 files changed, 15 insertions(+) (limited to 'tests/py/any') 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 ] -- cgit v1.2.3