From patchwork Wed Jun 10 07:58:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 49681 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9857B245D4 for ; Wed, 10 Jun 2015 08:48:05 +0000 (UTC) Received: by laar3 with SMTP id r3sf10897115laa.3 for ; Wed, 10 Jun 2015 01:48:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:message-id:date:from :user-agent:mime-version:to:references:in-reply-to:cc:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:content-transfer-encoding:content-type :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Vtn3OnfL6OEvdpK2FYogF/YyKTGeQRnsQNHQSvT8o40=; b=hRLuDetnMOfGWXXwBfqoFF1z+hbSABocUVfXhzio6MfHh95auUgPZBM641oXsjqOnQ KfysMH5wUJunFG6bdl6oHt7VIEErm6rI55AkOrA/FA3SX+KvzM1PUG/BUfNJHD+uRy4G 2BYGFRSsCKlRD8l6zFOHzw0UrdQoV3FXuVNqzuXkKNzg7cjE0zkDVOfIKODWwTz/VbD/ 4wqylVMJXcodN4wswVtOyF+kvXkwFlVYZU/QxQ6gs1XS00memJoqnGYCDoP3jeazxksK zlXwsv8JKKJgDP9VgduIVyMrJHTQWimP3JQ6Y9OW9NY67kZE+XYMH2AbXSfguzrmyAMb 4WHw== X-Gm-Message-State: ALoCoQmb5Jrf9HnCEayfVnmEmUyjETnVi2GUYibjg/vMkgFfoZSuI8bGwIKDott0zCXEtlBPghuV X-Received: by 10.152.22.71 with SMTP id b7mr2023708laf.3.1433926084591; Wed, 10 Jun 2015 01:48:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.194 with SMTP id v2ls214900lag.59.gmail; Wed, 10 Jun 2015 01:48:04 -0700 (PDT) X-Received: by 10.152.27.1 with SMTP id p1mr2187446lag.112.1433926084435; Wed, 10 Jun 2015 01:48:04 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id oe4si8234630lbc.49.2015.06.10.01.48.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jun 2015 01:48:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbcue7 with SMTP id ue7so24499831lbc.0 for ; Wed, 10 Jun 2015 01:48:04 -0700 (PDT) X-Received: by 10.152.29.34 with SMTP id g2mr2198394lah.73.1433926084273; Wed, 10 Jun 2015 01:48:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3183437lbb; Wed, 10 Jun 2015 01:48:03 -0700 (PDT) X-Received: by 10.140.147.134 with SMTP id 128mr2477836qht.97.1433926083163; Wed, 10 Jun 2015 01:48:03 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 103si7946863qkt.41.2015.06.10.01.47.59; Wed, 10 Jun 2015 01:48:03 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id D33E061CE1; Wed, 10 Jun 2015 08:47:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9539C61CB3; Wed, 10 Jun 2015 08:47:16 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 261C061D7C; Wed, 10 Jun 2015 08:47:08 +0000 (UTC) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by lists.linaro.org (Postfix) with ESMTPS id 5BF0661B5A for ; Wed, 10 Jun 2015 08:47:05 +0000 (UTC) Received: by wgbgq6 with SMTP id gq6so30225667wgb.3 for ; Wed, 10 Jun 2015 01:47:04 -0700 (PDT) X-Received: by 10.180.95.163 with SMTP id dl3mr16820473wib.30.1433926024535; Wed, 10 Jun 2015 01:47:04 -0700 (PDT) Received: from [192.168.1.34] ([87.120.178.39]) by mx.google.com with ESMTPSA id n3sm6843839wix.1.2015.06.10.01.47.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jun 2015 01:47:03 -0700 (PDT) Message-ID: <5577EE2F.6010409@linaro.org> Date: Wed, 10 Jun 2015 10:58:39 +0300 From: Maxim Uvarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Christophe Milard , anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org References: <1433850261-1302-1-git-send-email-christophe.milard@linaro.org> <1433850261-1302-8-git-send-email-christophe.milard@linaro.org> In-Reply-To: <1433850261-1302-8-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: Re: [lng-odp] [PATCHv4 7/8] validation: moving pktio plt specific to platform X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Christophe, if we do not package other tests to deb then there is no need to package pktio tests also. In that patch you can extend if test_vald on next 2 lines: Maxim. On 06/09/15 14:44, Christophe Milard wrote: > The platform specific scripts for pktio are now moved > from the validation to the platform side. > Pktio tests are now initiated from the platform side. > > Signed-off-by: Christophe Milard > --- > configure.ac | 1 + > platform/linux-generic/test/.gitignore | 2 + > platform/linux-generic/test/Makefile.am | 9 +++- > platform/linux-generic/test/pktio/.gitignore | 2 + > platform/linux-generic/test/pktio/Makefile.am | 2 + > platform/linux-generic/test/{ => pktio}/pktio_env | 0 > .../linux-generic/test}/pktio/pktio_run | 51 ++++++++++------------ > test/performance/odp_l2fwd_run | 4 +- > test/validation/Makefile.am | 4 +- > test/validation/pktio/Makefile.am | 2 - > 10 files changed, 42 insertions(+), 35 deletions(-) > create mode 100644 platform/linux-generic/test/.gitignore > create mode 100644 platform/linux-generic/test/pktio/.gitignore > create mode 100644 platform/linux-generic/test/pktio/Makefile.am > rename platform/linux-generic/test/{ => pktio}/pktio_env (100%) > rename {test/validation => platform/linux-generic/test}/pktio/pktio_run (51%) > > diff --git a/configure.ac b/configure.ac > index 96126cb..98eba55 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -297,6 +297,7 @@ AC_CONFIG_FILES([Makefile > helper/test/Makefile > pkgconfig/libodp.pc > platform/linux-generic/Makefile > + platform/linux-generic/test/pktio/Makefile > scripts/Makefile > test/Makefile > test/api_test/Makefile > diff --git a/platform/linux-generic/test/.gitignore b/platform/linux-generic/test/.gitignore > new file mode 100644 > index 0000000..7e563b8 > --- /dev/null > +++ b/platform/linux-generic/test/.gitignore > @@ -0,0 +1,2 @@ > +*.log > +*.trs > diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am > index 91e361c..2e0bc11 100644 > --- a/platform/linux-generic/test/Makefile.am > +++ b/platform/linux-generic/test/Makefile.am > @@ -1 +1,8 @@ > -dist_bin_SCRIPTS = $(srcdir)/pktio_env > +TESTS_ENVIRONMENT = TEST_DIR=${top_builddir}/test/validation > + > +if test_vald > +TESTS = pktio/pktio_run > +endif > + > +ODP_MODULES = pktio > +SUBDIRS = $(ODP_MODULES) > diff --git a/platform/linux-generic/test/pktio/.gitignore b/platform/linux-generic/test/pktio/.gitignore > new file mode 100644 > index 0000000..7e563b8 > --- /dev/null > +++ b/platform/linux-generic/test/pktio/.gitignore > @@ -0,0 +1,2 @@ > +*.log > +*.trs > diff --git a/platform/linux-generic/test/pktio/Makefile.am b/platform/linux-generic/test/pktio/Makefile.am > new file mode 100644 > index 0000000..93281dd > --- /dev/null > +++ b/platform/linux-generic/test/pktio/Makefile.am > @@ -0,0 +1,2 @@ > +dist_bin_SCRIPTS = pktio_env \ > + pktio_run > diff --git a/platform/linux-generic/test/pktio_env b/platform/linux-generic/test/pktio/pktio_env > similarity index 100% > rename from platform/linux-generic/test/pktio_env > rename to platform/linux-generic/test/pktio/pktio_env > diff --git a/test/validation/pktio/pktio_run b/platform/linux-generic/test/pktio/pktio_run > similarity index 51% > rename from test/validation/pktio/pktio_run > rename to platform/linux-generic/test/pktio/pktio_run > index aed0cd2..0dc5052 100755 > --- a/test/validation/pktio/pktio_run > +++ b/platform/linux-generic/test/pktio/pktio_run > @@ -6,26 +6,26 @@ > # SPDX-License-Identifier: BSD-3-Clause > # > > -# TEST_DIR is set by Makefile to point to the directory where binaries have been > -# built (Makefile variable builddir) > -# If TEST_DIR is not set it means we are not running with make, and in this case > -# there are two situations: > -# 1. user build ODP in the same dir as the source (most likely) > -# here the user can simply call pktio_run > -# 2. user may have built ODP in a separate build dir (like bitbake usually does) > -# here the user has to do something like $ODP/test/validation/pktio_run > -# > -# In both situations the script assumes that the user is in the directory where > -# pktio_main exists. If that's not true, then the user has to specify the path > -# to it and run: > -# TEST_DIR=$builddir $ODP/test/validation/pktio_run > +# 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 (./pktio_run) intree. > +# -in the current directory. > +# running stand alone out of tree requires setting PATH > +PATH=$PATH:${TEST_DIR}/pktio > +PATH=$PATH:$(dirname $0) > +PATH=$PATH:$(dirname $0)/../../../../test/validation/pktio > +PATH=$PATH:. > > -# directory where test binaries have been built > -TEST_DIR="${TEST_DIR:-$PWD}" > -# directory where test sources are, including scripts > -TEST_SRC_DIR=$(dirname $0) > +pktio_main_path=$(which pktio_main) > +if [ -x "$pktio_main_path" ] ; then > + echo "running with pktio_main: $pktio_run_path" > +else > + echo "cannot find pktio_main: please set you PATH for it." > +fi > > -PATH=$TEST_DIR:$PATH > +# directory where platform test sources are, including scripts > +TEST_SRC_DIR=$(dirname $0) > > # exit codes expected by automake for skipped tests > TEST_SKIPPED=77 > @@ -33,12 +33,8 @@ TEST_SKIPPED=77 > # Use installed pktio env or for make check take it from platform directory > if [ -f "./pktio_env" ]; then > . ./pktio_env > -elif [ "$ODP_PLATFORM" = "" ]; then > - echo "$0: error: ODP_PLATFORM must be defined" > - # not skipped as this should never happen via "make check" > - exit 1 > -elif [ -f ${TEST_SRC_DIR}/../../../platform/$ODP_PLATFORM/test/pktio_env ]; then > - . ${TEST_SRC_DIR}/../../../platform/$ODP_PLATFORM/test/pktio_env > +elif [ -f ${TEST_SRC_DIR}/pktio_env ]; then > + . ${TEST_SRC_DIR}/pktio_env > else > echo "BUG: unable to find pktio_env!" > echo "pktio_env has to be in current directory or in platform/\$ODP_PLATFORM/test." > @@ -61,7 +57,7 @@ run_test() > if [ "$disabletype" != "SKIP" ]; then > export ODP_PKTIO_DISABLE_SOCKET_${distype}=y > fi > - ${TEST_DIR}/pktio/pktio_main > + pktio_main > if [ $? -ne 0 ]; then > ret=1 > fi > @@ -76,9 +72,10 @@ run_test() > > run() > { > - if [ "$ODP_PLATFORM" != "linux-generic" -o "$(id -u)" != "0" ]; then > + #need to be root to set the interface: if not, run with default loopback. > + if [ "$(id -u)" != "0" ]; then > echo "pktio: using 'loop' device" > - ${TEST_DIR}/pktio/pktio_main > + pktio_main > exit $? > fi > > diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run > index bbf0c0c..120da21 100755 > --- a/test/performance/odp_l2fwd_run > +++ b/test/performance/odp_l2fwd_run > @@ -37,8 +37,8 @@ elif [ "$ODP_PLATFORM" = "" ]; then > echo "$0: error: ODP_PLATFORM must be defined" > # not skipped as this should never happen via "make check" > exit 1 > -elif [ -f ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio_env ]; then > - . ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio_env > +elif [ -f ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio/pktio_env ]; then > + . ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio/pktio_env > else > echo "BUG: unable to find pktio_env!" > echo "pktio_env has to be in current directory or in platform/\$ODP_PLATFORM/test." > diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am > index 74304f5..0c69636 100644 > --- a/test/validation/Makefile.am > +++ b/test/validation/Makefile.am > @@ -25,10 +25,8 @@ EXECUTABLES = odp_buffer \ > odp_thread \ > odp_ver_abt_log_dbg > > -TESTSCRIPTS = pktio/pktio_run > - > if test_vald > -TESTS = $(EXECUTABLES) $(TESTSCRIPTS) > +TESTS = $(EXECUTABLES) > endif > > bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) > diff --git a/test/validation/pktio/Makefile.am b/test/validation/pktio/Makefile.am > index c2ecc23..1d1a0d9 100644 > --- a/test/validation/pktio/Makefile.am > +++ b/test/validation/pktio/Makefile.am > @@ -1,7 +1,5 @@ > include ../Makefile.inc > > -dist_bin_SCRIPTS = pktio_run > - > noinst_LIBRARIES = libpktio.a > libpktio_a_SOURCES = pktio.c > --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -2,7 +2,9 @@ TESTS_ENVIRONMENT = TEST_DIR=${top_builddir}/test/validation if test_vald TESTS = pktio/pktio_run -endif ODP_MODULES = pktio SUBDIRS = $(ODP_MODULES) +endif