From: Phil Sutter Date: Thu, 25 Apr 2019 12:59:40 +0000 (+0200) Subject: tests: monitor: Adjust to changed events ordering X-Git-Tag: v0.9.1~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf6f35371aa73cdfae2fe1290ffacb4ec9f93741;p=thirdparty%2Fnftables.git tests: monitor: Adjust to changed events ordering When replacing a rule, kernel nowadays seems to report rule add event before rule delete one. Since both events belong to the same transaction, this is harmless per definition and merely needs adjustment in expected output. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- diff --git a/tests/monitor/testcases/simple.t b/tests/monitor/testcases/simple.t index 78d8f8b0..78fd6616 100644 --- a/tests/monitor/testcases/simple.t +++ b/tests/monitor/testcases/simple.t @@ -18,10 +18,10 @@ O add rule ip t c counter packets 0 bytes 0 accept J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"counter": {"packets": 0, "bytes": 0}}, {"accept": null}]}}} I replace rule ip t c handle 2 accept comment "foo bar" -O delete rule ip t c handle 2 O add rule ip t c accept comment "foo bar" -J {"delete": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"accept": null}]}}} +O delete rule ip t c handle 2 J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "comment": "foo bar", "expr": [{"accept": null}]}}} +J {"delete": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"accept": null}]}}} I add counter ip t cnt O add counter ip t cnt { packets 0 bytes 0 }