From patchwork Thu May 28 10:58:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 49055 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A8EDF218EC for ; Thu, 28 May 2015 11:02:04 +0000 (UTC) Received: by wgez8 with SMTP id z8sf9227639wge.2 for ; Thu, 28 May 2015 04:02: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:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=BkD3IllteFc6pnsIpHMhHnUplJajlfWIEY/Gh2fgln8=; b=QX+kI2xA84Nfwe2xkjdSJGRKZ4TM2l1yPaIiJE5T0S1UvCH8VFnrGeoGdzIrPHL8TV jchKOf3+rUKB60XIdJyyjUcFXuBuUfw2qeI8yWtAG6VislHsnHRbVqpZ5SNGPL9x4PdE 8dfFAq1PNEzT2nc9z8VbLDlHTYKRE/ezXtY+fM/fAQGmdf077w4s6Z2o0+N4q+bzWOgi CKIvcVw787QGgadDQY/I/2Jdzb27bJAhJyAh+2RRLkQK0oTVsFmjVxc1bfcxjpImidh7 SKjDXPLK14TrdumXa3RjC6Z3WbVjkjiR/ShiGp4hCmAW4Nr5ULk5dTCBXWEMFLu31VoR i7JQ== X-Gm-Message-State: ALoCoQlLVZwSxOkjTtoymnM72LCyUVFgJyYsV6/oLWeT/j7TXKYwvuZxIr4ve+BIbp4fYQkY10T0 X-Received: by 10.112.171.41 with SMTP id ar9mr2230126lbc.24.1432810923796; Thu, 28 May 2015 04:02:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.42 with SMTP id j10ls153519laf.27.gmail; Thu, 28 May 2015 04:02:03 -0700 (PDT) X-Received: by 10.152.28.73 with SMTP id z9mr2104737lag.93.1432810923408; Thu, 28 May 2015 04:02:03 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id pu2si1651835lbb.69.2015.05.28.04.02.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 04:02:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laat2 with SMTP id t2so28674016laa.1 for ; Thu, 28 May 2015 04:02:03 -0700 (PDT) X-Received: by 10.152.4.72 with SMTP id i8mr2243417lai.32.1432810923101; Thu, 28 May 2015 04:02:03 -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 hn6csp1060346lbb; Thu, 28 May 2015 04:02:02 -0700 (PDT) X-Received: by 10.55.15.209 with SMTP id 78mr3785880qkp.53.1432810921447; Thu, 28 May 2015 04:02:01 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 79si2018695qhw.4.2015.05.28.04.02.00; Thu, 28 May 2015 04:02:01 -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 8B65F61E75; Thu, 28 May 2015 11:02:00 +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 8F35061E7F; Thu, 28 May 2015 10:59:21 +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 9928061E75; Thu, 28 May 2015 10:59:07 +0000 (UTC) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by lists.linaro.org (Postfix) with ESMTPS id 3FE8161E7D for ; Thu, 28 May 2015 10:58:39 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2so25506683lbb.3 for ; Thu, 28 May 2015 03:58:38 -0700 (PDT) X-Received: by 10.152.116.49 with SMTP id jt17mr2141828lab.82.1432810717683; Thu, 28 May 2015 03:58:37 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id j10sm440024lbs.21.2015.05.28.03.58.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 03:58:36 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Thu, 28 May 2015 12:58:12 +0200 Message-Id: <1432810692-25231-7-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432810692-25231-1-git-send-email-christophe.milard@linaro.org> References: <1432810692-25231-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 6/6] 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christophe.milard@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.215.48 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 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 | 8 +++++++- 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 | 24 ++++++++-------------- test/performance/odp_l2fwd_run | 4 ++-- test/validation/Makefile.am | 4 +--- test/validation/pktio/Makefile.am | 2 -- 10 files changed, 25 insertions(+), 24 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 (71%) diff --git a/configure.ac b/configure.ac index 38667be..27d1f8d 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 test/Makefile test/api_test/Makefile test/performance/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..8c5a386 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -1 +1,7 @@ -dist_bin_SCRIPTS = $(srcdir)/pktio_env + +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 71% rename from test/validation/pktio/pktio_run rename to platform/linux-generic/test/pktio/pktio_run index aed0cd2..d048aa8 100755 --- a/test/validation/pktio/pktio_run +++ b/platform/linux-generic/test/pktio/pktio_run @@ -13,15 +13,10 @@ # 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 +# here the user has to do something like $ODP/platform/linux-generic/test/pktio/pktio_run # directory where test binaries have been built -TEST_DIR="${TEST_DIR:-$PWD}" +TEST_DIR="${TEST_DIR:-$PWD}/../../../test/validation/pktio" # directory where test sources are, including scripts TEST_SRC_DIR=$(dirname $0) @@ -33,12 +28,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 +52,7 @@ run_test() if [ "$disabletype" != "SKIP" ]; then export ODP_PKTIO_DISABLE_SOCKET_${distype}=y fi - ${TEST_DIR}/pktio/pktio_main + ${TEST_DIR}/pktio_main if [ $? -ne 0 ]; then ret=1 fi @@ -76,9 +67,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 + ${TEST_DIR}/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 a82e35c..0e47642 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 2acb63b..f86751b 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