Skip to contentSkip to conversation

tests: shell: Adjust for recent changes in libnftnl

PATCH In review Phil Sutter 1 participant 2 messages Oct 1, 2024 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 tests: shell: Adjust for recent changes in libnftnl

libnftnl commit a96d5a338f24e ("rule: Don't append a newline when printing a rule") affected nft (and iptables-nft) debug output in that no extra newline is appended to rule bytecode output anymore. Tolerate this in the sole test case it breaks by ignoring changes to blank lines.

---
 iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0 +1 -1
index 34802cc26aad4..bfceed4976f18 100755
@@ -343,4 +343,4 @@ filter() {
 	awk '/^table /{exit} /^(  \[|$)/{print}'
 }
 
-diff -u -Z <(filter <<< "$EXPECT") <(nft --debug=netlink list ruleset | filter)
+diff -u -Z -B <(filter <<< "$EXPECT") <(nft --debug=netlink list ruleset | filter)
Signature · 1 line
2.43.0
author reviewer
#1 lore raw
Quoted 6 lines · Phil Sutter

libnftnl commit a96d5a338f24e ("rule: Don't append a newline when printing a rule") affected nft (and iptables-nft) debug output in that no extra newline is appended to rule bytecode output anymore. Tolerate this in the sole test case it breaks by ignoring changes to blank lines.

Also applied.