From patchwork Thu Aug 20 10:05:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 52572 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 803EF22E4F for ; Thu, 20 Aug 2015 10:07:03 +0000 (UTC) Received: by wicul11 with SMTP id ul11sf10813503wic.1 for ; Thu, 20 Aug 2015 03:07: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=wD8acXip+m1AZ1yUYVRAo2HqSexN8hiY4pCVkBFWqaI=; b=SPhpxol9tJD0SpnfPKUlDyiKPSPxWgDso61CO1TusyhEkO1vEzBfQnTywpF710jyKd MDO6i1hXLxeC19vsPibQl8nb9/XGWf0hV3fxgxilp0RFBnTNROJdr0//eK6+VRSQENkb 0bMYkUj22lX8wtvsg7+XKhLDN8QviNKvNeO6Sdl0ffT2HsZmuXDoiG42uVCtycv1KTqZ Jx/KKWMe2TWh7PRI8rt8yNN9tlR2RZOQYXUIDWPCiHCGaHI8bahFlgx9t1rZng4zD2mT EmuqZjCAYKgFNgmnILXFAsvBqL0B42ofjS32LUd5yr2WxV9oV0RN/VBjV5v6hTCoak7J onWA== X-Gm-Message-State: ALoCoQl1fVhNmMxBjBjkAc1jSH6WEqZCxxzIH9MoKetJkvrOyBSjjcG4/NGUOdtr1K+zfnijFlKy X-Received: by 10.180.186.36 with SMTP id fh4mr1699006wic.7.1440065222842; Thu, 20 Aug 2015 03:07:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.70 with SMTP id y6ls128861lay.55.gmail; Thu, 20 Aug 2015 03:07:02 -0700 (PDT) X-Received: by 10.112.180.98 with SMTP id dn2mr2253318lbc.0.1440065222638; Thu, 20 Aug 2015 03:07:02 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id lc3si3279999lab.50.2015.08.20.03.07.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2015 03:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by lalv9 with SMTP id v9so19388992lal.0 for ; Thu, 20 Aug 2015 03:07:02 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr2208934lbb.36.1440065222533; Thu, 20 Aug 2015 03:07: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.162.200 with SMTP id yc8csp922824lbb; Thu, 20 Aug 2015 03:07:00 -0700 (PDT) X-Received: by 10.50.30.226 with SMTP id v2mr34424586igh.11.1440065219816; Thu, 20 Aug 2015 03:06:59 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w204si2765958iod.104.2015.08.20.03.06.55; Thu, 20 Aug 2015 03:06: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 61C0D61EF2; Thu, 20 Aug 2015 10:06:55 +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 99EBB6206C; Thu, 20 Aug 2015 10:06:30 +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 4069961CC7; Thu, 20 Aug 2015 10:06:26 +0000 (UTC) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by lists.linaro.org (Postfix) with ESMTPS id EED0B61CC7 for ; Thu, 20 Aug 2015 10:06:19 +0000 (UTC) Received: by lbcbn3 with SMTP id bn3so20426397lbc.2 for ; Thu, 20 Aug 2015 03:06:18 -0700 (PDT) X-Received: by 10.112.89.230 with SMTP id br6mr2172131lbb.15.1440065178175; Thu, 20 Aug 2015 03:06:18 -0700 (PDT) Received: from mobile-VirtualBox.localdomain (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id un4sm1069852lbb.7.2015.08.20.03.06.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Aug 2015 03:06:17 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Thu, 20 Aug 2015 12:05:49 +0200 Message-Id: <1440065161-18967-2-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440065161-18967-1-git-send-email-christophe.milard@linaro.org> References: <1440065161-18967-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 01/13] validation: factorise _CU_TEST_INFO definition 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.54 as permitted sender) smtp.mailfrom=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 The macro _CU_TEST_INFO (used ensure a match between test function names and test names (strings)) is now defined in .../common/odp_cunit_common.h as it is common to many API module tests. Local definitions are also removed. Signed-off-by: Christophe Milard Reviewed-by: Stuart Haslam --- test/validation/buffer/buffer.c | 3 --- test/validation/classification/odp_classification_basic.c | 1 + test/validation/classification/odp_classification_testsuites.h | 3 --- test/validation/common/odp_cunit_common.h | 3 +++ test/validation/packet/packet.c | 3 --- test/validation/pool/pool.c | 2 -- test/validation/random/random.c | 3 --- test/validation/thread/thread.c | 3 --- 8 files changed, 4 insertions(+), 17 deletions(-) diff --git a/test/validation/buffer/buffer.c b/test/validation/buffer/buffer.c index 52585b9..c62938d 100644 --- a/test/validation/buffer/buffer.c +++ b/test/validation/buffer/buffer.c @@ -8,9 +8,6 @@ #include "odp_cunit_common.h" #include "buffer.h" -/* Helper macro for CU_TestInfo initialization */ -#define _CU_TEST_INFO(test_func) {#test_func, test_func} - static odp_pool_t raw_pool; static odp_buffer_t raw_buffer = ODP_BUFFER_INVALID; static const size_t raw_buffer_size = 1500; diff --git a/test/validation/classification/odp_classification_basic.c b/test/validation/classification/odp_classification_basic.c index 79c775e..3ae0128 100644 --- a/test/validation/classification/odp_classification_basic.c +++ b/test/validation/classification/odp_classification_basic.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include "odp_classification_testsuites.h" #include "classification.h" diff --git a/test/validation/classification/odp_classification_testsuites.h b/test/validation/classification/odp_classification_testsuites.h index f603f30..37c019d 100644 --- a/test/validation/classification/odp_classification_testsuites.h +++ b/test/validation/classification/odp_classification_testsuites.h @@ -11,9 +11,6 @@ #include #include -/* Helper macro for CU_TestInfo initialization */ -#define _CU_TEST_INFO(test_func) {#test_func, test_func} - extern CU_TestInfo classification_suite[]; extern CU_TestInfo classification_suite_basic[]; diff --git a/test/validation/common/odp_cunit_common.h b/test/validation/common/odp_cunit_common.h index 7c2a9dd..6cafaaa 100644 --- a/test/validation/common/odp_cunit_common.h +++ b/test/validation/common/odp_cunit_common.h @@ -21,6 +21,9 @@ /* the function, called by module main(), to run the testsuites: */ int odp_cunit_run(CU_SuiteInfo testsuites[]); +/* the macro used to have test names (strings) matching function symbols */ +#define _CU_TEST_INFO(test_func) {#test_func, test_func} + typedef struct { uint32_t foo; uint32_t bar; diff --git a/test/validation/packet/packet.c b/test/validation/packet/packet.c index 99a6745..97ffd14 100644 --- a/test/validation/packet/packet.c +++ b/test/validation/packet/packet.c @@ -10,9 +10,6 @@ #include "odp_cunit_common.h" #include "packet.h" -/* Helper macro for CU_TestInfo initialization */ -#define _CU_TEST_INFO(test_func) {#test_func, test_func} - #define PACKET_BUF_LEN ODP_CONFIG_PACKET_SEG_LEN_MIN /* Reserve some tailroom for tests */ #define PACKET_TAILROOM_RESERVE 4 diff --git a/test/validation/pool/pool.c b/test/validation/pool/pool.c index 9247557..44ba155 100644 --- a/test/validation/pool/pool.c +++ b/test/validation/pool/pool.c @@ -99,8 +99,6 @@ void pool_test_lookup_info_print(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -#define _CU_TEST_INFO(test_func) {#test_func, test_func} - CU_TestInfo pool_suite[] = { _CU_TEST_INFO(pool_test_create_destroy_buffer), _CU_TEST_INFO(pool_test_create_destroy_packet), diff --git a/test/validation/random/random.c b/test/validation/random/random.c index 039c7a3..b6426f4 100644 --- a/test/validation/random/random.c +++ b/test/validation/random/random.c @@ -8,9 +8,6 @@ #include #include "random.h" -/* Helper macro for CU_TestInfo initialization */ -#define _CU_TEST_INFO(test_func) {#test_func, test_func} - void random_test_get_size(void) { int32_t ret; diff --git a/test/validation/thread/thread.c b/test/validation/thread/thread.c index f95172a..d4f3ee0 100644 --- a/test/validation/thread/thread.c +++ b/test/validation/thread/thread.c @@ -10,9 +10,6 @@ #include #include "thread.h" -/* Helper macro for CU_TestInfo initialization */ -#define _CU_TEST_INFO(test_func) {#test_func, test_func} - /* Test thread entry and exit synchronization barriers */ odp_barrier_t bar_entry; odp_barrier_t bar_exit;