Use arithmetic expansion in system tests (followup)
These are manual edits in addition of the automated changes from the previous commit.
This commit is contained in:
@@ -23,6 +23,8 @@ status=0
|
||||
ret=0
|
||||
n=1
|
||||
stats=0
|
||||
nsock0nstat=0
|
||||
nsock1nstat=0
|
||||
rndc_stats() {
|
||||
_ns=$1
|
||||
_ip=$2
|
||||
@@ -81,7 +83,7 @@ ret=0
|
||||
echo_i "dumping initial stats for ns3 ($n)"
|
||||
rndc_stats ns3 10.53.0.3 || ret=1
|
||||
nsock0nstat=`grep "UDP/IPv4 sockets active" $last_stats | awk '{print $1}'`
|
||||
[ 0 -ne ${nsock0nstat:-0} ] || ret=1
|
||||
[ 0 -ne ${nsock0nstat} ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
n=$((n + 1))
|
||||
@@ -117,7 +119,7 @@ n=$((n + 1))
|
||||
ret=0
|
||||
echo_i "verifying active sockets output in named.stats ($n)"
|
||||
nsock1nstat=`grep "UDP/IPv4 sockets active" $last_stats | awk '{print $1}'`
|
||||
[ `expr ${nsock1nstat:-0} - ${nsock0nstat:-0}` -eq 1 ] || ret=1
|
||||
[ $((nsock1nstat - nsock0nstat)) -eq 1 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
n=$((n + 1))
|
||||
|
||||
Reference in New Issue
Block a user