From patchwork Fri Jul 24 11:27:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51422 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id DC49D20323 for ; Fri, 24 Jul 2015 11:34:50 +0000 (UTC) Received: by lbvb1 with SMTP id b1sf6512980lbv.3 for ; Fri, 24 Jul 2015 04:34:49 -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=2f1Y6Wo9tdm8kX1dew4wQPzK/OiCsMm5G+YJZ8/y+nk=; b=il5LdxLPr6cpcKkSsyyZRiHxlWeazsjmpFMX/lC9Rn8tB/nXzU5G1lgi86549hWuQl KB6UncptCJakIe3kyYubL+YeVqRs0Oa67QaocDB0huKqBfxYTuIyb/C5/0QdTkwtZfMl q/D/CfVirq0zxH3VL9tWKR7WWyP3BmDXnegXmfIFusJwJCUuZ92i6m9+NysFwACG04vX X5IqtnDfHt4FhphWq08OqH+7Jl3Kez8rSCnpXSSdNLqRroOpeUC8uYAZp5CCODYuyxkl hpB5bhcyw+GZIrPENcRmNzTsTinl6kkPiudOIJXapxVuYq5DRg2K7kdyS8hVNhZXkHhc jQzw== X-Gm-Message-State: ALoCoQmmwPolz29wtN9Eld1z4wE5Y36FxMAMw9qTIJKymNkQSuBaY+TS+1oSg18AMBWFyClApj6X X-Received: by 10.180.35.162 with SMTP id i2mr1483045wij.6.1437737689881; Fri, 24 Jul 2015 04:34:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.74 with SMTP id k10ls381642laf.30.gmail; Fri, 24 Jul 2015 04:34:49 -0700 (PDT) X-Received: by 10.112.151.178 with SMTP id ur18mr13346485lbb.59.1437737689649; Fri, 24 Jul 2015 04:34:49 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id d5si7259959lbv.164.2015.07.24.04.34.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 04:34:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lagw2 with SMTP id w2so12349321lag.3 for ; Fri, 24 Jul 2015 04:34:49 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr13062132lak.117.1437737689172; Fri, 24 Jul 2015 04:34:49 -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 l6csp1117171lba; Fri, 24 Jul 2015 04:34:48 -0700 (PDT) X-Received: by 10.141.28.78 with SMTP id f75mr20706197qhe.20.1437737687723; Fri, 24 Jul 2015 04:34:47 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 63si9618440qhw.101.2015.07.24.04.34.46; Fri, 24 Jul 2015 04:34:47 -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 E170F61B58; Fri, 24 Jul 2015 11:34:46 +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 6941F61B77; Fri, 24 Jul 2015 11:29:41 +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 AD16061B6A; Fri, 24 Jul 2015 11:29:28 +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 6AB2B61B5C for ; Fri, 24 Jul 2015 11:28:12 +0000 (UTC) Received: by lafd3 with SMTP id d3so1949567laf.1 for ; Fri, 24 Jul 2015 04:28:11 -0700 (PDT) X-Received: by 10.152.37.102 with SMTP id x6mr13094563laj.69.1437737291357; Fri, 24 Jul 2015 04:28:11 -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 y1sm1582274lal.39.2015.07.24.04.28.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jul 2015 04:28:10 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Fri, 24 Jul 2015 13:27:28 +0200 Message-Id: <1437737259-16953-10-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437737259-16953-1-git-send-email-christophe.milard@linaro.org> References: <1437737259-16953-1-git-send-email-christophe.milard@linaro.org> X-Topics: Classification patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 09/20] 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.49 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 63ad022..b8a6c8c 100644 --- a/test/validation/classification/classification.h +++ b/test/validation/classification/classification.h @@ -7,6 +7,37 @@ #ifndef _ODP_TEST_CLASSIFICATION_H_ #define _ODP_TEST_CLASSIFICATION_H_ +#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); #endif 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 a4072c4..0e0c4eb 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)