summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2018-12-18 15:03:35 +0300
committerBen Pfaff <blp@ovn.org>2018-12-18 15:26:58 -0800
commit0304c437086be9506f37c40091d11aa2d64dc3c8 (patch)
treea1411396c32566131e3125270a0407eeda44e45e /tests
parent75d7f41d95f7af1ca1eac284339d1d893e58f370 (diff)
downloadopenvswitch-0304c437086be9506f37c40091d11aa2d64dc3c8.tar.gz
ofproto-dpif.at: Stop using not portable 'read -d'.
'read -d' is a bash extention. Replace it with simple 'cat'. This fixes 'select group' tests on FreeBSD. 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>
Diffstat (limited to 'tests')
-rw-r--r--tests/ofproto-dpif.at8
1 files 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