]> git.ipfire.org Git - thirdparty/iptables.git/commit
tests: iptables-test: Properly assert rule deletion errors
authorPhil Sutter <phil@nwl.cc>
Tue, 5 Nov 2024 15:07:01 +0000 (16:07 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 5 Nov 2024 22:58:03 +0000 (23:58 +0100)
commit6fbd211b48648a337d794ac1e1665d6ed3175a78
tree47334ac17fe84f2ff82a8539943a5b6a578a080e
parent36d87cd8092edc1f256a0505e260cc8d5ccacb33
tests: iptables-test: Properly assert rule deletion errors

Capture any non-zero return code, iptables not necessarily returns 1 on
error.

A known issue with trying to delete a rule by spec is the unsupported
--set-counters option. Strip it before deleting the rule.

Fixes: c8b7aaabbe1fc ("add iptables unit test infrastructure")
Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables-test.py