summaryrefslogtreecommitdiffstats
path: root/tests/check_extensions
blob: 5848b384ed2f595818a960e6b0658fa52676018a (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

read ip t timeout p packets b bytes <<< $(../src/ipset l $1 | grep ^$2)
test -z "$timeout" -o -z "$packets" -o -z "$bytes" && exit 1
test $timeout -gt $3 -o $timeout -lt $(($3 - 10)) && exit 1
test $packets -ne $4 -o $bytes -ne $5 && exit 1
exit 0