summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-05-23 11:32:54 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-05-23 11:32:54 +0200
commitbacee4529c3fdd43a02ee96e636a04c2e81d4565 (patch)
tree346b18f0e1976651a4cb4676f2c908ff19e8f8e6 /tests
parent9a84755e05850a1faab80b5c4b5e5449f9c3c88d (diff)
hash:net stress test in range notation added
Diffstat (limited to 'tests')
-rw-r--r--tests/hash:net.t6
-rwxr-xr-xtests/netgen.sh9
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