From patchwork Wed Jun 10 16:54:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 49716 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C3635245D4 for ; Wed, 10 Jun 2015 16:56:54 +0000 (UTC) Received: by lbcue7 with SMTP id ue7sf13799509lbc.3 for ; Wed, 10 Jun 2015 09:56:53 -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=ojMWHW3FUFHj2o86gCNaJIs/KsxzL0JcrVUBsoirGfg=; b=ch5+EKE3r737f4+niR0zU9b9TAHCdTzdQYWlIF3Chf6UGtP+M/YeT5G4yCknD3SaKP IWb417RZN5cYkcxItPADoittqx6W4EJqEiZWJiChAgvqNIARI4ali7AvRfzV9Q2/OhFh HkvKfKSgUVG/RRC3XQ6gfB1pSjTb3Ex4VkumxREJkHKz2s54vroIQ3Oqv68rK7rVYHw7 M13HKHE9S8ZrmzQtvQz412NmpS0W3r6wOaMdkmBUasiBzmzN/dACEfLF9LM18gdpmHHX igfpipXB+icflkIBxXK9h6uWbI/rra+3+2nxtojUsdNIL8RIemPm+EBOZjCvoVflw+MS SSxQ== X-Gm-Message-State: ALoCoQm0OP/7irpLB8ofWbA3HlkLeoq2Xtflota/SDByzgPrzdTh/LD18aLiNWXyAiSHteEK8SkE X-Received: by 10.112.118.162 with SMTP id kn2mr3759765lbb.22.1433955412831; Wed, 10 Jun 2015 09:56:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.36 with SMTP id t4ls277909lal.99.gmail; Wed, 10 Jun 2015 09:56:52 -0700 (PDT) X-Received: by 10.112.93.230 with SMTP id cx6mr5141627lbb.65.1433955412610; Wed, 10 Jun 2015 09:56:52 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id q6si9496248lbs.169.2015.06.10.09.56.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jun 2015 09:56:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbcue7 with SMTP id ue7so32603905lbc.0 for ; Wed, 10 Jun 2015 09:56:52 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr5267954lbb.56.1433955412469; Wed, 10 Jun 2015 09:56:52 -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 hn6csp3461416lbb; Wed, 10 Jun 2015 09:56:51 -0700 (PDT) X-Received: by 10.55.25.134 with SMTP id 6mr8717127qkz.13.1433955410915; Wed, 10 Jun 2015 09:56:50 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j130si2774162qhc.51.2015.06.10.09.56.50; Wed, 10 Jun 2015 09:56:50 -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 18F5D61837; Wed, 10 Jun 2015 16:56:50 +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 2FECA61F63; Wed, 10 Jun 2015 16:55:36 +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 2D21F61F5E; Wed, 10 Jun 2015 16:55:26 +0000 (UTC) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by lists.linaro.org (Postfix) with ESMTPS id D0EEB61B59 for ; Wed, 10 Jun 2015 16:54:53 +0000 (UTC) Received: by laew7 with SMTP id w7so37368910lae.1 for ; Wed, 10 Jun 2015 09:54:52 -0700 (PDT) X-Received: by 10.112.118.49 with SMTP id kj17mr5175649lbb.62.1433955292741; Wed, 10 Jun 2015 09:54:52 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id i1sm2328544lae.45.2015.06.10.09.54.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jun 2015 09:54:51 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 10 Jun 2015 18:54:20 +0200 Message-Id: <1433955265-4180-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433955265-4180-1-git-send-email-christophe.milard@linaro.org> References: <1433955265-4180-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv5 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.217.169 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 Reviewed-by: Mike Holmes Reviewed-by: Stuart Haslam --- 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 c347913..e5f7507 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -405,7 +405,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]; @@ -441,34 +441,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; @@ -485,7 +485,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); @@ -510,7 +510,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; @@ -536,7 +536,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; @@ -560,7 +560,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; @@ -576,7 +576,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; @@ -594,7 +594,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; @@ -628,7 +628,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"); @@ -660,7 +660,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; @@ -689,25 +689,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 };