From patchwork Fri Jul 10 00:44:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50997 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1D8B5228E5 for ; Fri, 10 Jul 2015 00:49:42 +0000 (UTC) Received: by lagx9 with SMTP id x9sf78700370lag.2 for ; Thu, 09 Jul 2015 17:49:41 -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=djcGfvTxLzbUVOAS5DXZ6fqlRMtOoHsxORxgnINhgxc=; b=SiCqll6TO6F/zFdJT4NpqWVzoM4sIMqysDd6sZjrZ7nBBf6SdqZCtif8M5Ak4wwiW8 7SM0SqXg0yOykJV5E0m0zstizm7a1v+Xa9Mg0kTrwirqPt/ixYDBi7+nxtXfwk2M6tZv 9tFmblvQvs/NN0SfG7Y/+F9j4piyab5OJjeYKZLRUuqvwavZw3mcwSzPmUykwsex7KdU A8aB0MnRgs3n170MwNfDR83/mVaZAkYgXKeBrN2sv2uDytvDNCLxJpTZphl7LkcQmZUx voe8dWP0SWHTo7ynmji6bnfzgzdxKdtCVMt6VfZ8ddqmr3JQCFNLn4QPKdwsIbys81xB XgoQ== X-Gm-Message-State: ALoCoQnbDRg9du73KUuGPvW8sxumR7awn2yvbWZPSdj+f8vXOAK1ckMCZFdGPmAcFo/stGUycoaE X-Received: by 10.194.2.169 with SMTP id 9mr4918797wjv.2.1436489381060; Thu, 09 Jul 2015 17:49:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.169 with SMTP id l9ls1176679lah.52.gmail; Thu, 09 Jul 2015 17:49:40 -0700 (PDT) X-Received: by 10.152.87.33 with SMTP id u1mr17762497laz.78.1436489380891; Thu, 09 Jul 2015 17:49:40 -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 f10si6097215laf.15.2015.07.09.17.49.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 17:49:40 -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 lagx9 with SMTP id x9so256060479lag.1 for ; Thu, 09 Jul 2015 17:49:40 -0700 (PDT) X-Received: by 10.112.133.72 with SMTP id pa8mr5597712lbb.117.1436489380603; Thu, 09 Jul 2015 17:49:40 -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 hn6csp1011930lbb; Thu, 9 Jul 2015 17:49:39 -0700 (PDT) X-Received: by 10.55.20.90 with SMTP id e87mr28353098qkh.68.1436489379419; Thu, 09 Jul 2015 17:49:39 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n99si8527493qkh.3.2015.07.09.17.49.38; Thu, 09 Jul 2015 17:49:39 -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 95AED6203A; Fri, 10 Jul 2015 00:49:38 +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 E5D7F6209D; Fri, 10 Jul 2015 00:45: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 6ADED6206D; Fri, 10 Jul 2015 00:45:16 +0000 (UTC) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by lists.linaro.org (Postfix) with ESMTPS id D95446207A for ; Fri, 10 Jul 2015 00:44:46 +0000 (UTC) Received: by laar3 with SMTP id r3so256611753laa.0 for ; Thu, 09 Jul 2015 17:44:45 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr17178059lbb.29.1436489085833; Thu, 09 Jul 2015 17:44:45 -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.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 17:44:45 -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:17 +0200 Message-Id: <1436489068-8929-7-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: Classification patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 06/17] validation: classification: 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.54 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/classification/classification.c | 2 +- test/validation/classification/classification.h | 31 ++++++++++++++++++++++ .../classification/odp_classification_basic.c | 17 ++++++------ .../classification/odp_classification_tests.c | 13 ++++----- 4 files changed, 48 insertions(+), 15 deletions(-) diff --git a/test/validation/classification/classification.c b/test/validation/classification/classification.c index 2582aaa..d0fef93 100644 --- a/test/validation/classification/classification.c +++ b/test/validation/classification/classification.c @@ -9,7 +9,7 @@ #include "odp_classification_testsuites.h" #include "classification.h" -static CU_SuiteInfo classification_suites[] = { +CU_SuiteInfo classification_suites[] = { { .pName = "classification basic", .pTests = classification_suite_basic, }, diff --git a/test/validation/classification/classification.h b/test/validation/classification/classification.h index e677343..4cace53 100644 --- a/test/validation/classification/classification.h +++ b/test/validation/classification/classification.h @@ -4,4 +4,35 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include + +/* test functions: */ +void classification_test_create_cos(void); +void classification_test_destroy_cos(void); +void classification_test_create_pmr_match(void); +void classification_test_destroy_pmr(void); +void classification_test_cos_set_queue(void); +void classification_test_cos_set_drop(void); +void classification_test_pmr_match_set_create(void); +void classification_test_pmr_match_set_destroy(void); + +void classification_test_pktio_set_skip(void); +void classification_test_pktio_set_headroom(void); +void classification_test_pmr_terms_avail(void); +void classification_test_pmr_terms_cap(void); +void classification_test_pktio_configure(void); +void classification_test_pktio_test(void); + +/* test arrays: */ +extern CU_TestInfo classification_suite_basic[]; +extern CU_TestInfo classification_suite[]; + +/* test array init/term functions: */ +int classification_suite_init(void); +int classification_suite_term(void); + +/* test registery: */ +extern CU_SuiteInfo classification_suites[]; + +/* main test program: */ int classification_main(void); diff --git a/test/validation/classification/odp_classification_basic.c b/test/validation/classification/odp_classification_basic.c index 99202ee..79c775e 100644 --- a/test/validation/classification/odp_classification_basic.c +++ b/test/validation/classification/odp_classification_basic.c @@ -5,10 +5,11 @@ */ #include "odp_classification_testsuites.h" +#include "classification.h" #define PMR_SET_NUM 5 -static void classification_test_create_cos(void) +void classification_test_create_cos(void) { odp_cos_t cos; char name[ODP_COS_NAME_LEN]; @@ -19,7 +20,7 @@ static void classification_test_create_cos(void) odp_cos_destroy(cos); } -static void classification_test_destroy_cos(void) +void classification_test_destroy_cos(void) { odp_cos_t cos; char name[ODP_COS_NAME_LEN]; @@ -33,7 +34,7 @@ static void classification_test_destroy_cos(void) CU_ASSERT(retval < 0); } -static void classification_test_create_pmr_match(void) +void classification_test_create_pmr_match(void) { odp_pmr_t pmr; uint16_t val; @@ -46,7 +47,7 @@ static void classification_test_create_pmr_match(void) odp_pmr_destroy(pmr); } -static void classification_test_destroy_pmr(void) +void classification_test_destroy_pmr(void) { odp_pmr_t pmr; uint16_t val; @@ -62,7 +63,7 @@ static void classification_test_destroy_pmr(void) CU_ASSERT(retval < 0); } -static void classification_test_cos_set_queue(void) +void classification_test_cos_set_queue(void) { int retval; char cosname[ODP_COS_NAME_LEN]; @@ -87,7 +88,7 @@ static void classification_test_cos_set_queue(void) odp_queue_destroy(queue_cos); } -static void classification_test_cos_set_drop(void) +void classification_test_cos_set_drop(void) { int retval; char cosname[ODP_COS_NAME_LEN]; @@ -103,7 +104,7 @@ static void classification_test_cos_set_drop(void) odp_cos_destroy(cos_drop); } -static void classification_test_pmr_match_set_create(void) +void classification_test_pmr_match_set_create(void) { odp_pmr_set_t pmr_set; int retval; @@ -127,7 +128,7 @@ static void classification_test_pmr_match_set_create(void) CU_ASSERT(retval == 0); } -static void classification_test_pmr_match_set_destroy(void) +void classification_test_pmr_match_set_destroy(void) { odp_pmr_set_t pmr_set; int retval; diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c index 502105e..09eca1a 100644 --- a/test/validation/classification/odp_classification_tests.c +++ b/test/validation/classification/odp_classification_tests.c @@ -5,6 +5,7 @@ */ #include "odp_classification_testsuites.h" +#include "classification.h" #include #include #include @@ -564,7 +565,7 @@ void test_pktio_error_cos(void) odp_packet_free(pkt); } -static void classification_test_pktio_set_skip(void) +void classification_test_pktio_set_skip(void) { int retval; size_t offset = 5; @@ -581,7 +582,7 @@ static void classification_test_pktio_set_skip(void) CU_ASSERT(retval == 0); } -static void classification_test_pktio_set_headroom(void) +void classification_test_pktio_set_headroom(void) { size_t headroom; int retval; @@ -793,7 +794,7 @@ void test_pktio_pmr_match_set_cos(void) odp_packet_free(pkt); } -static void classification_test_pmr_terms_avail(void) +void classification_test_pmr_terms_avail(void) { int retval; /* Since this API called at the start of the suite the return value @@ -802,7 +803,7 @@ static void classification_test_pmr_terms_avail(void) CU_ASSERT(retval > 0); } -static void classification_test_pmr_terms_cap(void) +void classification_test_pmr_terms_cap(void) { unsigned long long retval; /* Need to check different values for different platforms */ @@ -810,7 +811,7 @@ static void classification_test_pmr_terms_cap(void) CU_ASSERT(retval | (1 << ODP_PMR_IPPROTO)); } -static void classification_test_pktio_configure(void) +void classification_test_pktio_configure(void) { /* Configure the Different CoS for the pktio interface */ if (TEST_DEFAULT) @@ -827,7 +828,7 @@ static void classification_test_pktio_configure(void) configure_pktio_pmr_match_set_cos(); } -static void classification_test_pktio_test(void) +void classification_test_pktio_test(void) { /* Test Different CoS on the pktio interface */ if (TEST_DEFAULT)