Fixes select group test on FreeBSD:
  test-source: 27: Syntax error: word unexpected (expecting ")")

CC: Jan Scheurich <[email protected]>
Fixes: 06db81ccfe6d ("ofproto-dpif: Use dp_hash as default selection method")
Signed-off-by: Ilya Maximets <[email protected]>
---
 tests/ofproto-dpif.at | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

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
 }
-- 
2.17.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to