]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: avoid more warnings
authorFlorian Westphal <fw@strlen.de>
Wed, 15 Jul 2015 13:24:18 +0000 (15:24 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 15 Jul 2015 13:28:17 +0000 (15:28 +0200)
... 2001:838:35f:1::-2001:838:35f:2:: :80-100' mismatches
... 2001:838:35f:1::-2001:838:35f:2:::80-100'

nft accepts both, so just alter test to not complain.

Also, fix test script to display the expected output rather than
the input.  Otherwise, a rule like
some_input;ok;expected_output

may display nonsensical message like
warning: some_input mismatches some_input

This also fixes the icmpv6 test accordingly, nft displays ranges
correctly.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/regression/inet/tcp.t
tests/regression/ip6/dnat.t
tests/regression/ip6/icmpv6.t
tests/regression/ip6/snat.t
tests/regression/nft-test.py

index 5eb3882c396b459cab40019594caf7769fc7bd33..95267da59ee931c3f46ce3e925ccfc10dd5f2b7a 100644 (file)
@@ -33,7 +33,7 @@ tcp sport 8080 drop;ok
 tcp sport 1024 tcp dport 22;ok
 tcp sport 1024 tcp dport 22 tcp sequence 0;ok
 
-tcp sequence 0 tcp sport 1024 tcp dport 22;ok
+tcp sequence 0 tcp sport 1024 tcp dport 22;ok;tcp sport 1024 tcp dport 22 tcp sequence 0
 tcp sequence 0 tcp sport { 1024, 1022} tcp dport 22;ok
 
 tcp sequence 22;ok
index a2555c72de9f8b8d34b805940af0ed4ba49975eb..8341225853236b42fcad1cb07f8f08d24616eeaf 100644 (file)
@@ -1,5 +1,5 @@
 *ip6;test-ip6
 :prerouting;type nat hook prerouting priority 0
 
-tcp dport 80-90 dnat 2001:838:35f:1::-2001:838:35f:2:: :80-100;ok
-tcp dport 80-90 dnat 2001:838:35f:1::-2001:838:35f:2:: :100;ok
+tcp dport 80-90 dnat 2001:838:35f:1::-2001:838:35f:2:::80-100;ok
+tcp dport 80-90 dnat 2001:838:35f:1::-2001:838:35f:2:: :100;ok;tcp dport 80-90 dnat 2001:838:35f:1::-2001:838:35f:2:::100
index 7a86ee9ea1e1c89cefc5b7da8343d5b5a6ef391d..c86c8251eeedb90accb0408eedbcfcdec9ff8316 100644 (file)
@@ -1,4 +1,4 @@
-*ip6;test-ip4
+*ip6;test-ip6
 # BUG: There is a bug with icmpv6 and inet tables
 - *inet;test-inet
 :input;type filter hook input priority 0
@@ -23,7 +23,7 @@ icmpv6 type {mld-listener-query, time-exceeded, nd-router-advert} accept;ok
 - icmpv6 type != {mld-listener-query, time-exceeded, nd-router-advert} accept;ok
 
 icmpv6 code 4;ok
-icmpv6 code 3-66;ok;icmpv6 code >= 3 icmpv6 code <= 66
+icmpv6 code 3-66;ok
 icmpv6 code {5, 6, 7} accept;ok
 - icmpv6 code != {3, 66, 34};ok
 icmpv6 code { 3-66};ok
@@ -31,7 +31,7 @@ icmpv6 code { 3-66};ok
 
 icmpv6 checksum 2222 log;ok
 icmpv6 checksum != 2222 log;ok
-icmpv6 checksum 222-226;ok;icmpv6 checksum >= 222 icmpv6 checksum <= 226
+icmpv6 checksum 222-226;ok
 icmpv6 checksum != 2222 log;ok
 icmpv6 checksum { 222, 226};ok
 - icmpv6 checksum != { 222, 226};ok
@@ -81,8 +81,8 @@ icmpv6 sequence {3, 4, 5, 6, 7} accept;ok
 
 icmpv6 sequence {2, 4};ok
 - icmpv6 sequence != {2, 4};ok
-icmpv6 sequence 2-4;ok;icmpv6 sequence >= 2 icmpv6 sequence <= 4
-icmpv6 sequence != 2-4;ok;icmpv6 sequence < 2 icmpv6 sequence > 4
+icmpv6 sequence 2-4;ok
+icmpv6 sequence != 2-4;ok
 icmpv6 sequence { 2-4};ok
 - icmpv6 sequence != {2-4};ok
 
index 73452752a3993f0f8c02a2e9c040bcd1c99e982c..44ca9e4fcfc14f2fcf2a55541fcacee0159a545b 100644 (file)
@@ -2,5 +2,5 @@
 - *inet;test-inet
 :postrouting;type nat hook postrouting priority 0
 
-tcp dport 80-90 snat 2001:838:35f:1::-2001:838:35f:2:: :80-100;ok
-tcp dport 80-90 snat 2001:838:35f:1::-2001:838:35f:2:: :100;ok
+tcp dport 80-90 snat 2001:838:35f:1::-2001:838:35f:2:: :80-100;ok;tcp dport 80-90 snat 2001:838:35f:1::-2001:838:35f:2:::80-100
+tcp dport 80-90 snat 2001:838:35f:1::-2001:838:35f:2:::100;ok
index 7823f44cc5aeac90a2cbf7aa77290f3e2a8a006a..153f5e8b5dde68469c6a570a51202140c6433e2e 100755 (executable)
@@ -509,7 +509,7 @@ def rule_add(rule, table_list, chain_list, filename, lineno,
 
                             warning += 1
                             print_differences_warning(filename, lineno,
-                                                      rule[0], rule_output,
+                                                      teoric_exit.rstrip(), rule_output,
                                                       cmd)
 
                             if not force_all_family_option: