From patchwork Fri Jun 26 15:01:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50358 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4B825228FD for ; Fri, 26 Jun 2015 15:05:03 +0000 (UTC) Received: by lagx9 with SMTP id x9sf1414695lag.2 for ; Fri, 26 Jun 2015 08:05: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=3G2qH2V5xvZpO21bcdBHnvQNXxA2kHgYoolzWwMeNew=; b=cDnyrwuGwEgNgb9z43GQnlyQUYf4N7f3yOO/hrCnYTSu7XV3PApEkKfOXJV85Bdet/ wf0CMH307nSKha33FCYlXvdz8zpa04xm7tsBQ16FT/BKkBTe2+DOYDsQBo0+Fe/8iH3v K5r4Ug07GGf59JbmwP6CSFPdQ/MWiuMQbY8yvH2GghmLGf9WW/BL8yi7PC9FNUNgvyEY NfSfoLPfQ+9bA74fUfXJiq3X9g5PIr8hal5gANQuqZC+Qjikpbs3JcSlNYLWMK6Y+Kgn f1LXIIkUH62/GJQ+z+iMXwFWHbpjotx7/6Pg5pbtDcmiWo3z8xS5OifNh3u66e8KrhBm cykA== X-Gm-Message-State: ALoCoQke5q4z0QJMhesqKT6NBMqm+PKHUd5VrPal9c7kiu6PovfyFSOeGZt99uLlUF4zPMoB4nXC X-Received: by 10.112.142.67 with SMTP id ru3mr1377375lbb.1.1435331102197; Fri, 26 Jun 2015 08:05:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.199 with SMTP id m7ls520454lam.83.gmail; Fri, 26 Jun 2015 08:05:02 -0700 (PDT) X-Received: by 10.152.6.132 with SMTP id b4mr1755933laa.53.1435331102049; Fri, 26 Jun 2015 08:05:02 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id wk8si27623387lbb.96.2015.06.26.08.05.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 08:05:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lagx9 with SMTP id x9so65500723lag.1 for ; Fri, 26 Jun 2015 08:05:02 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr2030321lbc.86.1435331101933; Fri, 26 Jun 2015 08:05:01 -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 hn6csp1387820lbb; Fri, 26 Jun 2015 08:05:01 -0700 (PDT) X-Received: by 10.55.25.84 with SMTP id k81mr4662246qkh.85.1435331100632; Fri, 26 Jun 2015 08:05:00 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e144si33134714qhc.127.2015.06.26.08.04.30; Fri, 26 Jun 2015 08:05:00 -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 79E826210A; Fri, 26 Jun 2015 15:04:30 +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_H2, 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 D42F66210B; Fri, 26 Jun 2015 15:02:31 +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 8496F61D58; Fri, 26 Jun 2015 15:02:13 +0000 (UTC) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) by lists.linaro.org (Postfix) with ESMTPS id 62A4461D02 for ; Fri, 26 Jun 2015 15:02:11 +0000 (UTC) Received: by lbbwc1 with SMTP id wc1so66204959lbb.2 for ; Fri, 26 Jun 2015 08:02:10 -0700 (PDT) X-Received: by 10.112.48.68 with SMTP id j4mr1990789lbn.60.1435330929927; Fri, 26 Jun 2015 08:02:09 -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 q17sm5380493lal.37.2015.06.26.08.02.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jun 2015 08:02:09 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Fri, 26 Jun 2015 17:01:48 +0200 Message-Id: <1435330910-15536-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435330910-15536-1-git-send-email-christophe.milard@linaro.org> References: <1435330910-15536-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 3/5] validation: renaming in odp_buffer.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.51 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_buffer.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/validation/odp_buffer.c b/test/validation/odp_buffer.c index 60a9f71..65fa0d8 100644 --- a/test/validation/odp_buffer.c +++ b/test/validation/odp_buffer.c @@ -14,7 +14,7 @@ static odp_pool_t raw_pool; static odp_buffer_t raw_buffer = ODP_BUFFER_INVALID; static const size_t raw_buffer_size = 1500; -static int buffer_testsuite_init(void) +static int buffer_suite_init(void) { odp_pool_param_t params = { .buf = { @@ -34,7 +34,7 @@ static int buffer_testsuite_init(void) return 0; } -static int buffer_testsuite_finalize(void) +static int buffer_suite_term(void) { odp_buffer_free(raw_buffer); if (odp_pool_destroy(raw_pool) != 0) @@ -42,7 +42,7 @@ static int buffer_testsuite_finalize(void) return 0; } -static void buffer_pool_alloc(void) +static void buffer_test_pool_alloc(void) { odp_pool_t pool; const int num = 3; @@ -94,7 +94,7 @@ static void buffer_pool_alloc(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -static void buffer_pool_free(void) +static void buffer_test_pool_free(void) { odp_pool_t pool; odp_buffer_t buffer; @@ -126,7 +126,7 @@ static void buffer_pool_free(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -static void buffer_management_basic(void) +static void buffer_test_management_basic(void) { odp_event_t ev = odp_buffer_to_event(raw_buffer); @@ -141,18 +141,18 @@ static void buffer_management_basic(void) CU_ASSERT(odp_event_to_u64(ev) != odp_event_to_u64(ODP_EVENT_INVALID)); } -static CU_TestInfo buffer_tests[] = { - _CU_TEST_INFO(buffer_pool_alloc), - _CU_TEST_INFO(buffer_pool_free), - _CU_TEST_INFO(buffer_management_basic), +static CU_TestInfo buffer_suite[] = { + _CU_TEST_INFO(buffer_test_pool_alloc), + _CU_TEST_INFO(buffer_test_pool_free), + _CU_TEST_INFO(buffer_test_management_basic), CU_TEST_INFO_NULL, }; static CU_SuiteInfo buffer_suites[] = { { .pName = "buffer tests", - .pTests = buffer_tests, - .pInitFunc = buffer_testsuite_init, - .pCleanupFunc = buffer_testsuite_finalize, + .pTests = buffer_suite, + .pInitFunc = buffer_suite_init, + .pCleanupFunc = buffer_suite_term, }, CU_SUITE_INFO_NULL, };