From d858968a41b69f3af5a3d45baf40336618cccc9d Mon Sep 17 00:00:00 2001 From: Eric Garver Date: Fri, 21 Dec 2018 09:14:15 -0500 Subject: [PATCH 6/8] test/functions: Strip nft hook and policy from output Depending on the nft version the priority may print as "-290" or "raw + 10". Just strip the whole hook line - we really just want to see the rules. (cherry picked from commit 9b681605f96907f3fced59a4e6c884b68db0ffc8) --- src/tests/functions.at | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/functions.at b/src/tests/functions.at index 964bb8800637..3b367fdc0f58 100644 --- a/src/tests/functions.at +++ b/src/tests/functions.at @@ -255,7 +255,10 @@ m4_define([IP6TABLES_LIST_RULES], [ m4_define([NFT_LIST_RULES], [ dnl nftables commit 6dd848339444 change list output to show "meta mark" dnl instead of just "mark". - m4_define([NFT_LIST_RULES_NORMALIZE], [sed -e 's/meta mark/mark/g']) + m4_define([NFT_LIST_RULES_NORMALIZE], [dnl + sed -e 's/meta mark/mark/g'dnl + | sed -e '/type.*hook.*priority.*policy.*/d'dnl + ]) m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [ NS_CHECK([nft -nn list chain $1 firewalld $2 | TRIM_WHITESPACE | NFT_LIST_RULES_NORMALIZE], [$3], [m4_strip([$4])], [m4_strip([$5])], [$6], [$7]) ]) -- 2.18.0