From patchwork Wed Jul 1 10:05:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50514 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3AC67214B3 for ; Wed, 1 Jul 2015 10:07:25 +0000 (UTC) Received: by lagh6 with SMTP id h6sf11050863lag.0 for ; Wed, 01 Jul 2015 03:07:24 -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=fpF3ZmD0QL6OjGl/06UNBiOOzkZQaab8bJE/RUuZTjc=; b=ja8SHglpin7iejsANS2wpuu8poG4W5q7e6EQvLd6SFYcLN3h30Kq6YbvoH5CzDgehM stXlBBAszo4qiSdV3toxz7SHRoEUV6NQtsIJqchiMDMz6y4mgzrnZF+RcFyhWSZmlhrj 7rkx6hhndMz6yM4i62zT8SYdRrxsSLvB2f1HDXFx0iJ43POW+sVcjsazFo9UtNg+LDZU 5VXwKGWXKFRiDEe0+MpeENvkLTkBA+QZmioV2FEZpd9ycaDDryDSaKtJPP53Lu9zPVOu xvTbrLEhS8x2c+OeOI6NgLEWJSU2GshmRhcTCr0dLQyKWKpPsy80i7U3TW3ELzeSlyhM ktSA== X-Gm-Message-State: ALoCoQluBYURjay/fwGYXggxPEueUDfdnjxVPORhrJMX4+ylnQzxgFu8lZXNQ7od5qo85I+yV15A X-Received: by 10.112.181.37 with SMTP id dt5mr3250289lbc.10.1435745244244; Wed, 01 Jul 2015 03:07:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.130 with SMTP id b2ls141671lah.97.gmail; Wed, 01 Jul 2015 03:07:23 -0700 (PDT) X-Received: by 10.152.23.167 with SMTP id n7mr24400784laf.108.1435745243842; Wed, 01 Jul 2015 03:07:23 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id sc4si1275585lbb.99.2015.07.01.03.07.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2015 03:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagc2 with SMTP id c2so37302646lag.3 for ; Wed, 01 Jul 2015 03:07:23 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr24362766lbc.19.1435745243731; Wed, 01 Jul 2015 03:07:23 -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 hn6csp494446lbb; Wed, 1 Jul 2015 03:07:22 -0700 (PDT) X-Received: by 10.140.106.196 with SMTP id e62mr31749059qgf.42.1435745241797; Wed, 01 Jul 2015 03:07:21 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r3si1626320qkh.13.2015.07.01.03.07.20; Wed, 01 Jul 2015 03:07:21 -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 DB76E61F1E; Wed, 1 Jul 2015 10:07:20 +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 859D161E41; Wed, 1 Jul 2015 10:06:45 +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 03CA861E2D; Wed, 1 Jul 2015 10:06:41 +0000 (UTC) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by lists.linaro.org (Postfix) with ESMTPS id 5B16A61CC6 for ; Wed, 1 Jul 2015 10:06:39 +0000 (UTC) Received: by lagc2 with SMTP id c2so37290442lag.3 for ; Wed, 01 Jul 2015 03:06:37 -0700 (PDT) X-Received: by 10.152.5.167 with SMTP id t7mr19127604lat.112.1435745197868; Wed, 01 Jul 2015 03:06:37 -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 ew6sm370004lbc.40.2015.07.01.03.06.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jul 2015 03:06:37 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 1 Jul 2015 12:05:38 +0200 Message-Id: <1435745141-1078-3-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435745141-1078-1-git-send-email-christophe.milard@linaro.org> References: <1435745141-1078-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 2/5] validation: renaming in odp_cpumask.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.44 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_cpumask.c | 60 +++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/test/validation/odp_cpumask.c b/test/validation/odp_cpumask.c index 5986329..958cb59 100644 --- a/test/validation/odp_cpumask.c +++ b/test/validation/odp_cpumask.c @@ -81,7 +81,7 @@ static unsigned int get_max_number_of_cpus_in_a_mask(void) } -static void test_odp_cpumask_to_from_str(void) +static void cpumask_test_odp_cpumask_to_from_str(void) { odp_cpumask_t mask; int32_t str_sz; @@ -153,7 +153,7 @@ static void test_odp_cpumask_to_from_str(void) free(buf_in); } -static void test_odp_cpumask_equal(void) +static void cpumask_test_odp_cpumask_equal(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -184,7 +184,7 @@ static void test_odp_cpumask_equal(void) CU_ASSERT_FALSE(odp_cpumask_equal(&mask1, &mask3)); } -static void test_odp_cpumask_zero(void) +static void cpumask_test_odp_cpumask_zero(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -194,7 +194,7 @@ static void test_odp_cpumask_zero(void) CU_ASSERT(odp_cpumask_equal(&mask1, &mask2)); } -static void test_odp_cpumask_set(void) +static void cpumask_test_odp_cpumask_set(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -215,7 +215,7 @@ static void test_odp_cpumask_set(void) CU_ASSERT(odp_cpumask_equal(&mask1, &mask2)); } -static void test_odp_cpumask_clr(void) +static void cpumask_test_odp_cpumask_clr(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -242,7 +242,7 @@ static void test_odp_cpumask_clr(void) CU_ASSERT(odp_cpumask_equal(&mask1, &mask2)); } -static void test_odp_cpumask_isset(void) +static void cpumask_test_odp_cpumask_isset(void) { odp_cpumask_t mask1; @@ -262,7 +262,7 @@ static void test_odp_cpumask_isset(void) CU_ASSERT_FALSE(odp_cpumask_isset(&mask1, 3)); } -static void test_odp_cpumask_count(void) +static void cpumask_test_odp_cpumask_count(void) { odp_cpumask_t mask1; @@ -279,7 +279,7 @@ static void test_odp_cpumask_count(void) CU_ASSERT(odp_cpumask_count(&mask1) == 2); } -static void test_odp_cpumask_and(void) +static void cpumask_test_odp_cpumask_and(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -314,7 +314,7 @@ static void test_odp_cpumask_and(void) CU_ASSERT(odp_cpumask_equal(&mask3, &mask4)); } -static void test_odp_cpumask_or(void) +static void cpumask_test_odp_cpumask_or(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -349,7 +349,7 @@ static void test_odp_cpumask_or(void) CU_ASSERT(odp_cpumask_equal(&mask3, &mask4)); } -static void test_odp_cpumask_xor(void) +static void cpumask_test_odp_cpumask_xor(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -384,7 +384,7 @@ static void test_odp_cpumask_xor(void) CU_ASSERT(odp_cpumask_equal(&mask3, &mask4)); } -static void test_odp_cpumask_copy(void) +static void cpumask_test_odp_cpumask_copy(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; @@ -393,7 +393,7 @@ static void test_odp_cpumask_copy(void) CU_ASSERT(odp_cpumask_equal(&mask1, &mask2)); } -static void test_odp_cpumask_first(void) +static void cpumask_test_odp_cpumask_first(void) { odp_cpumask_t mask1; @@ -412,7 +412,7 @@ static void test_odp_cpumask_first(void) CU_ASSERT(odp_cpumask_first(&mask1) == 1); } -static void test_odp_cpumask_last(void) +static void cpumask_test_odp_cpumask_last(void) { odp_cpumask_t mask1; @@ -431,7 +431,7 @@ static void test_odp_cpumask_last(void) CU_ASSERT(odp_cpumask_last(&mask1) == 3); } -static void test_odp_cpumask_next(void) +static void cpumask_test_odp_cpumask_next(void) { unsigned int i; int expected[] = {1, 3, 3, -1}; @@ -455,26 +455,26 @@ static void test_odp_cpumask_next(void) CU_ASSERT(odp_cpumask_next(&mask1, i) == expected[i]); } -static CU_TestInfo test_odp_cpumask[] = { - {"odp_cpumask_to/from_str()", test_odp_cpumask_to_from_str}, - {"odp_cpumask_equal()" , test_odp_cpumask_equal}, - {"odp_cpumask_zero()" , test_odp_cpumask_zero}, - {"odp_cpumask_set()" , test_odp_cpumask_set}, - {"odp_cpumask_clr()" , test_odp_cpumask_clr}, - {"odp_cpumask_isset()" , test_odp_cpumask_isset}, - {"odp_cpumask_count()" , test_odp_cpumask_count}, - {"odp_cpumask_and()" , test_odp_cpumask_and}, - {"odp_cpumask_or()" , test_odp_cpumask_or}, - {"odp_cpumask_xor()" , test_odp_cpumask_xor}, - {"odp_cpumask_copy()" , test_odp_cpumask_copy}, - {"odp_cpumask_first()" , test_odp_cpumask_first}, - {"odp_cpumask_last()" , test_odp_cpumask_last}, - {"odp_cpumask_next()" , test_odp_cpumask_next}, +static CU_TestInfo cpumask_suite[] = { + {"odp_cpumask_to/from_str()", cpumask_test_odp_cpumask_to_from_str}, + {"odp_cpumask_equal()", cpumask_test_odp_cpumask_equal}, + {"odp_cpumask_zero()", cpumask_test_odp_cpumask_zero}, + {"odp_cpumask_set()", cpumask_test_odp_cpumask_set}, + {"odp_cpumask_clr()", cpumask_test_odp_cpumask_clr}, + {"odp_cpumask_isset()", cpumask_test_odp_cpumask_isset}, + {"odp_cpumask_count()", cpumask_test_odp_cpumask_count}, + {"odp_cpumask_and()", cpumask_test_odp_cpumask_and}, + {"odp_cpumask_or()", cpumask_test_odp_cpumask_or}, + {"odp_cpumask_xor()", cpumask_test_odp_cpumask_xor}, + {"odp_cpumask_copy()", cpumask_test_odp_cpumask_copy}, + {"odp_cpumask_first()", cpumask_test_odp_cpumask_first}, + {"odp_cpumask_last()", cpumask_test_odp_cpumask_last}, + {"odp_cpumask_next()", cpumask_test_odp_cpumask_next}, CU_TEST_INFO_NULL, }; static CU_SuiteInfo cpumask_suites[] = { - {"Cpumask", NULL, NULL, NULL, NULL, test_odp_cpumask}, + {"Cpumask", NULL, NULL, NULL, NULL, cpumask_suite}, CU_SUITE_INFO_NULL, };