diff options
author | Neutron Soutmun <neo.neutron@gmail.com> | 2014-04-04 10:24:22 +0700 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2014-04-07 21:56:45 +0200 |
commit | f7cafd65feda94b6f21c6b6e36e2bf258e2563d3 (patch) | |
tree | 8e470a67c40a97c012ccb737a9e9d878060e05a4 /tests/setlist_resize.sh | |
parent | 485b3a2d8f46354ebde6017c9bab528108742268 (diff) |
ipset: Pass IPSET_BIN to test scripts to change binary location
In the "as-installed" package testing situation, the test scripts should
invokes the system installed "ipset" binary.
Therefore, the IPSET_BIN could be passed to change the binary location.
IPSET_BIN=/sbin/ipset ./runtest.sh
The test scripts run fine in build source tree without IPSET_BIN.
Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'tests/setlist_resize.sh')
-rwxr-xr-x | tests/setlist_resize.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/setlist_resize.sh b/tests/setlist_resize.sh index 7e7ad24..01d1cfc 100755 --- a/tests/setlist_resize.sh +++ b/tests/setlist_resize.sh @@ -2,6 +2,8 @@ # set -x +ipset=${IPSET_BIN:-../src/ipset} + loop=8 for x in ip_set_list_set ip_set_hash_netiface ip_set_hash_ipportnet \ @@ -16,7 +18,7 @@ done create() { n=$1 while [ $n -le 1024 ]; do - ../src/ipset c test$n hash:ip + $ipset c test$n hash:ip n=$((n+2)) done } @@ -26,8 +28,8 @@ for x in `seq 1 $loop`; do create 1 & create 2 & wait - test `../src/ipset l -n | wc -l` -eq 1024 || exit 1 - ../src/ipset x + test `$ipset l -n | wc -l` -eq 1024 || exit 1 + $ipset x test `lsmod|grep -w ^ip_set_hash_ip | awk '{print $3}'` -eq 0 || exit 1 rmmod ip_set_hash_ip rmmod ip_set |