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>
# 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" || {
# 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" || {