From patchwork Tue Jun 23 10:08:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50214 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 358B3216E1 for ; Tue, 23 Jun 2015 10:11:03 +0000 (UTC) Received: by wicnd19 with SMTP id nd19sf3630909wic.0 for ; Tue, 23 Jun 2015 03:11:02 -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=LPzv+67CshUh6HVTolI11BVPrAiEHfGspApxkM7vdj8=; b=ZaYqie4WqsQArSses2fiErcqajxWvI9K4gsvjvnw+ddQGkC9t/2pB93rjRMFhM9k4a J9QNpwcLxoxQhCxub1rUQXMo5kZA+bfbxMkrnMHugCa9tcUs4Sig8uyCe6ab54rmgeYH xpitF86b24wOPJedu68MdVZzxbFXfL5ibJIIR1K7CtvzPBPGaUutJN2Ry8PJehNXSroZ ky+hb1lrJORfQc5cDlMeTVdW26U8GBePI64bWo8WFtr1AOtzTddgNsyARN4rwHrczVdJ biLiWPDlsPaGc0nPQi0TITZNmlPK8GKBKsKb8DV4QFJv/4Gp6PoLhogcjgU6nomDKlEi nB8Q== X-Gm-Message-State: ALoCoQnmTUKpPwBquTTJRtK9RJc3K2uLfCYNF8AarO8AYzbbNVIKf9VY73OMd0m85YKAHiMIj0l7 X-Received: by 10.194.47.179 with SMTP id e19mr28762289wjn.4.1435054262429; Tue, 23 Jun 2015 03:11:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.195 with SMTP id o3ls27850laf.1.gmail; Tue, 23 Jun 2015 03:11:02 -0700 (PDT) X-Received: by 10.112.205.1 with SMTP id lc1mr7871151lbc.94.1435054262264; Tue, 23 Jun 2015 03:11:02 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id bb9si1770246lab.89.2015.06.23.03.11.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 03:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbvz5 with SMTP id vz5so3468447lbb.0 for ; Tue, 23 Jun 2015 03:11:02 -0700 (PDT) X-Received: by 10.152.6.69 with SMTP id y5mr33882600lay.72.1435054262160; Tue, 23 Jun 2015 03:11:02 -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 hn6csp2963670lbb; Tue, 23 Jun 2015 03:11:00 -0700 (PDT) X-Received: by 10.55.18.31 with SMTP id c31mr51316002qkh.15.1435054259176; Tue, 23 Jun 2015 03:10:59 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n63si21708161qga.13.2015.06.23.03.10.57; Tue, 23 Jun 2015 03:10:59 -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 A4EF261F53; Tue, 23 Jun 2015 10:10:57 +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 D0B7361E12; Tue, 23 Jun 2015 10:09:46 +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 C3BDA61E12; Tue, 23 Jun 2015 10:09:38 +0000 (UTC) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id 57B7761E26 for ; Tue, 23 Jun 2015 10:08:55 +0000 (UTC) Received: by lacny3 with SMTP id ny3so3292867lac.3 for ; Tue, 23 Jun 2015 03:08:54 -0700 (PDT) X-Received: by 10.152.37.102 with SMTP id x6mr33951568laj.69.1435054133966; Tue, 23 Jun 2015 03:08:53 -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 l3sm5415795lbj.46.2015.06.23.03.08.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jun 2015 03:08:53 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Tue, 23 Jun 2015 12:08:36 +0200 Message-Id: <1435054119-1216-3-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435054119-1216-1-git-send-email-christophe.milard@linaro.org> References: <1435054119-1216-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 2/5] validation: renaming in odp_time.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.182 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. Note that time API is actually part of the "system" API modules. Hence the renaming to systen_*. 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_time.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/validation/odp_time.c b/test/validation/odp_time.c index 38d940e..3005a26 100644 --- a/test/validation/odp_time.c +++ b/test/validation/odp_time.c @@ -11,7 +11,7 @@ #define BUSY_LOOP_CNT 100 /* check that a cycles difference gives a reasonable result */ -static void test_odp_cycles_diff(void) +static void system_test_odp_cycles_diff(void) { /* volatile to stop optimization of busy loop */ volatile int count = 0; @@ -31,7 +31,7 @@ static void test_odp_cycles_diff(void) } /* check that a negative cycles difference gives a reasonable result */ -static void test_odp_cycles_negative_diff(void) +static void system_test_odp_cycles_negative_diff(void) { uint64_t diff, cycles1, cycles2; cycles1 = 10; @@ -41,7 +41,7 @@ static void test_odp_cycles_negative_diff(void) } /* check that related conversions come back to the same value */ -static void test_odp_time_conversion(void) +static void system_test_odp_time_conversion(void) { uint64_t ns1, ns2, cycles; uint64_t upper_limit, lower_limit; @@ -58,15 +58,15 @@ static void test_odp_time_conversion(void) CU_ASSERT((ns2 <= upper_limit) && (ns2 >= lower_limit)); } -CU_TestInfo test_odp_time[] = { - {"cycles diff", test_odp_cycles_diff}, - {"negative diff", test_odp_cycles_negative_diff}, - {"conversion", test_odp_time_conversion}, +CU_TestInfo system_suite_time[] = { + {"cycles diff", system_test_odp_cycles_diff}, + {"negative diff", system_test_odp_cycles_negative_diff}, + {"conversion", system_test_odp_time_conversion}, CU_TEST_INFO_NULL }; static CU_SuiteInfo system_suites[] = { - {"Time", NULL, NULL, NULL, NULL, test_odp_time}, + {"Time", NULL, NULL, NULL, NULL, system_suite_time}, CU_SUITE_INFO_NULL };