All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft 1/4] tests: ct: prefer normal cmp
Date: Fri,  4 Jun 2021 13:40:40 +0200	[thread overview]
Message-ID: <20210604114043.4153-2-fw@strlen.de> (raw)
In-Reply-To: <20210604114043.4153-1-fw@strlen.de>

Followup patch will replace the { 1.2.3.4 } with single
cmp, so this will cause an error when the netlink dump gets
compared.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 tests/py/inet/ct.t         | 2 +-
 tests/py/inet/ct.t.json    | 8 ++------
 tests/py/inet/ct.t.payload | 7 ++-----
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/tests/py/inet/ct.t b/tests/py/inet/ct.t
index 3d0dffad2819..5312b328aa91 100644
--- a/tests/py/inet/ct.t
+++ b/tests/py/inet/ct.t
@@ -6,7 +6,7 @@
 meta nfproto ipv4 ct original saddr 1.2.3.4;ok;ct original ip saddr 1.2.3.4
 ct original ip6 saddr ::1;ok
 
-ct original ip daddr {1.2.3.4} accept;ok
+ct original ip daddr 1.2.3.4 accept;ok
 
 # missing protocol context
 ct original saddr ::1;fail
diff --git a/tests/py/inet/ct.t.json b/tests/py/inet/ct.t.json
index e7f928ca10e4..223ac9e7575f 100644
--- a/tests/py/inet/ct.t.json
+++ b/tests/py/inet/ct.t.json
@@ -39,7 +39,7 @@
     }
 ]
 
-# ct original ip daddr {1.2.3.4} accept
+# ct original ip daddr 1.2.3.4 accept
 [
     {
         "match": {
@@ -50,11 +50,7 @@
                 }
             },
             "op": "==",
-            "right": {
-                "set": [
-                    "1.2.3.4"
-                ]
-            }
+            "right": "1.2.3.4"
         }
     },
     {
diff --git a/tests/py/inet/ct.t.payload b/tests/py/inet/ct.t.payload
index 3b274f8c64c4..f7a2ef27274a 100644
--- a/tests/py/inet/ct.t.payload
+++ b/tests/py/inet/ct.t.payload
@@ -10,11 +10,8 @@ inet test-inet input
   [ ct load src_ip6 => reg 1 , dir original ]
   [ cmp eq reg 1 0x00000000 0x00000000 0x00000000 0x01000000 ]
 
-# ct original ip daddr {1.2.3.4} accept
-__set%d test-inet 3 size 1
-__set%d test-inet 0
-	element 04030201  : 0 [end]
+# ct original ip daddr 1.2.3.4 accept
 inet test-inet input
   [ ct load dst_ip => reg 1 , dir original ]
-  [ lookup reg 1 set __set%d ]
+  [ cmp eq reg 1 0x04030201 ]
   [ immediate reg 0 accept ]
-- 
2.26.3


  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 [PATCH nft 0/4] nftables: convert single-elem anon sets to compare operation Florian Westphal
2021-06-04 11:40 ` Florian Westphal [this message]
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-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.