netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests: regression: Delete all reference to wlan0 in test files.
@ 2014-10-08 12:52 Ana Rey
  2014-10-08 12:52 ` [PATCH] tests: regression: nft-test.py: Delete an unnecessary whitespace in an output messages Ana Rey
  2014-10-09 16:55 ` [PATCH] tests: regression: Delete all reference to wlan0 in test files Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Ana Rey @ 2014-10-08 12:52 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Ana Rey

There are false errors if it uses the automated regression testing
without a wlan0 device in the system.

Deletes references to 'wlan0' in test files and replaces 'wlan0' by 'lo'
or 'eth0' in the test files if it is possible.

Signed-off-by: Ana Rey <anarey@gmail.com>
---
 tests/regression/any/meta.t |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/regression/any/meta.t b/tests/regression/any/meta.t
index 2c2609d..5bc3872 100644
--- a/tests/regression/any/meta.t
+++ b/tests/regression/any/meta.t
@@ -57,15 +57,15 @@ meta mark or 0x03 != 0x01;ok;mark | 0x00000003 != 0x00000001
 meta mark xor 0x03 == 0x01;ok;mark 0x00000002
 meta mark xor 0x03 != 0x01;ok;mark != 0x00000002
 
-meta iif wlan0 accept;ok;iif wlan0 accept
 meta iif eth0 accept;ok;iif eth0 accept
-meta iif != wlan0 accept;ok;iif != wlan0 accept
+meta iif eth0 accept;ok;iif eth0 accept
+meta iif != eth0 accept;ok;iif != eth0 accept
 meta iif != eth0 accept;ok;iif != eth0 accept
 
 meta iifname "eth0";ok;iifname "eth0"
 meta iifname != "eth0";ok;iifname != "eth0"
-meta iifname {"eth0", "wlan0"};ok
-- meta iifname != {"eth0", "wlan0"};ok
+meta iifname {"eth0", "lo"};ok
+- meta iifname != {"eth0", "lo"};ok
 
 meta iiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
 - meta iiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
@@ -76,13 +76,13 @@ meta iiftype ppp;ok;iiftype ppp
 
 meta oif lo accept;ok;oif lo accept
 meta oif != lo accept;ok;oif != lo accept
-meta oif {wlan0, eth0, lo} accept;ok
-- meta oif != {wlan0, eth0, lo} accept;ok
+meta oif {eth0, lo} accept;ok
+- meta oif != {eth0, lo} accept;ok
 
 meta oifname "eth0";ok;oifname "eth0"
 meta oifname != "eth0";ok;oifname != "eth0"
-meta oifname { "eth0", "wlan0"};ok
-- meta iifname != {"eth0", "wlan0"};ok
+meta oifname { "eth0", "lo"};ok
+- meta iifname != {"eth0", "lo"};ok
 
 meta oiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
 - meta oiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] tests: regression: nft-test.py: Delete an unnecessary whitespace in an output messages.
  2014-10-08 12:52 [PATCH] tests: regression: Delete all reference to wlan0 in test files Ana Rey
@ 2014-10-08 12:52 ` Ana Rey
  2014-10-09 16:56   ` Pablo Neira Ayuso
  2014-10-09 16:55 ` [PATCH] tests: regression: Delete all reference to wlan0 in test files Pablo Neira Ayuso
  1 sibling, 1 reply; 4+ messages in thread
From: Ana Rey @ 2014-10-08 12:52 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Ana Rey

If the script is run with -e options,output messages show an unnecessary
white-space. This path fixes this mistake.

sudo ./nft-test.py -e
[...] "line 34: nft add rule -nnn arp test-arp  input arp plen != {33-55} " [...]
                                             ^^^^

Signed-off-by: Ana Rey <anarey@gmail.com>
---
 tests/regression/nft-test.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/regression/nft-test.py b/tests/regression/nft-test.py
index d4929f0..00c33f3 100755
--- a/tests/regression/nft-test.py
+++ b/tests/regression/nft-test.py
@@ -694,7 +694,7 @@ def run_test_file(filename, force_all_family_option, specific_file):
             if line[1:].find("*") != -1:
                 continue
             if need_fix_option:
-                rule[0] = rule[0].rstrip()[1:]
+                rule[0] = rule[0].rstrip()[1:].strip()
                 result = rule_add(rule, table_list, chain_list, filename,
                                   lineno, force_all_family_option)
                 tests += 1
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests: regression: Delete all reference to wlan0 in test files.
  2014-10-08 12:52 [PATCH] tests: regression: Delete all reference to wlan0 in test files Ana Rey
  2014-10-08 12:52 ` [PATCH] tests: regression: nft-test.py: Delete an unnecessary whitespace in an output messages Ana Rey
@ 2014-10-09 16:55 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2014-10-09 16:55 UTC (permalink / raw)
  To: Ana Rey; +Cc: netfilter-devel

On Wed, Oct 08, 2014 at 02:52:09PM +0200, Ana Rey wrote:
> There are false errors if it uses the automated regression testing
> without a wlan0 device in the system.
> 
> Deletes references to 'wlan0' in test files and replaces 'wlan0' by 'lo'
> or 'eth0' in the test files if it is possible.

OK, so we assume that tests run in a box with at least eth0. Fair
enough, applied thanks Ana.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests: regression: nft-test.py: Delete an unnecessary whitespace in an output messages.
  2014-10-08 12:52 ` [PATCH] tests: regression: nft-test.py: Delete an unnecessary whitespace in an output messages Ana Rey
@ 2014-10-09 16:56   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2014-10-09 16:56 UTC (permalink / raw)
  To: Ana Rey; +Cc: netfilter-devel

On Wed, Oct 08, 2014 at 02:52:10PM +0200, Ana Rey wrote:
> If the script is run with -e options,output messages show an unnecessary
> white-space. This path fixes this mistake.
> 
> sudo ./nft-test.py -e
> [...] "line 34: nft add rule -nnn arp test-arp  input arp plen != {33-55} " [...]

Applied, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-09 16:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08 12:52 [PATCH] tests: regression: Delete all reference to wlan0 in test files Ana Rey
2014-10-08 12:52 ` [PATCH] tests: regression: nft-test.py: Delete an unnecessary whitespace in an output messages Ana Rey
2014-10-09 16:56   ` Pablo Neira Ayuso
2014-10-09 16:55 ` [PATCH] tests: regression: Delete all reference to wlan0 in test files Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).