Blame SOURCES/firewalld-0.7-0006-test-functions-Strip-nft-hook-and-policy-from-output.patch

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