'read -d' is a bash extention. Replace it with simple 'cat'.
This fixes 'select group' tests on FreeBSD.

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 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index ea51467cc..4408ce7c6 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -410,7 +410,7 @@ AT_SETUP([ofproto-dpif - select group])
 check_dpflow_stats () {
     min_flows=$1
     min_buckets=$2
-    read -d '' dpflows
+    dpflows=`cat`
     hash_flow=`echo "$dpflows" | grep "actions:hash"`
     n_flows=`echo "$dpflows" | grep -c dp_hash`
     n_buckets=`echo "$dpflows" | grep dp_hash | grep -o "actions:[[0-9]]*" | 
sort | uniq -c | wc -l`
@@ -480,7 +480,7 @@ AT_SETUP([ofproto-dpif - select group with weights])
 check_dpflow_stats () {
     min_flows=$1
     min_buckets=$2
-    read -d '' dpflows
+    dpflows=`cat`
     hash_flow=`echo "$dpflows" | grep "actions:hash"`
     n_flows=`echo "$dpflows" | grep -c dp_hash`
     n_buckets=`echo "$dpflows" | grep dp_hash | grep -o "actions:[[0-9]]*" | 
sort | uniq -c | wc -l`
@@ -606,7 +606,7 @@ AT_SETUP([ofproto-dpif - select group with legacy hash 
selection method])
 check_dpflow_stats () {
     min_flows=$1
     min_buckets=$2
-    read -d '' dpflows
+    dpflows=`cat`
     n_flows=`echo "$dpflows" | wc -l`
     n_buckets=`echo "$dpflows" | grep -o "actions:[[0-9]]*" | sort | uniq -c | 
wc -l`
     if [[ $n_flows -ge $min_flows ]]; then flows=ok; else flows=nok; fi
@@ -650,7 +650,7 @@ AT_SETUP([ofproto-dpif - select group with custom hash 
selection method])
 check_dpflow_stats () {
     min_flows=$1
     min_buckets=$2
-    read -d '' dpflows
+    dpflows=`cat`
     n_flows=`echo "$dpflows" | wc -l`
     n_buckets=`echo "$dpflows" | grep -o "actions:[[0-9]]*" | sort | uniq -c | 
wc -l`
     if [[ $n_flows -ge $min_flows ]]; then flows=ok; else flows=nok; fi
-- 
2.17.1

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

Reply via email to