Skip to contentSkip to conversation

tests: shell: fix name based checks with CONFIG_NF_TABLES=y

PATCH New Florian Westphal 1 participant 1 message Oct 7, 2025 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 tests: shell: fix name based checks with CONFIG_NF_TABLES=y

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'.

---
 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(-)
tests/shell/testcases/chains/netdev_chain_name_based_hook_0 +1 -1
index 8a8a60178408..2e37b23a410a 100755
@@ -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" || {
tests/shell/testcases/flowtable/0016name_based_hook_0 +1 -1
index 9a5559602715..19135b7e33cf 100755
@@ -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" || {
Signature · 1 line
2.49.1