From patchwork Mon Jul 27 17:38:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51553 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 9E95D22918 for ; Mon, 27 Jul 2015 17:44:14 +0000 (UTC) Received: by lbvb1 with SMTP id b1sf29937375lbv.3 for ; Mon, 27 Jul 2015 10:44:13 -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=OE1bpZi/t76iTtw8U91/B5r6coiI4+OJriEdiTwLa8A=; b=Lo5QMxg1qN7fbeXdtR8162O05/RFajdmHsdLYBfp3DRZ3WI/OSyn0EHfdcMgDzjMDT 5FTd4jvNYO2RCl1f7q3vCnf+gLVYtRodoF8HvhNSufzp8r9Bhss5l8L/UxGYQ4wtkjgq h3i8QL9nrCmfMrVCTm3W6xYntp/R05PHPV9Xrp+A95Od2wRleAkRl/vu63JQORK6IMY/ x5Gyfj0kC5wTtf+ezm5OjpvVhzGhE4VmWlGkJSK0kcfYa4DOIskNrex72JSznvNMK8Yh 4p10cGqqeAJyv6rlCKjrjvQSXZ96th8+JrJIwg0SUZpNTwG5cfM3I/lF4YRbG8XmsEYD U09A== X-Gm-Message-State: ALoCoQm8dMxK2G9vsa6m2sBWBIJWz7sisfon/4arGoOrnFl+cMk2TLOQG0Np0Lfte0Q8JUTTuY0J X-Received: by 10.112.99.37 with SMTP id en5mr12435099lbb.7.1438019053304; Mon, 27 Jul 2015 10:44:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.133 with SMTP id y5ls698390laj.19.gmail; Mon, 27 Jul 2015 10:44:13 -0700 (PDT) X-Received: by 10.112.162.70 with SMTP id xy6mr28638071lbb.122.1438019053084; Mon, 27 Jul 2015 10:44:13 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id v2si15861283lbk.22.2015.07.27.10.44.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 10:44:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by laah7 with SMTP id h7so53729058laa.0 for ; Mon, 27 Jul 2015 10:44:13 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr25419467laa.76.1438019052977; Mon, 27 Jul 2015 10:44:12 -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 l6csp1661068lba; Mon, 27 Jul 2015 10:44:12 -0700 (PDT) X-Received: by 10.140.29.55 with SMTP id a52mr41358155qga.25.1438019051638; Mon, 27 Jul 2015 10:44:11 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u45si21794866qgu.69.2015.07.27.10.44.11; Mon, 27 Jul 2015 10:44:11 -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 F02AD61DBF; Mon, 27 Jul 2015 17:44:10 +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 13FAD61E01; Mon, 27 Jul 2015 17:40:17 +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 714D561E01; Mon, 27 Jul 2015 17:40:13 +0000 (UTC) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id B973761DBE for ; Mon, 27 Jul 2015 17:39:17 +0000 (UTC) Received: by lafd3 with SMTP id d3so43239154laf.1 for ; Mon, 27 Jul 2015 10:39:16 -0700 (PDT) X-Received: by 10.112.144.199 with SMTP id so7mr28221549lbb.109.1438018756537; Mon, 27 Jul 2015 10:39:16 -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 4sm4027442lai.36.2015.07.27.10.39.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jul 2015 10:39:15 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Mon, 27 Jul 2015 19:38:40 +0200 Message-Id: <1438018732-2778-9-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438018732-2778-1-git-send-email-christophe.milard@linaro.org> References: <1438018732-2778-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv3 08/20] 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.215.50 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 f67c55f..52585b9 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 6269c63..4916624 100644 --- a/test/validation/buffer/buffer.h +++ b/test/validation/buffer/buffer.h @@ -7,6 +7,24 @@ #ifndef _ODP_TEST_BUFFER_H_ #define _ODP_TEST_BUFFER_H_ +#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 registry: */ +extern CU_SuiteInfo buffer_suites[]; + +/* main test program: */ int buffer_main(void); #endif