Skip to content

Commit c5e24b8

Browse files
author
Florian Westphal
committed
nft-test: check start of rule with sets too
We special case rules with sets ({}) so set members are sorted properly. But we failed to check start of rule: input: meta mark { 1, 2 } bar expect: meta mark { 1, 2 } bar We made sure 'bar' is equal in both input and expected output, but we did not check start (before {). This causes a gazillion of warnings, will fix in followup commit. Signed-off-by: Florian Westphal <[email protected]>
1 parent a8e6c43 commit c5e24b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/py/nft-test.py

+4
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,10 @@ def set_check_element(rule1, rule2):
471471
ret = -1
472472
pos1 = rule1.find("{")
473473
pos2 = rule2.find("{")
474+
475+
if (cmp(rule1[:pos1], rule2[:pos2]) != 0):
476+
return ret;
477+
474478
end1 = rule1.find("}")
475479
end2 = rule2.find("}")
476480

0 commit comments

Comments
 (0)