From patchwork Tue Jun 9 11:44:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 49652 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2306721419 for ; Tue, 9 Jun 2015 11:49:26 +0000 (UTC) Received: by wgla2 with SMTP id a2sf3939298wgl.1 for ; Tue, 09 Jun 2015 04:49:25 -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=G/GgafYV/jLUnQQ9ltrNA9kTlwystb17cUYkfnJlnLs=; b=jd1JUNXeFBFmvn7/fi0E0qqas6pJIxi1MPrm+PQdDO6N2OB4+an5lYs4Efu7E574YL IZEbbWLktFiZ8wyPgbUjVe5xo6f6nV7//b4xQtIpxPVTKU97UXq4mxQblKO75punUkB7 vgqYxac/tXd1M02L6sUkY530YB20pM2t6kJ0WJr/tpmGCO34Y+T24tmlnjkvJxe02mCE 56pvgVEwrVmUMhUvcKxgoAKazpiYa090HIyLVyWBA7PZQBs6KYPq6OzjX9JuX0frYqxd ccWb5HOHySk73kOPkuiURUrPJe6a41K0nOA1sSyUFGjR5sRe+gfeKyoDyWGUhdGWIxC1 0isw== X-Gm-Message-State: ALoCoQmA3ucYL/J9+fzVEcQZYQfyTKS4NwQVdtPhW5Zv1EYJolFbsrc5YBStsC8osH/LO/z5BOnF X-Received: by 10.152.26.134 with SMTP id l6mr21505638lag.10.1433850565305; Tue, 09 Jun 2015 04:49:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.138 with SMTP id am10ls52029lac.67.gmail; Tue, 09 Jun 2015 04:49:25 -0700 (PDT) X-Received: by 10.112.145.132 with SMTP id su4mr21471859lbb.85.1433850565151; Tue, 09 Jun 2015 04:49:25 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id r1si5561456lar.2.2015.06.09.04.49.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2015 04:49:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbcmx3 with SMTP id mx3so8864245lbc.1 for ; Tue, 09 Jun 2015 04:49:25 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr21968551lah.76.1433850564865; Tue, 09 Jun 2015 04:49:24 -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 hn6csp2548363lbb; Tue, 9 Jun 2015 04:49:23 -0700 (PDT) X-Received: by 10.55.40.66 with SMTP id o63mr42028212qkh.47.1433850563369; Tue, 09 Jun 2015 04:49:23 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w134si5098797qha.90.2015.06.09.04.49.22; Tue, 09 Jun 2015 04:49:23 -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 7E0E761F03; Tue, 9 Jun 2015 11:49:22 +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 E856461F16; Tue, 9 Jun 2015 11:45:49 +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 BB15561B6A; Tue, 9 Jun 2015 11:45:25 +0000 (UTC) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id AC3C761EB9 for ; Tue, 9 Jun 2015 11:44:55 +0000 (UTC) Received: by labpy14 with SMTP id py14so10183010lab.0 for ; Tue, 09 Jun 2015 04:44:54 -0700 (PDT) X-Received: by 10.152.23.4 with SMTP id i4mr21812197laf.51.1433850294600; Tue, 09 Jun 2015 04:44:54 -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 bm5sm44272lbc.45.2015.06.09.04.44.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jun 2015 04:44:53 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Tue, 9 Jun 2015 13:44:18 +0200 Message-Id: <1433850261-1302-6-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433850261-1302-1-git-send-email-christophe.milard@linaro.org> References: <1433850261-1302-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv4 5/8] validation: creating own dir and lib for pktio 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.217.173 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 Module pktio now gets its own directory and create its own lib (currentely only containing its executable) Startup scripting stuff is just moved to the pktio directory but remains untouched at this stage (test is still ran from validation side) Signed-off-by: Christophe Milard --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 13 ++++--------- test/validation/Makefile.inc | 7 +++++++ test/validation/pktio/.gitignore | 2 ++ test/validation/pktio/Makefile.am | 10 ++++++++++ test/validation/{odp_pktio.c => pktio/pktio.c} | 9 ++------- test/validation/pktio/pktio.h | 7 +++++++ test/validation/pktio/pktio_main.c | 12 ++++++++++++ test/validation/{odp_pktio_run => pktio/pktio_run} | 16 ++++++++-------- 10 files changed, 53 insertions(+), 25 deletions(-) create mode 100644 test/validation/Makefile.inc create mode 100644 test/validation/pktio/.gitignore create mode 100644 test/validation/pktio/Makefile.am rename test/validation/{odp_pktio.c => pktio/pktio.c} (99%) create mode 100644 test/validation/pktio/pktio.h create mode 100644 test/validation/pktio/pktio_main.c rename test/validation/{odp_pktio_run => pktio/pktio_run} (85%) diff --git a/configure.ac b/configure.ac index b604fd6..74b067b 100644 --- a/configure.ac +++ b/configure.ac @@ -302,6 +302,7 @@ AC_CONFIG_FILES([Makefile test/performance/Makefile test/validation/Makefile test/validation/common/Makefile + test/validation/pktio/Makefile test/miscellaneous/Makefile ]) diff --git a/test/validation/.gitignore b/test/validation/.gitignore index 34ea143..7d3a0fc 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -9,7 +9,6 @@ odp_init odp_init_abort odp_init_log odp_packet -odp_pktio odp_pool odp_queue odp_random diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index d4bbdb5..74304f5 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -25,16 +25,12 @@ EXECUTABLES = odp_buffer \ odp_thread \ odp_ver_abt_log_dbg -COMPILE_ONLY = odp_pktio - -TESTSCRIPTS = odp_pktio_run +TESTSCRIPTS = pktio/pktio_run if test_vald TESTS = $(EXECUTABLES) $(TESTSCRIPTS) endif -dist_bin_SCRIPTS = odp_pktio_run - bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) ODP_CU_COMMON=common/odp_cunit_common.c @@ -58,9 +54,6 @@ dist_odp_shared_memory_SOURCES = odp_shared_memory.c dist_odp_synchronizers_SOURCES = odp_synchronizers.c dist_odp_time_SOURCES = odp_time.c dist_odp_timer_SOURCES = odp_timer.c -odp_pktio_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ - $(LIB)/libodp.la -dist_odp_pktio_SOURCES = odp_pktio.c dist_odp_packet_SOURCES = odp_packet.c dist_odp_pool_SOURCES = odp_pool.c dist_odp_cpumask_SOURCES = odp_cpumask.c @@ -69,4 +62,6 @@ odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \ ver_abt_log_dbg/odp_errno.c \ ver_abt_log_dbg/odp_ver_abt_log_dbg.c -SUBDIRS = common + +ODP_MODULES = pktio +SUBDIRS = common $(ODP_MODULES) diff --git a/test/validation/Makefile.inc b/test/validation/Makefile.inc new file mode 100644 index 0000000..3cdc6a7 --- /dev/null +++ b/test/validation/Makefile.inc @@ -0,0 +1,7 @@ +include $(top_srcdir)/test/Makefile.inc + +AM_CFLAGS += -I$(top_srcdir)/test/validation/common +AM_LDFLAGS += -static + +LIBCUNIT_COMMON = $(top_builddir)/test/validation/common/libcunit_common.a +LIBODP = $(LIB)/libodp.la diff --git a/test/validation/pktio/.gitignore b/test/validation/pktio/.gitignore new file mode 100644 index 0000000..ab2eec4 --- /dev/null +++ b/test/validation/pktio/.gitignore @@ -0,0 +1,2 @@ +libpktio.a +pktio_main diff --git a/test/validation/pktio/Makefile.am b/test/validation/pktio/Makefile.am new file mode 100644 index 0000000..c2ecc23 --- /dev/null +++ b/test/validation/pktio/Makefile.am @@ -0,0 +1,10 @@ +include ../Makefile.inc + +dist_bin_SCRIPTS = pktio_run + +noinst_LIBRARIES = libpktio.a +libpktio_a_SOURCES = pktio.c + +bin_PROGRAMS = pktio_main +dist_pktio_main_SOURCES = pktio_main.c +pktio_main_LDADD = libpktio.a $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/odp_pktio.c b/test/validation/pktio/pktio.c similarity index 99% rename from test/validation/odp_pktio.c rename to test/validation/pktio/pktio.c index ba75cd4..cc07a4d 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/pktio/pktio.c @@ -12,6 +12,7 @@ #include #include +#include "pktio.h" #define PKT_BUF_NUM 32 #define PKT_BUF_SIZE (9 * 1024) @@ -705,13 +706,7 @@ static CU_SuiteInfo pktio_suites[] = { CU_SUITE_INFO_NULL }; -static int pktio_main(void) +int pktio_main(void) { return odp_cunit_run(pktio_suites); } - -/* the following main function will be separated when lib is created */ -int main(void) -{ - return pktio_main(); -} diff --git a/test/validation/pktio/pktio.h b/test/validation/pktio/pktio.h new file mode 100644 index 0000000..4b6d512 --- /dev/null +++ b/test/validation/pktio/pktio.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +int pktio_main(void); diff --git a/test/validation/pktio/pktio_main.c b/test/validation/pktio/pktio_main.c new file mode 100644 index 0000000..dca041c --- /dev/null +++ b/test/validation/pktio/pktio_main.c @@ -0,0 +1,12 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pktio.h" + +int main(void) +{ + return pktio_main(); +} diff --git a/test/validation/odp_pktio_run b/test/validation/pktio/pktio_run similarity index 85% rename from test/validation/odp_pktio_run rename to test/validation/pktio/pktio_run index b6a72c7..aed0cd2 100755 --- a/test/validation/odp_pktio_run +++ b/test/validation/pktio/pktio_run @@ -11,14 +11,14 @@ # 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 odp_pktio_run +# 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/odp_pktio_run +# 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 -# odp_pktio exists. If that's not true, then the user has to specify the path +# 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/odp_pktio_run +# TEST_DIR=$builddir $ODP/test/validation/pktio_run # directory where test binaries have been built TEST_DIR="${TEST_DIR:-$PWD}" @@ -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_env ]; then + . ${TEST_SRC_DIR}/../../../platform/$ODP_PLATFORM/test/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 +61,7 @@ run_test() if [ "$disabletype" != "SKIP" ]; then export ODP_PKTIO_DISABLE_SOCKET_${distype}=y fi - odp_pktio + ${TEST_DIR}/pktio/pktio_main if [ $? -ne 0 ]; then ret=1 fi @@ -78,7 +78,7 @@ run() { if [ "$ODP_PLATFORM" != "linux-generic" -o "$(id -u)" != "0" ]; then echo "pktio: using 'loop' device" - odp_pktio + ${TEST_DIR}/pktio/pktio_main exit $? fi