summaryrefslogtreecommitdiffstats
path: root/tests/setlist.t
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2016-10-14 23:38:30 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2016-10-14 23:38:30 +0200
commitad4de2284dc47a88c1c73cc7bc55a745fec9eb13 (patch)
treea5a9f6bf1ae5b19a19e99758b12d10e47df8cc56 /tests/setlist.t
parent5ad55ac803a8b4969fe5b0e7b526c2e1e890c226 (diff)
Correct tests to check the number of entries too
Give enough time for the entries to timeout before listing, so that we get the correct number of entries. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'tests/setlist.t')
-rw-r--r--tests/setlist.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/setlist.t b/tests/setlist.t
index 5e69fb3..7d14ec8 100644
--- a/tests/setlist.t
+++ b/tests/setlist.t
@@ -81,7 +81,7 @@
# Check listing
0 diff -u -I 'Size in memory.*' .foo setlist.t.list3
# List all sets
-0 ipset list | grep -v Revision: > .foo
+0 sleep .1s; ipset list | grep -v Revision: > .foo
# Check listing
0 diff -u -I 'Size in memory.*' .foo setlist.t.list4
# Flush sets
@@ -103,7 +103,7 @@
# Delete set from the set
0 ipset del test a
# Check reference number of deleted set
-0 ref=`ipset list a | grep References | sed 's/References: //'` && test $ref -eq 0
+0 ref=`sleep .1s; ipset list a | grep References | sed 's/References: //'` && test $ref -eq 0
# Add element to set a
0 ipset add a 1.1.1.1
# Swap sets