From patchwork Wed Jul 8 14:11: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: 50882 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 72D59213FD for ; Wed, 8 Jul 2015 14:13:09 +0000 (UTC) Received: by wgbbj7 with SMTP id bj7sf71166005wgb.2 for ; Wed, 08 Jul 2015 07:13:08 -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=Q6ndXRTGKd7dQlrUg6me1iMtmhV9RRSk85klCIiL2I4=; b=ALQO3b/2rOLqS2U6PReOqQYWjQbI/LupddK3xZ+KYYl9q3BI9l1myJA4JQIci6oWCq EMKP51pC/ZKj1JeqhTbFRKT5uZCkpMgmAr44CQja1WxhCAzZS4CmcOcibZWXFIniGT65 9je1JH/8DVCJIAduJ7KfdNRBKsTym7e1/29K7Pql+zEUxgFNVD6nY9wcJZxzfgrTerqp VajoSLvsEVYhffz7TdFR7NGq4IK1nmeIHNO1eaCX2w4+LWoLkOrRRgaBeSUDLHn/ckyM HPJPnNe4kyBjPRf6WPFAOr8nIGyUfHjWNuu0m2KU2gcomR9RZQVSmWwmx4NDJVHeoDDn AB6g== X-Gm-Message-State: ALoCoQlpQdfyPYwFGTqokDTQfo6GFIUvYDu4o5x7tqXSsilDR/qj/WdewT3rN2Uv4VpEA9qfKFOK X-Received: by 10.180.87.201 with SMTP id ba9mr20814467wib.3.1436364788799; Wed, 08 Jul 2015 07:13:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.164 with SMTP id az4ls871481lab.16.gmail; Wed, 08 Jul 2015 07:13:08 -0700 (PDT) X-Received: by 10.152.22.99 with SMTP id c3mr10009587laf.32.1436364788604; Wed, 08 Jul 2015 07:13:08 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id bw8si2018304lbd.146.2015.07.08.07.13.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 07:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by laar3 with SMTP id r3so226767030laa.0 for ; Wed, 08 Jul 2015 07:13:08 -0700 (PDT) X-Received: by 10.152.5.197 with SMTP id u5mr9029088lau.76.1436364788498; Wed, 08 Jul 2015 07:13:08 -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 hn6csp3128803lbb; Wed, 8 Jul 2015 07:13:07 -0700 (PDT) X-Received: by 10.140.239.9 with SMTP id k9mr17158364qhc.38.1436364787235; Wed, 08 Jul 2015 07:13:07 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z86si2306142qkg.53.2015.07.08.07.13.06; Wed, 08 Jul 2015 07:13:07 -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 7A42D61DD5; Wed, 8 Jul 2015 14:13:06 +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 57F0161DDC; Wed, 8 Jul 2015 14:12:05 +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 E3AAC61D8D; Wed, 8 Jul 2015 14:11:54 +0000 (UTC) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by lists.linaro.org (Postfix) with ESMTPS id F1A2A61D5E for ; Wed, 8 Jul 2015 14:11:53 +0000 (UTC) Received: by laar3 with SMTP id r3so226738904laa.0 for ; Wed, 08 Jul 2015 07:11:53 -0700 (PDT) X-Received: by 10.152.219.3 with SMTP id pk3mr9794736lac.114.1436364712997; Wed, 08 Jul 2015 07:11:52 -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 zf3sm667823lbb.2.2015.07.08.07.11.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 07:11:52 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 8 Jul 2015 16:11:38 +0200 Message-Id: <1436364701-27420-3-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436364701-27420-1-git-send-email-christophe.milard@linaro.org> References: <1436364701-27420-1-git-send-email-christophe.milard@linaro.org> X-Topics: timers patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 2/5] validation: renaming in odp_timer.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.43 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: Stuart Haslam --- test/validation/odp_timer.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c index bff585e..3ab395d 100644 --- a/test/validation/odp_timer.c +++ b/test/validation/odp_timer.c @@ -49,7 +49,7 @@ struct test_timer { #define TICK_INVALID (~(uint64_t)0) -static void test_timeout_pool_alloc(void) +static void timer_test_timeout_pool_alloc(void) { odp_pool_t pool; const int num = 3; @@ -93,7 +93,7 @@ static void test_timeout_pool_alloc(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -static void test_timeout_pool_free(void) +static void timer_test_timeout_pool_free(void) { odp_pool_t pool; odp_timeout_t tmo; @@ -124,7 +124,7 @@ static void test_timeout_pool_free(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -static void test_odp_timer_cancel(void) +static void timer_test_odp_timer_cancel(void) { odp_pool_t pool; odp_pool_param_t params; @@ -434,7 +434,7 @@ static void *worker_entrypoint(void *arg TEST_UNUSED) } /* @private Timer test case entrypoint */ -static void test_odp_timer_all(void) +static void timer_test_odp_timer_all(void) { int rc; odp_pool_param_t params; @@ -527,16 +527,16 @@ static void test_odp_timer_all(void) CU_PASS("ODP timer test"); } -static CU_TestInfo test_odp_timer[] = { - {"test_timeout_pool_alloc", test_timeout_pool_alloc}, - {"test_timeout_pool_free", test_timeout_pool_free}, - {"test_odp_timer_cancel", test_odp_timer_cancel}, - {"test_odp_timer_all", test_odp_timer_all}, +static CU_TestInfo timer_suite[] = { + {"test_timeout_pool_alloc", timer_test_timeout_pool_alloc}, + {"test_timeout_pool_free", timer_test_timeout_pool_free}, + {"test_odp_timer_cancel", timer_test_odp_timer_cancel}, + {"test_odp_timer_all", timer_test_odp_timer_all}, CU_TEST_INFO_NULL, }; static CU_SuiteInfo timer_suites[] = { - {"Timer", NULL, NULL, NULL, NULL, test_odp_timer}, + {"Timer", NULL, NULL, NULL, NULL, timer_suite}, CU_SUITE_INFO_NULL, };