From 2674c39bfdb77e5d61a44ebf6e5c356ac767cd24 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Mon, 3 Feb 2020 11:20:22 +0000 Subject: tests: py: add missing JSON output. The JSON output was missing for some existing tests. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- tests/py/any/ct.t.json | 23 +++++++++++++++++++++++ tests/py/ip/meta.t.json | 35 +++++++++++++++++++++++++++++++++++ tests/py/ip6/meta.t.json | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/tests/py/any/ct.t.json b/tests/py/any/ct.t.json index 7c16f9df..8d56db2a 100644 --- a/tests/py/any/ct.t.json +++ b/tests/py/any/ct.t.json @@ -499,6 +499,29 @@ } ] +# ct mark set ct mark or 0x00000001 +[ + { + "mangle": { + "key": { + "ct": { + "key": "mark" + } + }, + "value": { + "|": [ + { + "ct": { + "key": "mark" + } + }, + 1 + ] + } + } + } +] + # ct mark 0x00000032 [ { diff --git a/tests/py/ip/meta.t.json b/tests/py/ip/meta.t.json index f873aa88..f83864f6 100644 --- a/tests/py/ip/meta.t.json +++ b/tests/py/ip/meta.t.json @@ -105,3 +105,38 @@ } ] +# meta sdif "lo" accept +[ + { + "match": { + "left": { + "meta": { + "key": "sdif" + } + }, + "op": "==", + "right": "lo" + } + }, + { + "accept": null + } +] + +# meta sdifname != "vrf1" accept +[ + { + "match": { + "left": { + "meta": { + "key": "sdifname" + } + }, + "op": "!=", + "right": "vrf1" + } + }, + { + "accept": null + } +] diff --git a/tests/py/ip6/meta.t.json b/tests/py/ip6/meta.t.json index 29cf9fd2..e72350f3 100644 --- a/tests/py/ip6/meta.t.json +++ b/tests/py/ip6/meta.t.json @@ -105,3 +105,38 @@ } ] +# meta sdif "lo" accept +[ + { + "match": { + "left": { + "meta": { + "key": "sdif" + } + }, + "op": "==", + "right": "lo" + } + }, + { + "accept": null + } +] + +# meta sdifname != "vrf1" accept +[ + { + "match": { + "left": { + "meta": { + "key": "sdifname" + } + }, + "op": "!=", + "right": "vrf1" + } + }, + { + "accept": null + } +] -- cgit v1.2.3