Blame SOURCES/0036-test-functions-Strip-nft-hook-and-policy-from-output.patch

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