From patchwork Fri Jul 10 00:44:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50995 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A3ED228E5 for ; Fri, 10 Jul 2015 00:48:30 +0000 (UTC) Received: by wgfk9 with SMTP id k9sf83226895wgf.1 for ; Thu, 09 Jul 2015 17:48:29 -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=6NUNa0g1cq42OMwrPZGNIaGzc1QRzwLkTJoEACOgFwE=; b=l+y19DQgbNcBDF7h2oX58KKN2YfSYE0OBvEIOorwy1V0BryiUiSVBN+F9+yfVjIum0 6hgwSipuVnidPWkG9MX49La4c+Tg0+JKs0VTGPAWFlzv7ltJlAHN25VTK/D/Z4CPmmVE PBfNWWuGVeIqvFzFUbTwojG5qvfRyiJD1vYxZHv3dvdOMsm+9nfXtTzsatl840wTmCXG DOGs+H8T5qK6/4ZqCWyjdnn+ZSoxqCcR8Qmhnl3XJlskx61J5CiHJx7vbeZHxa7mR64U pqtKcOWb1cZhpjdKolZzpbRDjLCVAkpinmGgV91mxRqTyk9yg3R9nZroag5zb57N7E4/ Of/w== X-Gm-Message-State: ALoCoQnfnRp+4PYvvtulT5FEih9YVFtDurPMNcJkQfF0jHu4hB4Avoz7Ikkld68F8sCsAUOO3D84 X-Received: by 10.152.2.196 with SMTP id 4mr9359842law.10.1436489309452; Thu, 09 Jul 2015 17:48:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.138 with SMTP id am10ls993213lac.67.gmail; Thu, 09 Jul 2015 17:48:29 -0700 (PDT) X-Received: by 10.113.4.105 with SMTP id cd9mr11535902lbd.106.1436489309302; Thu, 09 Jul 2015 17:48:29 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id cb8si5875719lad.61.2015.07.09.17.48.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 17:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbnk3 with SMTP id k3so84056709lbn.1 for ; Thu, 09 Jul 2015 17:48:29 -0700 (PDT) X-Received: by 10.152.42.177 with SMTP id p17mr17183145lal.29.1436489309164; Thu, 09 Jul 2015 17:48:29 -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 hn6csp1011480lbb; Thu, 9 Jul 2015 17:48:27 -0700 (PDT) X-Received: by 10.140.31.161 with SMTP id f30mr29055178qgf.23.1436489306677; Thu, 09 Jul 2015 17:48:26 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k62si8118356qkh.116.2015.07.09.17.48.25; Thu, 09 Jul 2015 17:48:26 -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 1F2E661B41; Fri, 10 Jul 2015 00:48:25 +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 6B3FC62097; Fri, 10 Jul 2015 00:45:24 +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 438676206D; Fri, 10 Jul 2015 00:45:15 +0000 (UTC) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by lists.linaro.org (Postfix) with ESMTPS id 07F8B62078 for ; Fri, 10 Jul 2015 00:44:46 +0000 (UTC) Received: by lblf12 with SMTP id f12so14525629lbl.2 for ; Thu, 09 Jul 2015 17:44:45 -0700 (PDT) X-Received: by 10.112.146.36 with SMTP id sz4mr17567304lbb.54.1436489084952; Thu, 09 Jul 2015 17:44:44 -0700 (PDT) Received: from localhost.localdomain (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id o18sm1936473lbg.1.2015.07.09.17.44.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 17:44:44 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Fri, 10 Jul 2015 02:44:16 +0200 Message-Id: <1436489068-8929-6-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436489068-8929-1-git-send-email-christophe.milard@linaro.org> References: <1436489068-8929-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 05/17] validation: buffer: lib populated 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.173 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 test symbols are now exported in the module lib. Signed-off-by: Christophe Milard --- test/validation/buffer/buffer.c | 14 +++++++------- test/validation/buffer/buffer.h | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/test/validation/buffer/buffer.c b/test/validation/buffer/buffer.c index d0fd510..fad1f8d 100644 --- a/test/validation/buffer/buffer.c +++ b/test/validation/buffer/buffer.c @@ -15,7 +15,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_suite_init(void) +int buffer_suite_init(void) { odp_pool_param_t params = { .buf = { @@ -35,7 +35,7 @@ static int buffer_suite_init(void) return 0; } -static int buffer_suite_term(void) +int buffer_suite_term(void) { odp_buffer_free(raw_buffer); if (odp_pool_destroy(raw_pool) != 0) @@ -43,7 +43,7 @@ static int buffer_suite_term(void) return 0; } -static void buffer_test_pool_alloc(void) +void buffer_test_pool_alloc(void) { odp_pool_t pool; const int num = 3; @@ -95,7 +95,7 @@ static void buffer_test_pool_alloc(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -static void buffer_test_pool_free(void) +void buffer_test_pool_free(void) { odp_pool_t pool; odp_buffer_t buffer; @@ -127,7 +127,7 @@ static void buffer_test_pool_free(void) CU_ASSERT(odp_pool_destroy(pool) == 0); } -static void buffer_test_management_basic(void) +void buffer_test_management_basic(void) { odp_event_t ev = odp_buffer_to_event(raw_buffer); @@ -142,14 +142,14 @@ static void buffer_test_management_basic(void) CU_ASSERT(odp_event_to_u64(ev) != odp_event_to_u64(ODP_EVENT_INVALID)); } -static CU_TestInfo buffer_suite[] = { +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[] = { +CU_SuiteInfo buffer_suites[] = { { .pName = "buffer tests", .pTests = buffer_suite, .pInitFunc = buffer_suite_init, diff --git a/test/validation/buffer/buffer.h b/test/validation/buffer/buffer.h index 44d05a2..2fbf1f3 100644 --- a/test/validation/buffer/buffer.h +++ b/test/validation/buffer/buffer.h @@ -4,4 +4,22 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include + +/* test functions: */ +void buffer_test_pool_alloc(void); +void buffer_test_pool_free(void); +void buffer_test_management_basic(void); + +/* test arrays: */ +extern CU_TestInfo buffer_suite[]; + +/* test array init/term functions: */ +int buffer_suite_init(void); +int buffer_suite_term(void); + +/* test registery: */ +extern CU_SuiteInfo buffer_suites[]; + +/* main test program: */ int buffer_main(void);