This should say "should have failed" only if the set add operation
was supposed to fail, not when its supposed to work.
Signed-off-by: Florian Westphal <fw@strlen.de>
ret = execute_cmd(cmd, filename, lineno)
if (state == "fail" and ret == 0) or (state == "ok" and ret != 0):
- test_state = "This rule should have failed."
+ if state == "fail":
+ test_state = "This rule should have failed."
+ else:
+ test_state = "This rule should not have failed."
+
reason = cmd + ": " + test_state
print_error(reason, filename, lineno)
return -1