]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: monitor: Adjust to changed events ordering
authorPhil Sutter <phil@nwl.cc>
Thu, 25 Apr 2019 12:59:40 +0000 (14:59 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 30 Apr 2019 12:20:57 +0000 (14:20 +0200)
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 <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/monitor/testcases/simple.t

index 78d8f8b04bd36cb6b05774c3d77d6a97476b517f..78fd6616eb074c442f84db48963c3ae6340c1dba 100644 (file)
@@ -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 }