ping,

there was question about autotools inside the patch.
Can somebody replay please?

Thank you,
Maxim.

On 07/05/16 11:01, Maxim Uvarov wrote:
Use vlan tagged traffic for example validation test
to add code coverage for pkt_mmap_vlan_insert() internal
function.

Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>
---
  In general this patch work and tests internal function. But there
  is one small issue related to autotools which I don't know how to
  fix better:
  make; make check works, but make check after clean fails 
example/packet/odp_pktio
  binary is not yet build while tests going to be executed. The only thing which
  cames to my mind is to reorder root directory Makefile.am and add "-" between 
tests
  and examples. In that case examples should be compiled before any test 
compilation/execution.
  Is that a right way to do?

  Thanks,
  Maxim.

  test/platform/linux-generic/Makefile.am            |   6 ++-
  test/platform/linux-generic/pktio/.gitignore       |   1 +
  test/platform/linux-generic/pktio/Makefile.am      |   1 +
  .../platform/linux-generic/pktio/pktio_run_vlan.sh |  46 +++++++++++++++++++++
  test/platform/linux-generic/pktio/vlan.pcap        | Bin 0 -> 9728 bytes
  5 files changed, 53 insertions(+), 1 deletion(-)
  create mode 100755 test/platform/linux-generic/pktio/pktio_run_vlan.sh
  create mode 100644 test/platform/linux-generic/pktio/vlan.pcap

diff --git a/test/platform/linux-generic/Makefile.am 
b/test/platform/linux-generic/Makefile.am
index 2d58c57..597a1c1 100644
--- a/test/platform/linux-generic/Makefile.am
+++ b/test/platform/linux-generic/Makefile.am
@@ -39,6 +39,9 @@ SUBDIRS = $(ODP_MODULES)
if HAVE_PCAP
  TESTS += pktio/pktio_run_pcap.sh
+if test_example
+TESTS += pktio/pktio_run_vlan.sh
+endif
  endif
  if PKTIO_IPC
  TESTS += pktio_ipc/pktio_ipc_run.sh
@@ -54,7 +57,8 @@ endif
TEST_EXTENSIONS = .sh -dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
+dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER) \
+                    pktio/vlan.pcap
test_SCRIPTS = $(dist_check_SCRIPTS) diff --git a/test/platform/linux-generic/pktio/.gitignore b/test/platform/linux-generic/pktio/.gitignore
index 7e563b8..5f75e14 100644
--- a/test/platform/linux-generic/pktio/.gitignore
+++ b/test/platform/linux-generic/pktio/.gitignore
@@ -1,2 +1,3 @@
  *.log
  *.trs
+*.pcap
diff --git a/test/platform/linux-generic/pktio/Makefile.am 
b/test/platform/linux-generic/pktio/Makefile.am
index 4a14343..094a222 100644
--- a/test/platform/linux-generic/pktio/Makefile.am
+++ b/test/platform/linux-generic/pktio/Makefile.am
@@ -4,6 +4,7 @@ dist_check_SCRIPTS = pktio_env \
if HAVE_PCAP
  dist_check_SCRIPTS += pktio_run_pcap.sh
+dist_check_SCRIPTS += pktio_run_vlan.sh
  endif
  if netmap_support
  dist_check_SCRIPTS += pktio_run_netmap.sh
diff --git a/test/platform/linux-generic/pktio/pktio_run_vlan.sh 
b/test/platform/linux-generic/pktio/pktio_run_vlan.sh
new file mode 100755
index 0000000..b58aacb
--- /dev/null
+++ b/test/platform/linux-generic/pktio/pktio_run_vlan.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# Copyright (c) 2016, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier:     BSD-3-Clause
+#
+
+#
+# This test is intend to test pkt_mmap_vlan_insert() feature for
+# linux-generic packet mmap pktio.
+#
+#
+
+# any parameter passed as arguments to this script is passed unchanged to
+# the test itself (pktio_main)
+
+# directories where pktio_main binary can be found:
+# -in the validation dir when running make check (intree or out of tree)
+# -in the script directory, when running after 'make install', or
+# -in the validation when running standalone intree.
+# -in the current directory.
+# running stand alone out of tree requires setting PATH
+PATH=${TEST_DIR}/pktio:$PATH
+PATH=$(dirname $0):$PATH
+PATH=../../../example/packet:$PATH
+PATH=../../../../_inst/bin:$PATH
+PATH=.:$PATH
+
+odp_pktio_path=$(which odp_pktio${EXEEXT})
+if [ -x "$odp_pktio_path" ] ; then
+       echo "running with $odp_pktio_path"
+else
+       pwd
+       echo $PATH
+       echo "cannot find odp_pktio${EXEEXT}: please set you PATH for it."
+       exit 1
+fi
+
+PCAP_IN=`find . ${TEST_DIR} $(dirname $0) -name vlan.pcap -print -quit`
+echo "using PCAP_IN = ${PCAP_IN}"
+PCAP_OUT=vlan_out.pcap
+odp_pktio${EXEEXT} -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 1 -m 0
+ret=$?
+rm -f ${PCAP_OUT}
+exit $ret
diff --git a/test/platform/linux-generic/pktio/vlan.pcap 
b/test/platform/linux-generic/pktio/vlan.pcap
new file mode 100644
index 
0000000000000000000000000000000000000000..106ccb682e51495b4025337518a0bce63c2c7681
GIT binary patch
literal 9728
zcmeHNeQXrR6@R<F^Iq)3b|{=(C16{8IUt}71RM^-2~wIU*pOl>ikyh3QAN~9xK+}$
z4T)^-QnlAgC4W>Yk*X>mRlo92km}Nw!c|oiNTn)LBLcyK0BKSYLZiA0xI}f|@6FEc
z&CT8}Zu4i?dS2hYnK$pf`MuxF&iVB}9(>lN6zOYfipb#)S3BqRK6jeva#{)P%KZ4H
z2`Z!uf1f`})Rm#nP<lLnYk>-l2Nx8d?iyv8ohr8v56pV)=ly+yzZvNmzS?$(tvQ({
zN`3H(bKv=xSCLCcs6x0O=6jaXv{mjz%{=NyEc#gk|LwB0u=KHqz1)uIAM9Usn@mg_
zk2Z3jR&?;MUcTp8vTSb+>k8B@8d$;SEO~No<@;@ZpT?k%M|X%lk9|?s`aqYWyx8+Z
z0ekoid$_k!Cq3-<X$<;!oI~ik=uuzyOrT5ATGkaPBO2JlXV}BNmHltQH1XBQqGIxB
zljw+U^mWzt`dC-+XBzhK8TN2Tj(!$l@3W%oreFHHd@xpu)``6eKOy$gmCxBdp4?km
zcOk;wono&-@A$eG`7XZiNzwWmd-x3haEHC`0}y;QvZ#0!b{bfxaRTgY=FeI7XemDg
zrt~v(2bR#*#*@ZM8*9~NW2GVr#A;%NVz9F1ZjF^e?ya$>uoBL#iIo(6N4XHj>S(MG
zeb3ib&#l6WQUqAxJ_;+1G%sQ<6jmy<(AQPlQ&<V@nONzj-$&R}SgBCO*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