netfilter-devel.vger.kernel.org archive mirror
 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] tests: shell: fix name based checks with CONFIG_NF_TABLES=y
Date: Tue,  7 Oct 2025 22:28:23 +0200	[thread overview]
Message-ID: <20251007202827.23737-1-fw@strlen.de> (raw)

Don't include a trailing space, its only there if nftables is a module:

  hook ingress device foo2 {
     0000000000 chain netdev t c [nf_tables]
  }

with CONFIG_NF_TABLES=y, this gets listed as:
'0000000000 chain netdev t c\n'.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 tests/shell/testcases/chains/netdev_chain_name_based_hook_0 | 2 +-
 tests/shell/testcases/flowtable/0016name_based_hook_0       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/shell/testcases/chains/netdev_chain_name_based_hook_0 b/tests/shell/testcases/chains/netdev_chain_name_based_hook_0
index 8a8a60178408..2e37b23a410a 100755
--- a/tests/shell/testcases/chains/netdev_chain_name_based_hook_0
+++ b/tests/shell/testcases/chains/netdev_chain_name_based_hook_0
@@ -2,7 +2,7 @@
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_ifname_based_hooks)
 
-cspec=' chain netdev t c '
+cspec=' chain netdev t c'
 $NFT add table netdev t
 $NFT add $cspec '{ type filter hook ingress priority 0; devices = { lo, foo* }; }'
 $NFT list hooks netdev device lo | grep -q "$cspec" || {
diff --git a/tests/shell/testcases/flowtable/0016name_based_hook_0 b/tests/shell/testcases/flowtable/0016name_based_hook_0
index 9a5559602715..19135b7e33cf 100755
--- a/tests/shell/testcases/flowtable/0016name_based_hook_0
+++ b/tests/shell/testcases/flowtable/0016name_based_hook_0
@@ -3,7 +3,7 @@
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_ifname_based_hooks)
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_list_hooks_flowtable_info)
 
-ftspec=' flowtable ip t ft '
+ftspec=' flowtable ip t ft'
 $NFT add table t
 $NFT add $ftspec '{ hook ingress priority 0; devices = { lo, foo* }; }'
 $NFT list hooks netdev device lo | grep -q "$ftspec" || {
-- 
2.49.1


                 reply	other threads:[~2025-10-07 20:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20251007202827.23737-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).