From: Ilya Maximets Date: Tue, 18 Dec 2018 12:03:36 +0000 (+0300) Subject: ofproto-dpif.at: Stop using not portable bash arrays. X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=99c3ae0b90d3afc8c944476288f5f92253332256;p=ovs.git ofproto-dpif.at: Stop using not portable bash arrays. Fixes select group test on FreeBSD: test-source: 27: Syntax error: word unexpected (expecting ")") CC: Jan Scheurich Fixes: 06db81ccfe6d ("ofproto-dpif: Use dp_hash as default selection method") Signed-off-by: Ilya Maximets Signed-off-by: Ben Pfaff --- diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 4408ce7c6..977def28b 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -492,16 +492,17 @@ check_dpflow_stats () { # Helper function to check the accuracy of distribution of packets over buckets check_group_stats () { - min=($1 $2 $3 $4) buckets=`grep -o 'packet_count=[[0-9]]*' | cut -d'=' -f2 | tail -n +2` i=0 for bucket in $buckets; do - if [[ $bucket -ge ${min[i]} ]]; then - echo "bucket$i >= ${min[[$i]]}" + min=$1 + shift + if [[ $bucket -ge $min ]]; then + echo "bucket$i >= $min" else - echo "bucket$i < ${min[[$i]]}" + echo "bucket$i < $min" fi - (( i++ )) + i=`expr $i + 1` if [[ $i -ge 4 ]]; then break; fi done }