The original rules order set elements differently. Stick to that and add entries to inet/osf.t.json.output to cover for nftables reordering entries. Fixes: 92029c1282958 ("src: osf: add json support") Signed-off-by: Phil Sutter --- tests/py/inet/osf.t.json | 12 ++++---- tests/py/inet/osf.t.json.output | 53 +++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 tests/py/inet/osf.t.json.output diff --git a/tests/py/inet/osf.t.json b/tests/py/inet/osf.t.json index cedb7f67bd52f..b1bf747265f81 100644 --- a/tests/py/inet/osf.t.json +++ b/tests/py/inet/osf.t.json @@ -73,8 +73,8 @@ "op": "==", "right": { "set": [ - "MacOs", - "Windows" + "Windows", + "MacOs" ] } } @@ -114,13 +114,13 @@ "map": { "data": { "set": [ - [ - "MacOs", - 2 - ], [ "Windows", 1 + ], + [ + "MacOs", + 2 ] ] }, diff --git a/tests/py/inet/osf.t.json.output b/tests/py/inet/osf.t.json.output new file mode 100644 index 0000000000000..922e395f202c7 --- /dev/null +++ b/tests/py/inet/osf.t.json.output @@ -0,0 +1,53 @@ +# osf name { "Windows", "MacOs" } +[ + { + "match": { + "left": { + "osf": { + "key": "name" + } + }, + "op": "==", + "right": { + "set": [ + "MacOs", + "Windows" + ] + } + } + } +] + +# ct mark set osf name map { "Windows" : 0x00000001, "MacOs" : 0x00000002 } +[ + { + "mangle": { + "key": { + "ct": { + "key": "mark" + } + }, + "value": { + "map": { + "data": { + "set": [ + [ + "MacOs", + 2 + ], + [ + "Windows", + 1 + ] + ] + }, + "key": { + "osf": { + "key": "name" + } + } + } + } + } + } +] -- 2.51.0