From e80f7fe56e4c64e05da426418bc2fae7ca221c49 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 20 Dec 2018 16:09:16 +0100 Subject: tests: Extend verbose output and return code tests Recent changes to chain flush and zero routines incorporate proper error propagation so trying to flush or zero a non-existent chain results in an error. This is consistent with iptables-legacy, extend tests to make sure it stays this way. Also extend verbose output test to make these recent changes didn't mess it up. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- iptables/tests/shell/testcases/iptables/0004-return-codes_0 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'iptables/tests/shell/testcases/iptables/0004-return-codes_0') diff --git a/iptables/tests/shell/testcases/iptables/0004-return-codes_0 b/iptables/tests/shell/testcases/iptables/0004-return-codes_0 index 5b6e1f6f..9d249399 100755 --- a/iptables/tests/shell/testcases/iptables/0004-return-codes_0 +++ b/iptables/tests/shell/testcases/iptables/0004-return-codes_0 @@ -23,6 +23,12 @@ cmd 1 iptables -N foo # iptables-nft allows this - bug or feature? #cmd 2 iptables -N "invalid name" +# test chain flushing/zeroing +cmd 0 iptables -F foo +cmd 0 iptables -Z foo +cmd 1 iptables -F bar +cmd 1 iptables -Z bar + # test chain rename cmd 0 iptables -E foo bar cmd 1 iptables -E foo bar -- cgit v1.2.3