diff options
Diffstat (limited to 'iptables/tests/shell/testcases/ipt-restore/0009-table-name-comment_0')
-rwxr-xr-x | iptables/tests/shell/testcases/ipt-restore/0009-table-name-comment_0 | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/iptables/tests/shell/testcases/ipt-restore/0009-table-name-comment_0 b/iptables/tests/shell/testcases/ipt-restore/0009-table-name-comment_0 index 4e2202df..e9614075 100755 --- a/iptables/tests/shell/testcases/ipt-restore/0009-table-name-comment_0 +++ b/iptables/tests/shell/testcases/ipt-restore/0009-table-name-comment_0 @@ -4,10 +4,27 @@ # '-t <tablename>' so standard rule parsing routines may be used. This means # that it has to detect and reject rules which already contain a table option. -$XT_MULTI iptables-restore <<EOF +families="ip ip6" +[[ $(basename $XT_MULTI) == xtables-nft-multi ]] && families+=" eb" + +for fam in $families; do + $XT_MULTI ${fam}tables-restore <<EOF *filter -t nat -A FORWARD -j ACCEPT COMMIT EOF + [[ $? != 0 ]] || { + echo "${fam}tables-restore did not fail when it should have" + exit 1 + } -[[ $? != 0 ]] || exit 1 + $XT_MULTI ${fam}tables-restore <<EOF +*filter +-A FORWARD -j ACCEPT +COMMIT +EOF + [[ $? == 0 ]] || { + echo "${fam}tables-restore failed when it should not have" + exit 1 + } +done |