Blame SOURCES/0100-fix-tests-functions-improve-CHECK_IPSET-for-nftables.patch

136e2c
From d9a929cf01da6f53c788703e12470468e8f159cd Mon Sep 17 00:00:00 2001
136e2c
From: Eric Garver <eric@garver.life>
136e2c
Date: Mon, 13 May 2019 13:12:32 -0400
136e2c
Subject: [PATCH 100/109] fix: tests/functions: improve CHECK_IPSET for
136e2c
 nftables
136e2c
136e2c
Check for timeout and size support.
136e2c
136e2c
(cherry picked from commit 272437da619e5416803b28feefd5fa7ad0e5d3a6)
136e2c
(cherry picked from commit a603d1085b861686665aeefc730dfb3e0fea3f30)
136e2c
---
136e2c
 src/tests/functions.at | 6 ++++++
136e2c
 1 file changed, 6 insertions(+)
136e2c
136e2c
diff --git a/src/tests/functions.at b/src/tests/functions.at
136e2c
index b35558795909..125a6e06ce6b 100644
136e2c
--- a/src/tests/functions.at
136e2c
+++ b/src/tests/functions.at
136e2c
@@ -354,6 +354,12 @@ m4_define([CHECK_IPSET], [
136e2c
         NS_CHECK([nft add table inet firewalld_check_ipset])
136e2c
         NS_CHECK([nft add set inet firewalld_check_ipset foobar { type ipv4_addr \; }])
136e2c
         AT_SKIP_IF([! NS_CMD([nft flush set inet firewalld_check_ipset foobar >/dev/null 2>&1])])
136e2c
+        dnl If nft set has has no timeout support, then skip the test
136e2c
+        AT_SKIP_IF([! NS_CMD([nft add set inet firewalld_check_ipset foobar_timeout { type ipv4_addr \; timeout 600s \; } >/dev/null 2>&1])])
136e2c
+        dnl If nft set has has no size support, then skip the test
136e2c
+        AT_SKIP_IF([! NS_CMD([nft add set inet firewalld_check_ipset foobar_size { type ipv4_addr \; size 100000 \; } >/dev/null 2>&1])])
136e2c
+        AT_SKIP_IF([! NS_CMD([nft add set inet firewalld_check_ipset foobar_timeout_size { type ipv4_addr \; timeout 600s \; size 100000 \; } >/dev/null 2>&1])])
136e2c
+
136e2c
         NS_CHECK([nft delete table inet firewalld_check_ipset])
136e2c
     ])
136e2c
 ])
136e2c
-- 
136e2c
2.20.1
136e2c