summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarsha Sharma <harshasharmaiitr@gmail.com>2017-11-28 16:55:49 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2017-11-28 16:49:28 +0100
commit8d8fec8b9af72b49b330e620e3868f3ddade7b65 (patch)
tree80880a0e65fbdf2f551ad41c8cacfd434e92fc14
parent9f39f8e6729457b88fd42156984a78c98fb84651 (diff)
tests/py: add test for empty string match
This patch add tests for empty string match which fails with error "Empty string is not allowed". Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--tests/py/any/ct.t1
-rw-r--r--tests/py/any/meta.t2
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t
index fb3ae098..9c88140e 100644
--- a/tests/py/any/ct.t
+++ b/tests/py/any/ct.t
@@ -75,6 +75,7 @@ ct expiration != {33-55};ok; ct expiration != { 33s-55s}
ct helper "ftp";ok
ct helper "12345678901234567";fail
+ct helper '""';fail
ct state . ct mark { new . 0x12345678};ok
ct state . ct mark { new . 0x12345678, new . 0x34127856, established . 0x12785634};ok
diff --git a/tests/py/any/meta.t b/tests/py/any/meta.t
index dd335ab8..a38c5011 100644
--- a/tests/py/any/meta.t
+++ b/tests/py/any/meta.t
@@ -71,6 +71,7 @@ meta iifname {"dummy0", "lo"};ok
meta iifname != {"dummy0", "lo"};ok
meta iifname "dummy*";ok;iifname "dummy*"
meta iifname "dummy\*";ok;iifname "dummy\*"
+meta iifname '""';fail
meta iiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
meta iiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
@@ -89,6 +90,7 @@ meta oifname != "dummy0";ok;oifname != "dummy0"
meta oifname { "dummy0", "lo"};ok
meta oifname "dummy*";ok;oifname "dummy*"
meta oifname "dummy\*";ok;oifname "dummy\*"
+meta oifname '""';fail
meta oiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
meta oiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok