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