diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hash:net.t | 6 | ||||
-rwxr-xr-x | tests/netgen.sh | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/hash:net.t b/tests/hash:net.t index 8ccc3f2..9f99ef8 100644 --- a/tests/hash:net.t +++ b/tests/hash:net.t @@ -56,4 +56,10 @@ 0 diff -u -I 'Size in memory.*' .foo hash:net.t.list2 # Delete test set 0 ipset destroy test +# Stress test with range notation +0 ./netgen.sh | ipset restore +# List set and check the number of elements +0 n=`ipset -L test|grep '10.'|wc -l` && test $n -eq 43520 +# Delete test set +0 ipset destroy test # eof diff --git a/tests/netgen.sh b/tests/netgen.sh new file mode 100755 index 0000000..eb59124 --- /dev/null +++ b/tests/netgen.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "n test hash:net hashsize 32" +for x in `seq 0 255`; do + for y in `seq 0 3 253`; do + z=$((y+2)) + echo "a test 10.$x.$y.0-10.$x.$z.255" + done +done |