From: Harsha Sharma <harshasharmaiitr@gmail.com>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org,
Harsha Sharma <harshasharmaiitr@gmail.com>
Subject: [PATCH] tests/py: add test for empty string match
Date: Tue, 28 Nov 2017 16:55:49 +0530 [thread overview]
Message-ID: <20171128112549.24734-1-harshasharmaiitr@gmail.com> (raw)
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>
---
tests/py/any/ct.t | 1 +
tests/py/any/meta.t | 2 ++
2 files changed, 3 insertions(+)
diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t
index fb3ae09..9c88140 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 dd335ab..a38c501 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
--
2.11.0
next reply other threads:[~2017-11-28 11:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 11:25 Harsha Sharma [this message]
2017-11-28 15:49 ` [PATCH] tests/py: add test for empty string match Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171128112549.24734-1-harshasharmaiitr@gmail.com \
--to=harshasharmaiitr@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).