diff mbox

[v2,2/2] test: pktio_ordered: add test script

Message ID 1477990390-23323-2-git-send-email-matias.elo@nokia.com
State New
Headers show

Commit Message

Elo, Matias (Nokia - FI/Espoo) Nov. 1, 2016, 8:53 a.m. UTC
Enable application testing using pcap pktio.

Signed-off-by: Matias Elo <matias.elo@nokia.com>

---
 test/common_plat/performance/Makefile.am           |   1 +
 .../performance/odp_pktio_ordered_run.sh           |  28 +++++++++++++++++++++
 test/common_plat/performance/udp64.pcap            | Bin 0 -> 7624 bytes
 3 files changed, 29 insertions(+)
 create mode 100755 test/common_plat/performance/odp_pktio_ordered_run.sh
 create mode 100644 test/common_plat/performance/udp64.pcap

diff --git a/test/common_plat/performance/udp64.pcap b/test/common_plat/performance/udp64.pcap
new file mode 100644
index 0000000000000000000000000000000000000000..45f9d6e6341a331125e1e3e49ab8ad1e71b20712
GIT binary patch
literal 7624
zcmca|c+)~A1{MYw_+QV!zzF1AIDRVZQX4OW4Ui4OOdthJV3Lu8!IgnQ52VaNFl`SP
zPy-M%&2gOL#31#rG%+bTB{eNQBQq;ICpRy@ps;AvtkLiqO%tPeXtbOdEel8Mj?wyY
zv^_D}W*Ti5GK{vPNBat+eXG&_<7gilID#<RE*xzaj<yR&+l8a;!qKvDbPRcP%zboT
XVRY^UIO8<hE*$M6kM@y?=pzFFfL+O&

literal 0
HcmV?d00001

-- 
2.7.4
diff mbox

Patch

diff --git a/test/common_plat/performance/Makefile.am b/test/common_plat/performance/Makefile.am
index 790ddae..2de07aa 100644
--- a/test/common_plat/performance/Makefile.am
+++ b/test/common_plat/performance/Makefile.am
@@ -10,6 +10,7 @@  COMPILE_ONLY = odp_l2fwd$(EXEEXT) \
 	       odp_scheduling$(EXEEXT)
 
 TESTSCRIPTS = odp_l2fwd_run.sh \
+	      odp_pktio_ordered_run.sh \
 	      odp_sched_latency_run.sh \
 	      odp_scheduling_run.sh
 
diff --git a/test/common_plat/performance/odp_pktio_ordered_run.sh b/test/common_plat/performance/odp_pktio_ordered_run.sh
new file mode 100755
index 0000000..c31eed5
--- /dev/null
+++ b/test/common_plat/performance/odp_pktio_ordered_run.sh
@@ -0,0 +1,28 @@ 
+#!/bin/bash
+#
+# Copyright (c) 2016, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier:     BSD-3-Clause
+#
+
+PCAP_IN=`find . ${TEST_DIR} $(dirname $0) -name udp64.pcap -print -quit`
+echo "using PCAP_IN = ${PCAP_IN}"
+
+./odp_pktio_ordered -i pcap:in=${PCAP_IN},pcap:out=pcapout.pcap -t 2 &
+wait $!
+STATUS=$?
+
+if [ "$STATUS" -ne 0 ]; then
+  echo "Error: status was: $STATUS, expected 0"
+  exit 1
+fi
+
+if [ `stat -c %s pcapout.pcap` -ne `stat -c %s  ${PCAP_IN}` ]; then
+  echo "File sizes disagree"
+  exit 1
+fi
+
+rm -f pcapout.pcap
+
+exit 0