summaryrefslogtreecommitdiffstats
path: root/tests/restore.t
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@netfilter.org>2024-02-05 12:41:10 +0100
committerJozsef Kadlecsik <kadlec@netfilter.org>2024-02-05 12:41:10 +0100
commit48ca2ebc6fde8fa5ffdb194475618516e20a02de (patch)
tree43828a31c1e50d5e592acdd55a879ebb861b9f61 /tests/restore.t
parent099916e8f2c0a9c84f79469a8db49f775d4af16e (diff)
tests: Verify module unload when sets with timeout were just destroyed
Diffstat (limited to 'tests/restore.t')
-rw-r--r--tests/restore.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/restore.t b/tests/restore.t
index ffde2d1..dda143f 100644
--- a/tests/restore.t
+++ b/tests/restore.t
@@ -6,4 +6,28 @@
0 ipset x
# Check auto-increasing maximal number of sets
0 ./setlist_resize.sh
+# Create bitmap set with timeout
+0 ipset create test1 bitmap:ip range 2.0.0.1-2.1.0.0 timeout 5
+# Add element to bitmap set
+0 ipset add test1 2.0.0.2 timeout 30
+# Create hash set with timeout
+0 ipset -N test2 iphash --hashsize 128 timeout 4
+# Add element to hash set
+0 ipset add test2 2.0.0.3 timeout 30
+# Create list set with timeout
+0 ipset -N test3 list:set timeout 3
+# Add bitmap set to list set
+0 ipset a test3 test1 timeout 30
+# Add hash set to list set
+0 ipset a test3 test2 timeout 30
+# Flush list set
+0 ipset f test3
+# Destroy all sets
+0 ipset x
+# Remove the ip_set_list_set kernel module
+0 rmmod ip_set_list_set
+# Remove the ip_set_bitmap_ip kernel module
+0 rmmod ip_set_bitmap_ip
+# Remove the ip_set_hash_ip kernel module
+0 rmmod ip_set_hash_ip
# eof