From patchwork Thu Jun 4 18:06:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 49550 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A7B8D21562 for ; Thu, 4 Jun 2015 18:12:13 +0000 (UTC) Received: by wgme6 with SMTP id e6sf11971387wgm.3 for ; Thu, 04 Jun 2015 11:12:13 -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=I2RGn902vY9rQ4RifNX9uX9rmxp0CGvuCh2mFoM7UAk=; b=RgLq4GZCy4ejv+NLD36GmWrANBWVVqsNPPiY57AGXdCXf36k7X5VNvi+8cMnUhgcqy qp7ekQ+gFYwxBA+YsL3I7cpE7sHUwHPk4VxxN9SJlLScw7bZrxy5y/lEFBXMDEDDD2fF AxItenLMAbKhqWTicOkeZlLY2B0K/adlZ6Y+CkhYXPF13dKhtVnukjgZ++7TRX86VHJt OZciW8eloGHYf0iurEeIVW5Lth0DKXC8tjogwpM+sXKHQ+ojHZ5yqI0uLx8ccWvTFjP7 k3DbpkI5m4/o2olW/5+6uxvB5pnDz1DXmjWcY3kv3tivtxUVA+AGyx/rYspFE0H1R8Mi gstQ== X-Gm-Message-State: ALoCoQn2IUpcGDYyERjQZlupqHlq7oRUoXN1K+IlM5LLKfy4nDybCXxfDGFayvx36qCa21POEuu5 X-Received: by 10.152.26.134 with SMTP id l6mr36606128lag.10.1433441533007; Thu, 04 Jun 2015 11:12:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.51 with SMTP id o19ls241339laa.95.gmail; Thu, 04 Jun 2015 11:12:12 -0700 (PDT) X-Received: by 10.152.3.97 with SMTP id b1mr348389lab.54.1433441532860; Thu, 04 Jun 2015 11:12:12 -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 k5si2512549lbd.83.2015.06.04.11.12.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jun 2015 11:12:12 -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 labko7 with SMTP id ko7so37839992lab.2 for ; Thu, 04 Jun 2015 11:12:12 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr38574353lah.76.1433441532718; Thu, 04 Jun 2015 11:12:12 -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 hn6csp796629lbb; Thu, 4 Jun 2015 11:12:11 -0700 (PDT) X-Received: by 10.140.95.85 with SMTP id h79mr43625030qge.68.1433441530702; Thu, 04 Jun 2015 11:12:10 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 84si4879544qkq.78.2015.06.04.11.12.09; Thu, 04 Jun 2015 11:12:10 -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 2EB0562097; Thu, 4 Jun 2015 18:12:09 +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 75E5F620B7; Thu, 4 Jun 2015 18:08:27 +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 4A16962098; Thu, 4 Jun 2015 18:08:11 +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 255A96183B for ; Thu, 4 Jun 2015 18:07:32 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2so32131068lbb.3 for ; Thu, 04 Jun 2015 11:07:31 -0700 (PDT) X-Received: by 10.112.147.201 with SMTP id tm9mr39028164lbb.40.1433441250843; Thu, 04 Jun 2015 11:07:30 -0700 (PDT) Received: from localhost.localdomain (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id x9sm955058lag.18.2015.06.04.11.07.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jun 2015 11:07:30 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Thu, 4 Jun 2015 20:06:55 +0200 Message-Id: <1433441220-25295-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1433441220-25295-1-git-send-email-christophe.milard@linaro.org> References: <1433441220-25295-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv3 3/8] validation: renaming in odp_pktio.c 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 Renaming of things which may be, one day, exported in a lib. This renaming is important, as it creates consistency between test symbols, which is needed if things get eventually exported in the lib. Also, tests are often created from other tests: Fixing the first exemples will help geting future tests better. Things that are candidate to be exported in the lib in the future have been named as follows: -Tests, i.e. functions which are used in CUNIT testsuites are named: _test_* -Test arrays, i.e. arrays of CU_TestInfo, listing the test functions belonging to a suite, are called: _suite[_*] where the possible suffix can be used if many suites are declared. -CUNIT suite init and termination functions are called: _suite[_*]_init() and _suite[_*]_term() respectively. -Suite arrays, i.e. arrays of CU_SuiteInfo used in executables are called: _suites[_*] where the possible suffix identifies the executable using it, if many. -Main function(s), are called: _main[_*] where the possible suffix identifies the executable using it Signed-off-by: Christophe Milard --- test/validation/odp_pktio.c | 68 ++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index 592136f..3ac5df9 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -404,7 +404,7 @@ static void pktio_txrx_multi(pktio_info_t *pktio_a, pktio_info_t *pktio_b, CU_ASSERT(i == num_pkts); } -static void pktio_test_txrx(odp_queue_type_t q_type, int num_pkts) +static void test_txrx(odp_queue_type_t q_type, int num_pkts) { int ret, i, if_b; pktio_info_t pktios[MAX_NUM_IFACES]; @@ -440,34 +440,34 @@ static void pktio_test_txrx(odp_queue_type_t q_type, int num_pkts) } } -static void test_odp_pktio_poll_queue(void) +static void pktio_test_poll_queue(void) { - pktio_test_txrx(ODP_QUEUE_TYPE_POLL, 1); + test_txrx(ODP_QUEUE_TYPE_POLL, 1); } -static void test_odp_pktio_poll_multi(void) +static void pktio_test_poll_multi(void) { - pktio_test_txrx(ODP_QUEUE_TYPE_POLL, 4); + test_txrx(ODP_QUEUE_TYPE_POLL, 4); } -static void test_odp_pktio_sched_queue(void) +static void pktio_test_sched_queue(void) { - pktio_test_txrx(ODP_QUEUE_TYPE_SCHED, 1); + test_txrx(ODP_QUEUE_TYPE_SCHED, 1); } -static void test_odp_pktio_sched_multi(void) +static void pktio_test_sched_multi(void) { - pktio_test_txrx(ODP_QUEUE_TYPE_SCHED, 4); + test_txrx(ODP_QUEUE_TYPE_SCHED, 4); } -static void test_odp_pktio_jumbo(void) +static void pktio_test_jumbo(void) { packet_len = PKT_LEN_JUMBO; - test_odp_pktio_sched_multi(); + pktio_test_sched_multi(); packet_len = PKT_LEN_NORMAL; } -static void test_odp_pktio_mtu(void) +static void pktio_test_mtu(void) { int ret; int mtu; @@ -484,7 +484,7 @@ static void test_odp_pktio_mtu(void) return; } -static void test_odp_pktio_promisc(void) +static void pktio_test_promisc(void) { int ret; odp_pktio_t pktio = create_pktio(iface_name[0], 0); @@ -509,7 +509,7 @@ static void test_odp_pktio_promisc(void) return; } -static void test_odp_pktio_mac(void) +static void pktio_test_mac(void) { unsigned char mac_addr[ODPH_ETHADDR_LEN]; int mac_len; @@ -535,7 +535,7 @@ static void test_odp_pktio_mac(void) return; } -static void test_odp_pktio_inq_remdef(void) +static 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 test_odp_pktio_inq_remdef(void) CU_ASSERT(odp_pktio_close(pktio) == 0); } -static void test_odp_pktio_open(void) +static void pktio_test_open(void) { odp_pktio_t pktio; int i; @@ -575,7 +575,7 @@ static void test_odp_pktio_open(void) CU_ASSERT(pktio == ODP_PKTIO_INVALID); } -static void test_odp_pktio_lookup(void) +static void pktio_test_lookup(void) { odp_pktio_t pktio, pktio_inval; @@ -593,7 +593,7 @@ static void test_odp_pktio_lookup(void) CU_ASSERT(odp_pktio_lookup(iface_name[0]) == ODP_PKTIO_INVALID); } -static void test_odp_pktio_inq(void) +static 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 init_pktio_suite(void) +static 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 init_pktio_suite(void) return 0; } -static int term_pktio_suite(void) +static int pktio_suite_term(void) { char pool_name[ODP_POOL_NAME_LEN]; odp_pool_t pool; @@ -688,25 +688,25 @@ static int term_pktio_suite(void) return ret; } -static CU_TestInfo pktio_tests[] = { - {"pktio open", test_odp_pktio_open}, - {"pktio lookup", test_odp_pktio_lookup}, - {"pktio inq", test_odp_pktio_inq}, - {"pktio poll queues", test_odp_pktio_poll_queue}, - {"pktio poll multi", test_odp_pktio_poll_multi}, - {"pktio sched queues", test_odp_pktio_sched_queue}, - {"pktio sched multi", test_odp_pktio_sched_multi}, - {"pktio jumbo frames", test_odp_pktio_jumbo}, - {"pktio mtu", test_odp_pktio_mtu}, - {"pktio promisc mode", test_odp_pktio_promisc}, - {"pktio mac", test_odp_pktio_mac}, - {"pktio inq_remdef", test_odp_pktio_inq_remdef}, +static CU_TestInfo pktio_suite[] = { + {"pktio open", pktio_test_open}, + {"pktio lookup", pktio_test_lookup}, + {"pktio inq", pktio_test_inq}, + {"pktio poll queues", pktio_test_poll_queue}, + {"pktio poll multi", pktio_test_poll_multi}, + {"pktio sched queues", pktio_test_sched_queue}, + {"pktio sched multi", pktio_test_sched_multi}, + {"pktio jumbo frames", pktio_test_jumbo}, + {"pktio mtu", pktio_test_mtu}, + {"pktio promisc mode", pktio_test_promisc}, + {"pktio mac", pktio_test_mac}, + {"pktio inq_remdef", pktio_test_inq_remdef}, CU_TEST_INFO_NULL }; static CU_SuiteInfo pktio_suites[] = { {"Packet I/O", - init_pktio_suite, term_pktio_suite, NULL, NULL, pktio_tests}, + pktio_suite_init, pktio_suite_term, NULL, NULL, pktio_suite}, CU_SUITE_INFO_NULL };