From patchwork Fri Jul 29 06:57:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 73020 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1209563qga; Thu, 28 Jul 2016 23:00:36 -0700 (PDT) X-Received: by 10.200.54.107 with SMTP id n40mr63613999qtb.44.1469772036766; Thu, 28 Jul 2016 23:00:36 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k67si11117793qkc.67.2016.07.28.23.00.36; Thu, 28 Jul 2016 23:00:36 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1CB30680C3; Fri, 29 Jul 2016 06:00:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id BC90E68760; Fri, 29 Jul 2016 05:59:17 +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 71F0D680C3; Fri, 29 Jul 2016 05:59:06 +0000 (UTC) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by lists.linaro.org (Postfix) with ESMTPS id ADE66617CF for ; Fri, 29 Jul 2016 05:58:32 +0000 (UTC) Received: by mail-lf0-f44.google.com with SMTP id f93so64013752lfi.2 for ; Thu, 28 Jul 2016 22:58:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GyX0ye8XV4kp1/k35WLKtdO+82DEtlT44M728tierxY=; b=l1gIMS396yfQAecMHB05DRevY7YpLH2nWJbekusi4iww781uWKsyIRtQJUWQqHqqBx IVlFNTYeUO2ov6QKncjJQRRsleZrb3yUTY5pON2XBEfVPdmcFMipzX95xGRn5ujbj5lv Gf6tcR7OmDvYMYt6l07homEG0RitfV53fIyIUV19ow1Q+aSGscO1h7C6w1bwwYkeSv42 cGNU2pAu/hhXQZ7W2WF6JUrL5AqiaGosO2em4gQQBiEKxxgK9iVMJpaYdPdoqmRjzGi+ d8CJ3zbMEqLnStbSbYUR9WyrEXizNccHUnCNSPgxAEz4Z3k2LrKQOIwr3cKr1Rbozm98 V0uQ== X-Gm-Message-State: AEkoousyyWBzydbwAY+tsynZik26ADY4jWulfZV81G0X0rOCYll+w+bqPnn2qURP2hibHn3Ylcg= X-Received: by 10.25.37.18 with SMTP id l18mr15346442lfl.88.1469771911425; Thu, 28 Jul 2016 22:58:31 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id g88sm2513472ljg.26.2016.07.28.22.58.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jul 2016 22:58:30 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, balakrishna.garapati@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Fri, 29 Jul 2016 08:57:25 +0200 Message-Id: <1469775446-28009-5-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1469775446-28009-1-git-send-email-christophe.milard@linaro.org> References: <1469775446-28009-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2 4/5] test: validation: drv: adding the new drv interface X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" The new structure for validation tests aiming the drv interface of ODP is added (around a first DRV atomic test empty skeleton) Signed-off-by: Christophe Milard --- test/common_plat/m4/configure.m4 | 6 ++-- test/common_plat/validation/Makefile.am | 3 +- test/common_plat/validation/Makefile.inc | 16 ++++++++++ test/common_plat/validation/api/Makefile.inc | 17 +---------- test/common_plat/validation/drv/.gitignore | 2 ++ test/common_plat/validation/drv/Makefile.am | 6 ++++ test/common_plat/validation/drv/Makefile.inc | 1 + test/common_plat/validation/drv/README | 35 ++++++++++++++++++++++ test/common_plat/validation/drv/atomic/Makefile.am | 4 +++ .../validation/drv/atomic/atomic_main.c | 10 +++++++ test/linux-generic/Makefile.am | 2 ++ 11 files changed, 83 insertions(+), 19 deletions(-) create mode 100644 test/common_plat/validation/Makefile.inc create mode 100644 test/common_plat/validation/drv/.gitignore create mode 100644 test/common_plat/validation/drv/Makefile.am create mode 100644 test/common_plat/validation/drv/Makefile.inc create mode 100644 test/common_plat/validation/drv/README create mode 100644 test/common_plat/validation/drv/atomic/Makefile.am create mode 100644 test/common_plat/validation/drv/atomic/atomic_main.c -- 2.7.4 diff --git a/test/common_plat/m4/configure.m4 b/test/common_plat/m4/configure.m4 index be878bd..bfde6cb 100644 --- a/test/common_plat/m4/configure.m4 +++ b/test/common_plat/m4/configure.m4 @@ -7,6 +7,7 @@ AC_CONFIG_FILES([test/common_plat/Makefile test/common_plat/miscellaneous/Makefile test/common_plat/performance/Makefile test/common_plat/validation/Makefile + test/common_plat/validation/api/Makefile test/common_plat/validation/api/atomic/Makefile test/common_plat/validation/api/barrier/Makefile test/common_plat/validation/api/buffer/Makefile @@ -17,7 +18,6 @@ AC_CONFIG_FILES([test/common_plat/Makefile test/common_plat/validation/api/hash/Makefile test/common_plat/validation/api/init/Makefile test/common_plat/validation/api/lock/Makefile - test/common_plat/validation/api/Makefile test/common_plat/validation/api/packet/Makefile test/common_plat/validation/api/pktio/Makefile test/common_plat/validation/api/pool/Makefile @@ -30,4 +30,6 @@ AC_CONFIG_FILES([test/common_plat/Makefile test/common_plat/validation/api/thread/Makefile test/common_plat/validation/api/time/Makefile test/common_plat/validation/api/timer/Makefile - test/common_plat/validation/api/traffic_mngr/Makefile]) + test/common_plat/validation/api/traffic_mngr/Makefile + test/common_plat/validation/drv/Makefile + test/common_plat/validation/drv/atomic/Makefile]) diff --git a/test/common_plat/validation/Makefile.am b/test/common_plat/validation/Makefile.am index 5d525fb..ef58b25 100644 --- a/test/common_plat/validation/Makefile.am +++ b/test/common_plat/validation/Makefile.am @@ -1,3 +1,4 @@ if cunit_support - SUBDIRS = api + SUBDIRS = api \ + drv endif diff --git a/test/common_plat/validation/Makefile.inc b/test/common_plat/validation/Makefile.inc new file mode 100644 index 0000000..ffba620 --- /dev/null +++ b/test/common_plat/validation/Makefile.inc @@ -0,0 +1,16 @@ +include $(top_srcdir)/test/Makefile.inc + +COMMON_DIR = $(top_builddir)/test/common_plat/common + +#the following option ensure that option '-I.' is not passed to gcc, +#therefore distinguishing between '#include "X"' and '#include '. +#It allows common filenames (such as 'errno.h') to be used locally. +AUTOMAKE_OPTIONS = nostdinc + +AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common +AM_LDFLAGS += -static + +LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la +LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la +LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la +LIBODP = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la diff --git a/test/common_plat/validation/api/Makefile.inc b/test/common_plat/validation/api/Makefile.inc index ffba620..757ccad 100644 --- a/test/common_plat/validation/api/Makefile.inc +++ b/test/common_plat/validation/api/Makefile.inc @@ -1,16 +1 @@ -include $(top_srcdir)/test/Makefile.inc - -COMMON_DIR = $(top_builddir)/test/common_plat/common - -#the following option ensure that option '-I.' is not passed to gcc, -#therefore distinguishing between '#include "X"' and '#include '. -#It allows common filenames (such as 'errno.h') to be used locally. -AUTOMAKE_OPTIONS = nostdinc - -AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common -AM_LDFLAGS += -static - -LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la -LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la -LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la -LIBODP = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la +include $(top_srcdir)/test/common_plat/validation/Makefile.inc diff --git a/test/common_plat/validation/drv/.gitignore b/test/common_plat/validation/drv/.gitignore new file mode 100644 index 0000000..7e563b8 --- /dev/null +++ b/test/common_plat/validation/drv/.gitignore @@ -0,0 +1,2 @@ +*.log +*.trs diff --git a/test/common_plat/validation/drv/Makefile.am b/test/common_plat/validation/drv/Makefile.am new file mode 100644 index 0000000..0dae3c3 --- /dev/null +++ b/test/common_plat/validation/drv/Makefile.am @@ -0,0 +1,6 @@ +ODPDRV_MODULES = atomic + +SUBDIRS = $(ODPDRV_MODULES) + +#The tests will need to retain the deprecated test implementation +AM_CFLAGS += -Wno-deprecated-declarations diff --git a/test/common_plat/validation/drv/Makefile.inc b/test/common_plat/validation/drv/Makefile.inc new file mode 100644 index 0000000..757ccad --- /dev/null +++ b/test/common_plat/validation/drv/Makefile.inc @@ -0,0 +1 @@ +include $(top_srcdir)/test/common_plat/validation/Makefile.inc diff --git a/test/common_plat/validation/drv/README b/test/common_plat/validation/drv/README new file mode 100644 index 0000000..d1a9e6f --- /dev/null +++ b/test/common_plat/validation/drv/README @@ -0,0 +1,35 @@ +Copyright (c) 2016, Linaro Limited +All rights reserved. + +SPDX-License-Identifier: BSD-3-Clause + + +To add tests in here, please observe the rules listed below. This list +is a brief overview, for a more detailed explanation of the test +framework refer to the ODP Implementers' Guide, which can built as +follows: + + ./configure --enable-user-guides + make + +Output will be in doc/output/. If this fails, check the documentation +section of the DEPENDENCIES file. + +Rules for all tests under this tree: + +1. Tests must be placed in the directory of the module they belong to. + +2. Tests must be platform agnostic, i.e. + + - should be written in plain C only. + - may only use C standard library functions, CUnit functions and of + course ODP functions + - should be expected to pass on all ODP implementations + + Tests that do not follow these rules should be placed in the platform + specific test area (currently platform//test/). + +3. If a new ODP DRV module is created, please update the Makefile.am. + +4. Symbols exported from test libraries must respect the naming + convention detailed in the ODP Implementers' Guide. diff --git a/test/common_plat/validation/drv/atomic/Makefile.am b/test/common_plat/validation/drv/atomic/Makefile.am new file mode 100644 index 0000000..be48623 --- /dev/null +++ b/test/common_plat/validation/drv/atomic/Makefile.am @@ -0,0 +1,4 @@ +include ../Makefile.inc + +test_PROGRAMS = atomic_main$(EXEEXT) +dist_atomic_main_SOURCES = atomic_main.c diff --git a/test/common_plat/validation/drv/atomic/atomic_main.c b/test/common_plat/validation/drv/atomic/atomic_main.c new file mode 100644 index 0000000..44fb710 --- /dev/null +++ b/test/common_plat/validation/drv/atomic/atomic_main.c @@ -0,0 +1,10 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +int main(void) +{ + return 0; +} diff --git a/test/linux-generic/Makefile.am b/test/linux-generic/Makefile.am index f5cc52d..1cee6e7 100644 --- a/test/linux-generic/Makefile.am +++ b/test/linux-generic/Makefile.am @@ -2,6 +2,7 @@ include $(top_srcdir)/test/Makefile.inc TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/common_plat/validation ALL_API_VALIDATION_DIR = ${top_builddir}/test/common_plat/validation/api +ALL_DRV_VALIDATION_DIR = ${top_builddir}/test/common_plat/validation/drv SUBDIRS = @@ -33,6 +34,7 @@ TESTS = validation/api/pktio/pktio_run.sh \ $(ALL_API_VALIDATION_DIR)/traffic_mngr/traffic_mngr_main$(EXEEXT) \ $(ALL_API_VALIDATION_DIR)/shmem/shmem_main$(EXEEXT) \ $(ALL_API_VALIDATION_DIR)/system/system_main$(EXEEXT) \ + $(ALL_DRV_VALIDATION_DIR)/atomic/atomic_main$(EXEEXT) \ ring/ring_main$(EXEEXT) SUBDIRS += validation/api/pktio\