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