summaryrefslogtreecommitdiffstats
path: root/iptables/tests
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-07-19 14:58:11 +0200
committerPhil Sutter <phil@nwl.cc>2023-07-19 15:05:47 +0200
commit2746726e03d9017d4c940a247590f8d5c5d5a73e (patch)
tree381f93a16ad1a7be723a69b2bc5b0abf8cefc081 /iptables/tests
parent4e95200ded923f0eb5579c33b91176193c59dbe0 (diff)
tests: shell: Sanitize nft-only/0009-needless-bitwise_0
Some versions of awk (gawk-4.2.1-4.el8 in particular) also print the non-debug ruleset listing's empty lines, causing the diff to fail. Catch this by exiting upon seeing the first table heading. For the sake of comparing bytecode, the actual ruleset listing is not interesting, anyway. Fixes: 0f7ea0390b336 ("tests/shell: Fix nft-only/0009-needless-bitwise_0") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/tests')
-rwxr-xr-xiptables/tests/shell/testcases/nft-only/0009-needless-bitwise_02
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0 b/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0
index 41588a10..34802cc2 100755
--- a/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0
+++ b/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0
@@ -340,7 +340,7 @@ bridge filter OUTPUT 10 9
# - lines with bytecode (starting with ' [')
# - empty lines (so printed diff is not a complete mess)
filter() {
- awk '/^( \[|$)/{print}'
+ awk '/^table /{exit} /^( \[|$)/{print}'
}
diff -u -Z <(filter <<< "$EXPECT") <(nft --debug=netlink list ruleset | filter)