]> git.proxmox.com Git - ovs.git/commitdiff
ofproto-dpif.at: Stop using not portable bash arrays.
authorIlya Maximets <i.maximets@samsung.com>
Tue, 18 Dec 2018 12:03:36 +0000 (15:03 +0300)
committerBen Pfaff <blp@ovn.org>
Tue, 18 Dec 2018 23:27:33 +0000 (15:27 -0800)
Fixes select group test on FreeBSD:
  test-source: 27: Syntax error: word unexpected (expecting ")")

CC: Jan Scheurich <jan.scheurich@ericsson.com>
Fixes: 06db81ccfe6d ("ofproto-dpif: Use dp_hash as default selection method")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
tests/ofproto-dpif.at

index 4408ce7c6f35f99fbc833df7bf7c654bf070efe2..977def28b42457e508a65a03356c74afed40095c 100644 (file)
@@ -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
 }