summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/hash:ip.t10
-rwxr-xr-xtests/resize.sh5
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/hash:ip.t b/tests/hash:ip.t
index a7f56bd..6293ae5 100644
--- a/tests/hash:ip.t
+++ b/tests/hash:ip.t
@@ -42,10 +42,16 @@
0 test `ipset -S test| grep add| wc -l` -eq 0
# IP: Flush test set
0 ipset -F test
-# IP: Delete test set
-0 ipset -X test
# IP: Stress test resizing
0 ./resize.sh
+# IP: Check listing, which requires multiple messages
+0 n=`ipset -S resize-test | wc -l` && test $n -eq 8161
+# IP: Swap test and resize-test sets
+0 ipset -W test resize-test
+# IP: Check listing, which requires multiple messages
+0 n=`ipset -S test | wc -l` && test $n -eq 8161
+# IP: Destroy sets
+0 ipset -X
# Network: Create a set with timeout
0 ipset -N test iphash --hashsize 128 --netmask 24 timeout 5
# Network: Add zero valued element
diff --git a/tests/resize.sh b/tests/resize.sh
index 5d39f66..008c607 100755
--- a/tests/resize.sh
+++ b/tests/resize.sh
@@ -1,11 +1,12 @@
#!/bin/bash
+../src/ipset x resize-test 2>/dev/null
+
set -e
../src/ipset n resize-test hash:ip hashsize 64
-for x in `seq 1 20`; do
+for x in `seq 1 32`; do
for y in `seq 1 255`; do
../src/ipset a resize-test 192.168.$x.$y
done
done
-../src/ipset x resize-test