This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 503708078bf6ab9228d23ad65660b42248600c2d (commit) from 4eebb3ada12ab8815b26ba0800f7cf830e4ee6ad (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 503708078bf6ab9228d23ad65660b42248600c2d Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Thu Mar 30 19:20:57 2017 +0300
test: perf: fix bash syntax in odp_pktio_ordered_run.sh
bash -lt syntax expects 2 integer values, not strings. Also return code of piped command needs to be get in a little bit different way. https://bugs.linaro.org/show_bug.cgi?id=2872
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/test/common_plat/performance/Makefile.am b/test/common_plat/performance/Makefile.am index 9111c0c..3299f03 100644 --- a/test/common_plat/performance/Makefile.am +++ b/test/common_plat/performance/Makefile.am @@ -51,3 +51,5 @@ dist_odp_scheduling_SOURCES = odp_scheduling.c dist_odp_pktio_perf_SOURCES = odp_pktio_perf.c
EXTRA_DIST = $(TESTSCRIPTS) + +dist_check_SCRIPTS = udp64.pcap diff --git a/test/common_plat/performance/odp_pktio_ordered_run.sh b/test/common_plat/performance/odp_pktio_ordered_run.sh index d91211c..d6c2be5 100755 --- a/test/common_plat/performance/odp_pktio_ordered_run.sh +++ b/test/common_plat/performance/odp_pktio_ordered_run.sh @@ -5,14 +5,21 @@ # # 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_DIR} $(dirname $0) -name udp64.pcap -print -quit` +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 @@ -21,20 +28,29 @@ else STDBUF= fi
-$STDBUF ./odp_pktio_ordered${EXEEXT} -i pcap:in=${PCAP_IN}:loops=$LOOPS,\ -pcap:out=${PCAP_OUT} -t $DURATION | tee $LOG +$STDBUF ${TEST_DIR}/odp_pktio_ordered${EXEEXT} \ + -i pcap:in=${PCAP_IN}:loops=$LOOPS,pcap:out=${PCAP_OUT} \ + -t $DURATION | tee $LOG
-ret=$? +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 -elif [ $ret -eq 0 ]; then - MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG) - if [ "$MAX_PPS" -lt "$PASS_PPS" ]; then - echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS" - ret=1 - fi + 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
-----------------------------------------------------------------------
Summary of changes: test/common_plat/performance/Makefile.am | 2 ++ .../performance/odp_pktio_ordered_run.sh | 36 ++++++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-)
hooks/post-receive