summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-03-31 11:08:33 +0200
committerFlorian Westphal <fw@strlen.de>2018-04-01 00:05:53 +0200
commitc5e24b8d94ead21e8c81315794f779850fd6b135 (patch)
tree51280da8227ccca27147c7f47cc18090cbc172db /tests
parenta8e6c43272eacbc819b6ef57ebf6a2297cfada72 (diff)
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 <fw@strlen.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/py/nft-test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index 87e3d51e..7998914a 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -471,6 +471,10 @@ def set_check_element(rule1, rule2):
ret = -1
pos1 = rule1.find("{")
pos2 = rule2.find("{")
+
+ if (cmp(rule1[:pos1], rule2[:pos2]) != 0):
+ return ret;
+
end1 = rule1.find("}")
end2 = rule2.find("}")