tests: py: fixes for failing JSON tests
cover tests: py: fixes for failing JSON tests
Fixes for a few Python tests with missing or incorrect JSON output.
Jeremy Sowden (3):
tests: py: add missing JSON output for ct test.
tests: py: correct order of set elements in test JSON output.
tests: py: add missing test JSON output for TCP flag tests.
tests/py/any/ct.t.json | 15 ++++++ tests/py/any/ct.t.json.output | 20 +++---- tests/py/inet/tcp.t.json | 93 +++++++++++++++++++++++++++++++++ tests/py/inet/tcp.t.json.output | 93 +++++++++++++++++++++++++++++++++ 4 files changed, 211 insertions(+), 10 deletions(-)
Signature · 1 line
2.28.0
PATCH 1/3 tests: py: add missing JSON output for ct test.
Fixes dcec7d57559a ("ct: Add support for the 'id' key")
Signed-off-by Jeremy Sowden <[email protected]>
--- tests/py/any/ct.t.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
tests/py/any/ct.t.json +15 -0
@@ -1449,6 +1449,21 @@ } ] +# ct id 12345 +[ + { + "match": { + "left": { + "ct": { + "key": "id" + } + }, + "op": "==", + "right": 12345 + } + } +] + # ct zone set mark map { 1 : 1, 2 : 2 } [ {
Signature · 1 line
2.28.0
PATCH 2/3 tests: py: correct order of set elements in test JSON output.
In reply to Jeremy SowdenFixes 741a06ac15d2 ("mergesort: find base value expression type via recursion")
Signed-off-by Jeremy Sowden <[email protected]>
--- tests/py/any/ct.t.json.output | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
tests/py/any/ct.t.json.output +10 -10
@@ -527,14 +527,14 @@ "set": [ { "concat": [ - "established", - 309876276 + "new", + 305419896 ] }, { "concat": [ - "new", - 305419896 + "established", + 309876276 ] }, {
@@ -611,23 +611,23 @@ [ { "concat": [ - "established", - 2271560481 + "new", + 305419896 ] }, { - "accept": null + "drop": null } ], [ { "concat": [ - "new", - 305419896 + "established", + 2271560481 ] }, { - "drop": null + "accept": null } ] ]
Signature · 1 line
2.28.0
PATCH 3/3 tests: py: add missing test JSON output for TCP flag tests.
In reply to Jeremy SowdenFixes 3926a3369bb5 ("mergesort: unbreak listing with binops")
Signed-off-by Jeremy Sowden <[email protected]>
--- tests/py/inet/tcp.t.json | 93 +++++++++++++++++++++++++++++++++ tests/py/inet/tcp.t.json.output | 93 +++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+)
tests/py/inet/tcp.t.json +93 -0
@@ -1637,3 +1637,96 @@ } ] +# tcp flags { syn, syn | ack } +[ + { + "match": { + "left": { + "payload": { + "field": "flags", + "protocol": "tcp" + } + }, + "op": "==", + "right": { + "set": [ + { + "|": [ + "syn", + "ack" + ] + }, + "syn" + ] + } + } + } +] + +# tcp flags & (fin | syn | rst | psh | ack | urg) == { fin, ack, psh | ack, fin | psh | ack } +[ + { + "match": { + "left": { + "&": [ + { + "payload": { + "field": "flags", + "protocol": "tcp" + } + }, + { + "|": [ + { + "|": [ + { + "|": [ + { + "|": [ + { + "|": [ + "fin", + "syn" + ] + }, + "rst" + ] + }, + "psh" + ] + }, + "ack" + ] + }, + "urg" + ] + } + ] + }, + "op": "==", + "right": { + "set": [ + { + "|": [ + { + "|": [ + "fin", + "psh" + ] + }, + "ack" + ] + }, + "fin", + { + "|": [ + "psh", + "ack" + ] + }, + "ack" + ] + } + } + } +]
tests/py/inet/tcp.t.json.output +93 -0
96 lines not on this page · raw message
Signature · 1 line
2.28.0
Pablo Neira Ayuso
maintainerQuoted 1 line · Jeremy Sowden
Fixes for a few Python tests with missing or incorrect JSON output.
Series applied, thanks.