From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft 0/4] nftables: convert single-elem anon sets to compare operation
Date: Fri, 4 Jun 2021 13:40:39 +0200 [thread overview]
Message-ID: <20210604114043.4153-1-fw@strlen.de> (raw)
Auto-translate 'match { bar }' to 'match bar'. Doing this causes tons
of failures in the python test suite, so first remove all test cases
that use this pattern.
This is fine because all of these tests are redundant.
A new test is added to cover the auto-removal.
This also includes cases where the set must not be auto-converted.
Florian Westphal (4):
tests: ct: prefer normal cmp
tests: remove redundant test cases
evaluate: remove anon sets with exactly one element
tests: add test case for removal of anon sets with only a single element
src/evaluate.c | 21 +-
tests/py/any/meta.t | 4 -
tests/py/any/meta.t.json | 40 --
tests/py/any/meta.t.payload | 38 --
tests/py/arp/arp.t | 6 -
tests/py/arp/arp.t.json | 120 ------
tests/py/arp/arp.t.payload | 48 ---
tests/py/arp/arp.t.payload.netdev | 60 ---
tests/py/inet/ah.t | 8 -
tests/py/inet/ah.t.json | 160 -------
tests/py/inet/ah.t.payload | 80 ----
tests/py/inet/comp.t | 4 -
tests/py/inet/comp.t.json | 80 ----
tests/py/inet/comp.t.payload | 40 --
tests/py/inet/ct.t | 2 +-
tests/py/inet/ct.t.json | 8 +-
tests/py/inet/ct.t.payload | 7 +-
tests/py/inet/dccp.t | 5 -
tests/py/inet/dccp.t.json | 100 -----
tests/py/inet/dccp.t.payload | 50 ---
tests/py/inet/esp.t | 5 -
tests/py/inet/esp.t.json | 80 ----
tests/py/inet/esp.t.payload | 40 --
tests/py/inet/sctp.t | 8 -
tests/py/inet/sctp.t.json | 160 -------
tests/py/inet/sctp.t.payload | 80 ----
tests/py/inet/tcp.t | 16 -
tests/py/inet/tcp.t.json | 280 ------------
tests/py/inet/tcp.t.payload | 140 ------
tests/py/inet/udp.t | 8 -
tests/py/inet/udp.t.json | 166 -------
tests/py/inet/udp.t.payload | 82 ----
tests/py/inet/udplite.t | 8 -
tests/py/inet/udplite.t.json | 126 ------
tests/py/inet/udplite.t.payload | 62 ---
tests/py/ip/icmp.t | 14 -
tests/py/ip/icmp.t.json | 407 ------------------
tests/py/ip/icmp.t.payload.ip | 174 --------
tests/py/ip/igmp.t | 2 -
tests/py/ip/igmp.t.json | 50 ---
tests/py/ip/igmp.t.payload | 20 -
tests/py/ip/ip.t | 12 -
tests/py/ip/ip.t.json | 240 -----------
tests/py/ip/ip.t.payload | 96 -----
tests/py/ip/ip.t.payload.bridge | 120 ------
tests/py/ip/ip.t.payload.inet | 120 ------
tests/py/ip/ip.t.payload.netdev | 120 ------
tests/py/ip6/dst.t | 5 -
tests/py/ip6/dst.t.json | 81 ----
tests/py/ip6/dst.t.payload.inet | 41 --
tests/py/ip6/dst.t.payload.ip6 | 34 --
tests/py/ip6/frag.t | 6 -
tests/py/ip6/frag.t.payload.inet | 62 ---
tests/py/ip6/frag.t.payload.ip6 | 50 ---
tests/py/ip6/hbh.t | 4 -
tests/py/ip6/hbh.t.json | 80 ----
tests/py/ip6/hbh.t.payload.inet | 40 --
tests/py/ip6/hbh.t.payload.ip6 | 32 --
tests/py/ip6/icmpv6.t | 12 -
tests/py/ip6/icmpv6.t.json | 240 -----------
tests/py/ip6/icmpv6.t.payload.ip6 | 148 -------
tests/py/ip6/ip6.t | 8 -
tests/py/ip6/ip6.t.json | 122 ------
tests/py/ip6/ip6.t.payload.inet | 82 ----
tests/py/ip6/ip6.t.payload.ip6 | 66 ---
tests/py/ip6/mh.t | 8 -
tests/py/ip6/mh.t.json | 162 -------
tests/py/ip6/mh.t.payload.inet | 81 ----
tests/py/ip6/mh.t.payload.ip6 | 65 ---
tests/py/ip6/rt.t | 8 -
tests/py/ip6/rt.t.json | 160 -------
tests/py/ip6/rt.t.payload.inet | 80 ----
tests/py/ip6/rt.t.payload.ip6 | 64 ---
.../optimizations/dumps/single_anon_set.nft | 15 +
.../dumps/single_anon_set.nft.input | 35 ++
.../testcases/optimizations/single_anon_set | 13 +
.../shell/testcases/sets/dumps/0053echo_0.nft | 2 +-
77 files changed, 88 insertions(+), 5235 deletions(-)
create mode 100644 tests/shell/testcases/optimizations/dumps/single_anon_set.nft
create mode 100644 tests/shell/testcases/optimizations/dumps/single_anon_set.nft.input
create mode 100755 tests/shell/testcases/optimizations/single_anon_set
--
2.26.3
next reply other threads:[~2021-06-04 11:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 11:40 Florian Westphal [this message]
2021-06-04 11:40 ` [PATCH nft 1/4] tests: ct: prefer normal cmp Florian Westphal
2021-06-04 11:40 ` [PATCH nft 2/4] tests: remove redundant test cases Florian Westphal
2021-06-04 11:40 ` [PATCH nft 3/4] evaluate: remove anon sets with exactly one element Florian Westphal
2021-06-04 11:40 ` [PATCH nft 4/4] tests: add test case for removal of anon sets with only a single element Florian Westphal
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=20210604114043.4153-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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).