aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_pktio_ordered_run.sh
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>2017-10-05 04:33:44 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2017-10-16 21:50:18 +0300
commit326192cd87888abbea6c0dbdd3dc972db41f3325 (patch)
tree624cb9ab5431cf9a48fb140e0538b0a664aaae8c /test/performance/odp_pktio_ordered_run.sh
parent55e6afa29bdc2ae314bada7ac5648049909e1775 (diff)
test: drop now-unused common_plat directory
All tests in test/ are now common to all platforms, so no point in specifying that via (the only) common_plat subdirectory inside test dir. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/performance/odp_pktio_ordered_run.sh')
-rwxr-xr-xtest/performance/odp_pktio_ordered_run.sh58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/performance/odp_pktio_ordered_run.sh b/test/performance/odp_pktio_ordered_run.sh
new file mode 100755
index 000000000..d6c2be526
--- /dev/null
+++ b/test/performance/odp_pktio_ordered_run.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# Copyright (c) 2016, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+TEST_SRC_DIR=$(dirname $0)
+TEST_DIR="${TEST_DIR:-$(dirname $0)}"
+
+DURATION=5
+LOG=odp_pktio_ordered.log
+LOOPS=100000000
+PASS_PPS=5000
+PCAP_IN=`find . ${TEST_SRC_DIR} $(dirname $0) -name udp64.pcap -print -quit`
+PCAP_OUT=/dev/null
+
+if [ ! -f ${PCAP_IN} ]; then
+ echo "FAIL: no udp64.pcap"
+ exit 1
+fi
+
+# This just turns off output buffering so that you still get periodic
+# output while piping to tee, as long as stdbuf is available.
+if [ "$(which stdbuf)" != "" ]; then
+ STDBUF="stdbuf -o 0"
+else
+ STDBUF=
+fi
+
+$STDBUF ${TEST_DIR}/odp_pktio_ordered${EXEEXT} \
+ -i pcap:in=${PCAP_IN}:loops=$LOOPS,pcap:out=${PCAP_OUT} \
+ -t $DURATION | tee $LOG
+
+ret=${PIPESTATUS[0]}
+
+if [ $ret -ne 0 ]; then
+ echo "FAIL: no odp_pktio_ordered${EXEEXT}"
+ rm -f $LOG
+ exit $ret
+fi
+
+if [ ! -f $LOG ]; then
+ echo "FAIL: $LOG not found"
+ ret=1
+ exit $ret
+fi
+
+MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG)
+echo "MAX_PPS=$MAX_PPS"
+if [ $MAX_PPS -lt $PASS_PPS ]; then
+ echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS"
+ ret=1
+fi
+
+rm -f $LOG
+
+exit $ret