From patchwork Mon Jul 27 12:43:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51522 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 patches.linaro.org (Postfix) with ESMTPS id C38E522918 for ; Mon, 27 Jul 2015 12:44:48 +0000 (UTC) Received: by wicmm11 with SMTP id mm11sf27671287wic.3 for ; Mon, 27 Jul 2015 05:44:48 -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=G/WNEVCXxhOWsgSDW1BJCs0t0fN3ORkbUvK2rF1zhlo=; b=E3o/D9dZ2e2rytPWStBZjNENsikphnmVNAIUBnHpX19+4It8PvVnfiycgWHs1z4wUk zLy+vzZz+GCY05Jui94WLptQiSnd/TBvTH7/x6uMfSmK6au4B5y1YTsblw+QwC76tBoW /IWX6zEIyi+vp6xHc2EnpRysmiJTWfaq+j8xHJQHiMbQeYGb0141+ixMktqMiv1iDgi+ 4wPqu+6T9J7LO5ukcKs3Y+gXzub5JaPkfrRkEJt/X/Bh75idDyvjl5jHdkvNzN6yzkTo ac+yKxtqLqEloHRDZIldE2J9Wj/jH4neiI6B9oMFFV4LvybDQ1rFmG6gKvfH5LJ3EqNQ twdA== X-Gm-Message-State: ALoCoQlOwQ+m6t/jOLq7Sm9gU/z+pKDlSuntAE3yidq/QI1Adiz0kd8Q/YKmX2y/FSTWIYw/jhc1 X-Received: by 10.152.1.105 with SMTP id 9mr12001907lal.3.1438001088053; Mon, 27 Jul 2015 05:44:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.181.34 with SMTP id dt2ls597050lac.14.gmail; Mon, 27 Jul 2015 05:44:47 -0700 (PDT) X-Received: by 10.152.26.163 with SMTP id m3mr26844599lag.86.1438001087837; Mon, 27 Jul 2015 05:44:47 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id ms1si15153065lbb.53.2015.07.27.05.44.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 05:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by laah7 with SMTP id h7so48216907laa.0 for ; Mon, 27 Jul 2015 05:44:47 -0700 (PDT) X-Received: by 10.152.1.66 with SMTP id 2mr27406962lak.56.1438001087731; Mon, 27 Jul 2015 05:44:47 -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.7.198 with SMTP id l6csp1509918lba; Mon, 27 Jul 2015 05:44:46 -0700 (PDT) X-Received: by 10.140.93.78 with SMTP id c72mr40403698qge.105.1438001086144; Mon, 27 Jul 2015 05:44:46 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o33si20756068qko.7.2015.07.27.05.44.45; Mon, 27 Jul 2015 05:44:46 -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 6A45E61CF6; Mon, 27 Jul 2015 12:44:45 +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 7347E61812; Mon, 27 Jul 2015 12:44:10 +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 62A0361818; Mon, 27 Jul 2015 12:44:07 +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 200C161812 for ; Mon, 27 Jul 2015 12:44:06 +0000 (UTC) Received: by lafd3 with SMTP id d3so37812540laf.1 for ; Mon, 27 Jul 2015 05:44:05 -0700 (PDT) X-Received: by 10.112.72.8 with SMTP id z8mr26530612lbu.24.1438001045060; Mon, 27 Jul 2015 05:44:05 -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 ci2sm3877195lad.23.2015.07.27.05.44.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jul 2015 05:44:04 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Mon, 27 Jul 2015 14:43:43 +0200 Message-Id: <1438001035-21900-2-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438001035-21900-1-git-send-email-christophe.milard@linaro.org> References: <1438001035-21900-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 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.52 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 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 --- 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 f67c55f..816ed9b 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 99202ee..d33f8a9 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" #define PMR_SET_NUM 5 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 e6fb18a..16d3597 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 a888b68..fa123c8 100644 --- a/test/validation/pool/pool.c +++ b/test/validation/pool/pool.c @@ -99,8 +99,6 @@ static void pool_test_lookup_info_print(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -#define _CU_TEST_INFO(test_func) {#test_func, test_func} - static 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 a42523f..b305162 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} - static void random_test_get_size(void) { int32_t ret; diff --git a/test/validation/thread/thread.c b/test/validation/thread/thread.c index 6fbdaef..a815239 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;