From: Phil Sutter Date: Wed, 5 Oct 2022 17:51:08 +0000 (+0200) Subject: tests: iptables-test: Cover for obligatory -j CONTINUE in ebtables X-Git-Tag: v1.8.9~92 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8687835e1f9a8b4cf635239f398ef93673ebd76;p=thirdparty%2Fiptables.git tests: iptables-test: Cover for obligatory -j CONTINUE in ebtables Unlike iptables, ebtables includes the default rule target in output. Instead of adding it to every rule in ebtables tests, add special casing to the testscript checking if the expected rule output contains a target already and adding the default one if not. Signed-off-by: Phil Sutter --- diff --git a/iptables-test.py b/iptables-test.py index d9b3ee4e..dc031c2b 100755 --- a/iptables-test.py +++ b/iptables-test.py @@ -287,6 +287,9 @@ def run_test_file_fast(iptables, filename, netns): else: rule_save = chain + " " + item[1] + if iptables == EBTABLES and rule_save.find('-j') < 0: + rule_save += " -j CONTINUE" + res = item[2].rstrip() if res != "OK": rule = chain + " -t " + table + " " + item[0]