From patchwork Mon Jul 27 17:38:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51555 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 5E7F422D94 for ; Mon, 27 Jul 2015 17:45:36 +0000 (UTC) Received: by lbbvz8 with SMTP id vz8sf30056419lbb.2 for ; Mon, 27 Jul 2015 10:45:35 -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=F3Jpr2bXYTTA9mG3E/roPQuAA79yLkDMQ9AJsgw7jmQ=; b=F2ynbH0WQ+kCqcwiveRbZPGlqLga0prNaMJ2GuYiX0lO8ww3C5Dn/MgAE5Hi+9umrx 55SiWwZD49ftNT1/ITLFO3iW+vnlFk37miRI36CINEF0Q3ob9e0BUmzD7s/xLHNvSPTW 2bPGeZmzTyftuLnIlbb2lxLxry/m9Ijtyf+oWj1PAUrAhEk9r4Pow8MQBCsAlrwI+xwU zOlMEr6SZwC9p4RR/hWSPD4RRU7Y2D4prwmyDlz45gcIPVwh+OlHwzjD115sG/QgEqnE 0YHuLRs4I8beOEKeFJrH8olQFf4l9DUWCpI5m+F/drB7gKHCZUwDMBsTVZgFV2I+tUJo YgWQ== X-Gm-Message-State: ALoCoQk9wXI4/ySkYJIOmGvyavkSlQNS5Ry26rfKinrTf+vtpRjy392B8uxVlctX5l4fzEnhrwgo X-Received: by 10.180.205.202 with SMTP id li10mr5691223wic.5.1438019135338; Mon, 27 Jul 2015 10:45:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.105 with SMTP id x9ls703500laj.11.gmail; Mon, 27 Jul 2015 10:45:35 -0700 (PDT) X-Received: by 10.112.201.199 with SMTP id kc7mr28466840lbc.25.1438019135047; Mon, 27 Jul 2015 10:45:35 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id ba9si14624298lab.100.2015.07.27.10.45.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 10:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbqi7 with SMTP id qi7so58496472lbb.3 for ; Mon, 27 Jul 2015 10:45:34 -0700 (PDT) X-Received: by 10.112.55.207 with SMTP id u15mr27981517lbp.88.1438019134896; Mon, 27 Jul 2015 10:45:34 -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.7.198 with SMTP id l6csp1661618lba; Mon, 27 Jul 2015 10:45:33 -0700 (PDT) X-Received: by 10.140.237.21 with SMTP id i21mr29129749qhc.102.1438019132810; Mon, 27 Jul 2015 10:45:32 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z63si12925366qgd.0.2015.07.27.10.45.31; Mon, 27 Jul 2015 10:45:32 -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 D24BE61DD5; Mon, 27 Jul 2015 17:45:31 +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_H2, 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 A398661DC0; Mon, 27 Jul 2015 17:40:38 +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 2559461E18; Mon, 27 Jul 2015 17:40:34 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by lists.linaro.org (Postfix) with ESMTPS id 6EE1661DC0 for ; Mon, 27 Jul 2015 17:39:20 +0000 (UTC) Received: by lbbzr7 with SMTP id zr7so58463310lbb.1 for ; Mon, 27 Jul 2015 10:39:19 -0700 (PDT) X-Received: by 10.112.147.201 with SMTP id tm9mr28194960lbb.40.1438018759311; Mon, 27 Jul 2015 10:39:19 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id 4sm4027442lai.36.2015.07.27.10.39.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jul 2015 10:39:18 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Mon, 27 Jul 2015 19:38:42 +0200 Message-Id: <1438018732-2778-11-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438018732-2778-1-git-send-email-christophe.milard@linaro.org> References: <1438018732-2778-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv3 10/20] 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.217.179 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 bfdf525..5eb7a56 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -445,34 +445,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; @@ -487,7 +487,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); @@ -510,7 +510,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; @@ -534,7 +534,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; @@ -559,7 +559,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; @@ -575,7 +575,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; @@ -593,7 +593,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; @@ -627,7 +627,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"); @@ -659,7 +659,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; @@ -688,7 +688,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}, @@ -704,7 +704,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 ccf5268..1749d5d 100644 --- a/test/validation/pktio/pktio.h +++ b/test/validation/pktio/pktio.h @@ -7,6 +7,33 @@ #ifndef _ODP_TEST_PKTIO_H_ #define _ODP_TEST_PKTIO_H_ +#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 registry: */ +extern CU_SuiteInfo pktio_suites[]; + +/* main test program: */ int pktio_main(void); #endif