From patchwork Fri Jul 24 11:27:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51423 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 7687E20323 for ; Fri, 24 Jul 2015 11:35:28 +0000 (UTC) Received: by laef2 with SMTP id f2sf6690636lae.0 for ; Fri, 24 Jul 2015 04:35:27 -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=kyqN+YZNPRiWh76lG+j+atYcXzDEWm8Tw2DEWTCKV/Y=; b=VKvK7mnNWZepVIMV9OYi3gdxmmTfBFP7+Z60qg8ObPZCJeZnW2vW0n/vsn3DkV7kwD iTRLsCyTPQ/f9ag/n7Tun1EicHxrS6ez2CV6DdY9eKqUJD7kNnuoazNzJctd1dV4w3gY R1ZnGIW+C47OHlHkVEL0l3N4MIZE0eAnFzv54MU+PcP+Ecxlnle9GXEx/kEm8RS4F1y0 ccaV+FqWMr5fSMbBWrKvyTUeWBbVEMK1Vmn6V/VCHv6TkTQ9rMsaA2P9mhh0G1M2hhgP BO2ce3Zw2n0auBrVm4/NbNmVtDTy4GMFXY9cjgk0L7XcgOHQJ2gC4AUv6Tw114IVT7Ja 7AFA== X-Gm-Message-State: ALoCoQlieTgX8TQdBx+sLAPMXfDrxDlO/nCMG1s2whJFPrEnZxCZTNt07rM3oAve3vQpTOrqjxaX X-Received: by 10.180.35.162 with SMTP id i2mr1484238wij.6.1437737727434; Fri, 24 Jul 2015 04:35:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.231 with SMTP id e7ls355051laa.34.gmail; Fri, 24 Jul 2015 04:35:27 -0700 (PDT) X-Received: by 10.112.164.35 with SMTP id yn3mr13021591lbb.91.1437737727201; Fri, 24 Jul 2015 04:35:27 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id e10si7270773lam.131.2015.07.24.04.35.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 04:35:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lagw2 with SMTP id w2so12358430lag.3 for ; Fri, 24 Jul 2015 04:35:27 -0700 (PDT) X-Received: by 10.152.25.228 with SMTP id f4mr13009277lag.112.1437737727058; Fri, 24 Jul 2015 04:35:27 -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 l6csp1117488lba; Fri, 24 Jul 2015 04:35:26 -0700 (PDT) X-Received: by 10.140.102.144 with SMTP id w16mr19190813qge.82.1437737725382; Fri, 24 Jul 2015 04:35:25 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 36si9657704qkx.68.2015.07.24.04.35.24; Fri, 24 Jul 2015 04:35:25 -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 9936261B14; Fri, 24 Jul 2015 11:35:24 +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 C933661806; Fri, 24 Jul 2015 11:29:53 +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 E891B61806; Fri, 24 Jul 2015 11:29:49 +0000 (UTC) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by lists.linaro.org (Postfix) with ESMTPS id 550A461B60 for ; Fri, 24 Jul 2015 11:28:14 +0000 (UTC) Received: by lbbqi7 with SMTP id qi7so13154139lbb.3 for ; Fri, 24 Jul 2015 04:28:13 -0700 (PDT) X-Received: by 10.152.88.106 with SMTP id bf10mr13035237lab.1.1437737293316; Fri, 24 Jul 2015 04:28:13 -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 y1sm1582274lal.39.2015.07.24.04.28.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jul 2015 04:28:12 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Fri, 24 Jul 2015 13:27:29 +0200 Message-Id: <1437737259-16953-11-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437737259-16953-1-git-send-email-christophe.milard@linaro.org> References: <1437737259-16953-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 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.215.50 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..66c9e86 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 registery: */ +extern CU_SuiteInfo pktio_suites[]; + +/* main test program: */ int pktio_main(void); #endif