Blame SOURCES/0108-fix-test-features-helpers_custom-skip-test-if-automa.patch

136e2c
From 98b9536093dcc67f536825b706ede56501767742 Mon Sep 17 00:00:00 2001
136e2c
From: Eric Garver <eric@garver.life>
136e2c
Date: Wed, 25 Sep 2019 14:28:59 -0400
136e2c
Subject: [PATCH 108/109] fix: test: features/helpers_custom: skip test if
136e2c
 automatic helpers is 1
136e2c
136e2c
(cherry picked from commit e981578698b7746d5e0253c5ab9193b2c73b9e67)
136e2c
(cherry picked from commit b56deaabd9ee0747542e7f0d9e518b80fdbde65a)
136e2c
---
136e2c
 src/tests/features/helpers_custom.at | 8 ++++++++
136e2c
 1 file changed, 8 insertions(+)
136e2c
136e2c
diff --git a/src/tests/features/helpers_custom.at b/src/tests/features/helpers_custom.at
136e2c
index 2c17b004bf91..fd59d06ba4d1 100644
136e2c
--- a/src/tests/features/helpers_custom.at
136e2c
+++ b/src/tests/features/helpers_custom.at
136e2c
@@ -11,6 +11,14 @@ FWD_RELOAD
136e2c
 
136e2c
 FWD_CHECK([-q --add-service=ftptest])
136e2c
 
136e2c
+dnl The expected rule output is different if automatic helpers is in use. It's
136e2c
+dnl tricky for autotest to know what to do because the testsuite is generated
136e2c
+dnl outside of the testsuite netns and the value of nf_conntrack_helper may be
136e2c
+dnl different inside the netns. As such, skip the rest of the test if automatic
136e2c
+dnl helpers is 1 inside the netns. Our output assumes it's 0, which is the
136e2c
+dnl default now-a-days.
136e2c
+AT_SKIP_IF([NS_CMD([sh -c 'test "$(sysctl -n net.netfilter.nf_conntrack_helper)" -eq "1"'])])
136e2c
+
136e2c
 NFT_LIST_RULES([inet], [filter_IN_public_allow], 0, [dnl
136e2c
 	table inet firewalld {
136e2c
 		chain filter_IN_public_allow {
136e2c
-- 
136e2c
2.20.1
136e2c