summaryrefslogtreecommitdiffstats
path: root/tests/monitor
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2024-10-29 21:12:19 +0100
committerFlorian Westphal <fw@strlen.de>2024-10-29 22:34:18 +0100
commitc416416b03d804663c5f7a738a3e1449eeb28157 (patch)
treef104436198e321293399f09940bc84f988be6d47 /tests/monitor
parent3c469ce4db19775a970064879a36daebde5ae668 (diff)
tests: monitor: fix up test case breakage
Monitor test fails: echo: running tests from file set-simple.t echo output differs! -add element ip t portrange { 1024-65535 } add element ip t portrange { 100-200 } +add element ip t portrange { 1024-65535 } +# new generation 510 by process 129009 (nft) I also noticed -j mode did not work correctly, add missing json annotations in set-concat-interval.t while at it. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/monitor')
-rw-r--r--tests/monitor/testcases/set-concat-interval.t3
-rw-r--r--tests/monitor/testcases/set-simple.t5
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/monitor/testcases/set-concat-interval.t b/tests/monitor/testcases/set-concat-interval.t
index 763dc319..75f38280 100644
--- a/tests/monitor/testcases/set-concat-interval.t
+++ b/tests/monitor/testcases/set-concat-interval.t
@@ -10,3 +10,6 @@ I add map ip t s { typeof udp length . @ih,32,32 : verdict; flags interval; elem
O add map ip t s { typeof udp length . @ih,32,32 : verdict; flags interval; }
O add element ip t s { 20-80 . 0x14 : accept }
O add element ip t s { 1-10 . 0xa : drop }
+J {"add": {"map": {"family": "ip", "name": "s", "table": "t", "type": ["integer", "integer"], "handle": 0, "map": "verdict", "flags": ["interval"]}}}
+J {"add": {"element": {"family": "ip", "table": "t", "name": "s", "elem": {"set": [[{"concat": [{"range": [20, 80]}, 20]}, {"accept": null}]]}}}}
+J {"add": {"element": {"family": "ip", "table": "t", "name": "s", "elem": {"set": [[{"concat": [{"range": [1, 10]}, 10]}, {"drop": null}]]}}}}
diff --git a/tests/monitor/testcases/set-simple.t b/tests/monitor/testcases/set-simple.t
index 8ca4f324..6853a0eb 100644
--- a/tests/monitor/testcases/set-simple.t
+++ b/tests/monitor/testcases/set-simple.t
@@ -37,9 +37,10 @@ J {"add": {"element": {"family": "ip", "table": "t", "name": "portrange", "elem"
# make sure half open before other element works
I add element ip t portrange { 1024-65535 }
I add element ip t portrange { 100-200 }
-O -
-J {"add": {"element": {"family": "ip", "table": "t", "name": "portrange", "elem": {"set": [{"range": [1024, 65535]}]}}}}
+O add element ip t portrange { 100-200 }
+O add element ip t portrange { 1024-65535 }
J {"add": {"element": {"family": "ip", "table": "t", "name": "portrange", "elem": {"set": [{"range": [100, 200]}]}}}}
+J {"add": {"element": {"family": "ip", "table": "t", "name": "portrange", "elem": {"set": [{"range": [1024, 65535]}]}}}}
# make sure deletion of elements works
I delete element ip t portrange { 0-10 }