From patchwork Fri Jul 10 00: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: 50996 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 74EEE228E5 for ; Fri, 10 Jul 2015 00:48:59 +0000 (UTC) Received: by lbbpo10 with SMTP id po10sf36268102lbb.1 for ; Thu, 09 Jul 2015 17:48:58 -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=R6nJWC6zk8IvfxR/HE4dgBGzpvLVgvyJLiOkDagJTd4=; b=NyYt0Ulk6fjM850z96w4Kc8JUWcQI+XcmBRwLUKwsP9XDZunlpbbMt2kg4wsjBhIms 0HcXpFnr0PmSzlxaXWCn3y2/5zDGjl7xknA1sv6zsXXpntXvUlPJWhWM+H3cbvWMUJ7T hQFR3WeHAnodx8V111hWQn2cYlB9wJokCoKLJvuIu8MrSWSEqxfiqqmkqXp+dC8sSunk Gu8Mq3rLW3ey5mArON8FsmuAcoL5Xa53bTevrPGxh+iBzeK7L6uTMWQJYAx9knOcSRty nU6kjuB/Eok3jQjnBDfyGZai/+Lj+DS6aZz9RTQW2HZKF9RAdgdTjOM9Vwg+tkskDjs5 3KFg== X-Gm-Message-State: ALoCoQmkA3zbnGh8OaILJzUOhfCBv6lKqD19mGNZ1C1GuEQRSAfn0bd/ftwXwVJUSPLSyp5ak2Cc X-Received: by 10.194.5.229 with SMTP id v5mr9391693wjv.0.1436489338296; Thu, 09 Jul 2015 17:48:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.235 with SMTP id r11ls616284lal.108.gmail; Thu, 09 Jul 2015 17:48:58 -0700 (PDT) X-Received: by 10.112.163.129 with SMTP id yi1mr17671097lbb.77.1436489338073; Thu, 09 Jul 2015 17:48:58 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id o3si5851619laj.143.2015.07.09.17.48.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 17:48:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by laar3 with SMTP id r3so256651573laa.0 for ; Thu, 09 Jul 2015 17:48:58 -0700 (PDT) X-Received: by 10.113.4.105 with SMTP id cd9mr11537123lbd.106.1436489337931; Thu, 09 Jul 2015 17:48:57 -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 hn6csp1011663lbb; Thu, 9 Jul 2015 17:48:57 -0700 (PDT) X-Received: by 10.140.28.247 with SMTP id 110mr17703348qgz.16.1436489336676; Thu, 09 Jul 2015 17:48:56 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o90si8880562qgd.117.2015.07.09.17.48.56; Thu, 09 Jul 2015 17:48:56 -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 040DB6207A; Fri, 10 Jul 2015 00:48:56 +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 A150B62094; Fri, 10 Jul 2015 00:45:28 +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 BD3E36206D; Fri, 10 Jul 2015 00:45:15 +0000 (UTC) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by lists.linaro.org (Postfix) with ESMTPS id 7FF4562072 for ; Fri, 10 Jul 2015 00:44:48 +0000 (UTC) Received: by laar3 with SMTP id r3so256612027laa.0 for ; Thu, 09 Jul 2015 17:44:47 -0700 (PDT) X-Received: by 10.112.50.66 with SMTP id a2mr17471338lbo.68.1436489087462; Thu, 09 Jul 2015 17:44:47 -0700 (PDT) Received: from localhost.localdomain (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id o18sm1936473lbg.1.2015.07.09.17.44.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 17:44:46 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Fri, 10 Jul 2015 02:44:18 +0200 Message-Id: <1436489068-8929-8-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436489068-8929-1-git-send-email-christophe.milard@linaro.org> References: <1436489068-8929-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 07/17] validation: pktio: lib populated 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.51 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 test symbols are now exported in the module lib. Signed-off-by: Christophe Milard --- test/validation/pktio/pktio.c | 32 ++++++++++++++++---------------- test/validation/pktio/pktio.h | 27 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index 82ced5c..36c2d1c 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -442,34 +442,34 @@ static void test_txrx(odp_queue_type_t q_type, int num_pkts) } } -static void pktio_test_poll_queue(void) +void pktio_test_poll_queue(void) { test_txrx(ODP_QUEUE_TYPE_POLL, 1); } -static void pktio_test_poll_multi(void) +void pktio_test_poll_multi(void) { test_txrx(ODP_QUEUE_TYPE_POLL, 4); } -static void pktio_test_sched_queue(void) +void pktio_test_sched_queue(void) { test_txrx(ODP_QUEUE_TYPE_SCHED, 1); } -static void pktio_test_sched_multi(void) +void pktio_test_sched_multi(void) { test_txrx(ODP_QUEUE_TYPE_SCHED, 4); } -static void pktio_test_jumbo(void) +void pktio_test_jumbo(void) { packet_len = PKT_LEN_JUMBO; pktio_test_sched_multi(); packet_len = PKT_LEN_NORMAL; } -static void pktio_test_mtu(void) +void pktio_test_mtu(void) { int ret; int mtu; @@ -484,7 +484,7 @@ static void pktio_test_mtu(void) CU_ASSERT(ret == 0); } -static void pktio_test_promisc(void) +void pktio_test_promisc(void) { int ret; odp_pktio_t pktio = create_pktio(iface_name[0], 0); @@ -507,7 +507,7 @@ static void pktio_test_promisc(void) CU_ASSERT(ret == 0); } -static void pktio_test_mac(void) +void pktio_test_mac(void) { unsigned char mac_addr[ODPH_ETHADDR_LEN]; int mac_len; @@ -531,7 +531,7 @@ static void pktio_test_mac(void) CU_ASSERT(0 == ret); } -static void pktio_test_inq_remdef(void) +void pktio_test_inq_remdef(void) { odp_pktio_t pktio = create_pktio(iface_name[0], 0); odp_queue_t inq; @@ -555,7 +555,7 @@ static void pktio_test_inq_remdef(void) CU_ASSERT(odp_pktio_close(pktio) == 0); } -static void pktio_test_open(void) +void pktio_test_open(void) { odp_pktio_t pktio; int i; @@ -571,7 +571,7 @@ static void pktio_test_open(void) CU_ASSERT(pktio == ODP_PKTIO_INVALID); } -static void pktio_test_lookup(void) +void pktio_test_lookup(void) { odp_pktio_t pktio, pktio_inval; @@ -589,7 +589,7 @@ static void pktio_test_lookup(void) CU_ASSERT(odp_pktio_lookup(iface_name[0]) == ODP_PKTIO_INVALID); } -static void pktio_test_inq(void) +void pktio_test_inq(void) { odp_pktio_t pktio; @@ -623,7 +623,7 @@ static int create_pool(const char *iface, int num) return 0; } -static int pktio_suite_init(void) +int pktio_suite_init(void) { odp_atomic_init_u32(&ip_seq, 0); iface_name[0] = getenv("ODP_PKTIO_IF0"); @@ -655,7 +655,7 @@ static int pktio_suite_init(void) return 0; } -static int pktio_suite_term(void) +int pktio_suite_term(void) { char pool_name[ODP_POOL_NAME_LEN]; odp_pool_t pool; @@ -684,7 +684,7 @@ static int pktio_suite_term(void) return ret; } -static CU_TestInfo pktio_suite[] = { +CU_TestInfo pktio_suite[] = { {"pktio open", pktio_test_open}, {"pktio lookup", pktio_test_lookup}, {"pktio inq", pktio_test_inq}, @@ -700,7 +700,7 @@ static CU_TestInfo pktio_suite[] = { CU_TEST_INFO_NULL }; -static CU_SuiteInfo pktio_suites[] = { +CU_SuiteInfo pktio_suites[] = { {"Packet I/O", pktio_suite_init, pktio_suite_term, NULL, NULL, pktio_suite}, CU_SUITE_INFO_NULL diff --git a/test/validation/pktio/pktio.h b/test/validation/pktio/pktio.h index 4b6d512..32feb06 100644 --- a/test/validation/pktio/pktio.h +++ b/test/validation/pktio/pktio.h @@ -4,4 +4,31 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include + +/* test functions: */ +void pktio_test_poll_queue(void); +void pktio_test_poll_multi(void); +void pktio_test_sched_queue(void); +void pktio_test_sched_multi(void); +void pktio_test_jumbo(void); +void pktio_test_mtu(void); +void pktio_test_promisc(void); +void pktio_test_mac(void); +void pktio_test_inq_remdef(void); +void pktio_test_open(void); +void pktio_test_lookup(void); +void pktio_test_inq(void); + +/* test arrays: */ +extern CU_TestInfo pktio_suite[]; + +/* test array init/term functions: */ +int pktio_suite_term(void); +int pktio_suite_init(void); + +/* test registery: */ +extern CU_SuiteInfo pktio_suites[]; + +/* main test program: */ int pktio_main(void);