From patchwork Mon Jul 27 17:38:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51552 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 93D3D22918 for ; Mon, 27 Jul 2015 17:43:06 +0000 (UTC) Received: by laef2 with SMTP id f2sf30104779lae.0 for ; Mon, 27 Jul 2015 10:43:05 -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=H0vc2xWvJD3/DAdvCfxGvVHDAjLSUz+2OFPeEO/LnAo=; b=YufUq3jdgczw5tL9ZFo3+v/E5CQJoZke+vNiW5hC1gSi23o8H+MWHnQ4qMMdClMdNa 1QoXwnXUhgyAhLbXdhkBa3Kbz/kNEoBX5UJLHGkhY8rqXLgQzZfxGgSQllCzWHjZ6KLz oORGlaMWd7+MeSJNda/SJfE7YZEuoPXnfUijKu0+qeks0tNOaTJJ+blzS23fNoOBlu4s /OI4Ajb4jZzb8y7hx3ZO7K3g9G1oQJkzIQXUvqkPgvZ9u7MBLkxD9gQyri0eRNYRhmUU BSvAbBXN2FS82X53tr576hPYbs2HDYyUiOQ0iLu/JTqwCdV3J/imDUaadiRinXeMrRB/ vWdw== X-Gm-Message-State: ALoCoQlGVBX6Alhjtn5Q10VMf4zNKl2xIQm//+LflIDCiBWjHcMq0MTexkvYwtFS3Te9WJPTC3P1 X-Received: by 10.194.179.42 with SMTP id dd10mr12495560wjc.7.1438018985546; Mon, 27 Jul 2015 10:43:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.2 with SMTP id ls2ls688315lac.51.gmail; Mon, 27 Jul 2015 10:43:05 -0700 (PDT) X-Received: by 10.112.212.33 with SMTP id nh1mr27996543lbc.114.1438018985373; Mon, 27 Jul 2015 10:43:05 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id m5si15816772laf.170.2015.07.27.10.43.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 10:43:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbqi7 with SMTP id qi7so58454701lbb.3 for ; Mon, 27 Jul 2015 10:43:05 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr28660255lbb.35.1438018985260; Mon, 27 Jul 2015 10:43:05 -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 l6csp1660650lba; Mon, 27 Jul 2015 10:43:04 -0700 (PDT) X-Received: by 10.140.129.151 with SMTP id 145mr45173939qhb.83.1438018983481; Mon, 27 Jul 2015 10:43:03 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g193si21731348qhc.81.2015.07.27.10.43.02; Mon, 27 Jul 2015 10:43:03 -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 BBCD161DBF; Mon, 27 Jul 2015 17:43:02 +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 332CA61DEF; Mon, 27 Jul 2015 17:39:57 +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 98A9361DB0; Mon, 27 Jul 2015 17:39:44 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by lists.linaro.org (Postfix) with ESMTPS id 1FB4A61B68 for ; Mon, 27 Jul 2015 17:39:13 +0000 (UTC) Received: by laah7 with SMTP id h7so53649386laa.0 for ; Mon, 27 Jul 2015 10:39:12 -0700 (PDT) X-Received: by 10.152.45.9 with SMTP id i9mr28013125lam.105.1438018752039; Mon, 27 Jul 2015 10:39:12 -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.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jul 2015 10:39:10 -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:37 +0200 Message-Id: <1438018732-2778-6-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: crypto patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv3 05/20] validation: crypto: 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.180 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/crypto/crypto.c | 6 +++--- test/validation/crypto/crypto.h | 24 ++++++++++++++++++++++++ test/validation/crypto/odp_crypto_test_inp.c | 11 ++++++----- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/test/validation/crypto/crypto.c b/test/validation/crypto/crypto.c index 9965432..cad6601 100644 --- a/test/validation/crypto/crypto.c +++ b/test/validation/crypto/crypto.c @@ -15,7 +15,7 @@ #define SHM_COMPL_POOL_SIZE (128 * 1024) #define SHM_COMPL_POOL_BUF_SIZE 128 -static CU_SuiteInfo crypto_suites[] = { +CU_SuiteInfo crypto_suites[] = { {ODP_CRYPTO_SYNC_INP, crypto_suite_sync_init, NULL, NULL, NULL, crypto_suite}, {ODP_CRYPTO_ASYNC_INP, crypto_suite_async_init, NULL, NULL, NULL, @@ -23,7 +23,7 @@ static CU_SuiteInfo crypto_suites[] = { CU_SUITE_INFO_NULL, }; -static int crypto_init(void) +int crypto_init(void) { odp_pool_param_t params; odp_pool_t pool; @@ -60,7 +60,7 @@ static int crypto_init(void) return 0; } -static int crypto_term(void) +int crypto_term(void) { odp_pool_t pool; odp_queue_t out_queue; diff --git a/test/validation/crypto/crypto.h b/test/validation/crypto/crypto.h index 9ab641b..41dd4ed 100644 --- a/test/validation/crypto/crypto.h +++ b/test/validation/crypto/crypto.h @@ -7,6 +7,30 @@ #ifndef _ODP_TEST_CRYPTO_H_ #define _ODP_TEST_CRYPTO_H_ +#include + +/* test functions: */ +void crypto_test_enc_alg_3des_cbc(void); +void crypto_test_enc_alg_3des_cbc_ovr_iv(void); +void crypto_test_dec_alg_3des_cbc(void); +void crypto_test_dec_alg_3des_cbc_ovr_iv(void); +void crypto_test_alg_hmac_md5(void); + +/* test arrays: */ +extern CU_TestInfo crypto_suite[]; + +/* test array init/term functions: */ +int crypto_suite_sync_init(void); +int crypto_suite_async_init(void); + +/* test registry: */ +extern CU_SuiteInfo crypto_suites[]; + +/* executable init/term functions: */ +int crypto_init(void); +int crypto_term(void); + +/* main test program: */ int crypto_main(void); #endif diff --git a/test/validation/crypto/odp_crypto_test_inp.c b/test/validation/crypto/odp_crypto_test_inp.c index c1c08af..90fe8d0 100644 --- a/test/validation/crypto/odp_crypto_test_inp.c +++ b/test/validation/crypto/odp_crypto_test_inp.c @@ -8,6 +8,7 @@ #include #include "test_vectors.h" #include "odp_crypto_test_inp.h" +#include "crypto.h" struct suite_context_s { enum odp_crypto_op_mode pref_mode; @@ -132,7 +133,7 @@ cleanup: * In addition the test verifies if the implementation can use the * packet buffer as completion event buffer.*/ #define ASYNC_INP_ENC_ALG_3DES_CBC "ENC_ALG_3DES_CBC" -static void crypto_test_enc_alg_3des_cbc(void) +void crypto_test_enc_alg_3des_cbc(void) { odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 }, auth_key = { .data = NULL, .length = 0 }; @@ -165,7 +166,7 @@ static void crypto_test_enc_alg_3des_cbc(void) * operation for 3DES_CBC algorithm. IV for the operation is the operation IV. * */ #define ASYNC_INP_ENC_ALG_3DES_CBC_OVR_IV "ENC_ALG_3DES_CBC_OVR_IV" -static void crypto_test_enc_alg_3des_cbc_ovr_iv(void) +void crypto_test_enc_alg_3des_cbc_ovr_iv(void) { odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 }, auth_key = { .data = NULL, .length = 0 }; @@ -199,7 +200,7 @@ static void crypto_test_enc_alg_3des_cbc_ovr_iv(void) * packet buffer as completion event buffer. * */ #define ASYNC_INP_DEC_ALG_3DES_CBC "DEC_ALG_3DES_CBC" -static void crypto_test_dec_alg_3des_cbc(void) +void crypto_test_dec_alg_3des_cbc(void) { odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 }, auth_key = { .data = NULL, .length = 0 }; @@ -234,7 +235,7 @@ static void crypto_test_dec_alg_3des_cbc(void) * packet buffer as completion event buffer. * */ #define ASYNC_INP_DEC_ALG_3DES_CBC_OVR_IV "DEC_ALG_3DES_CBC_OVR_IV" -static void crypto_test_dec_alg_3des_cbc_ovr_iv(void) +void crypto_test_dec_alg_3des_cbc_ovr_iv(void) { odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 }, auth_key = { .data = NULL, .length = 0 }; @@ -270,7 +271,7 @@ static void crypto_test_dec_alg_3des_cbc_ovr_iv(void) * packet buffer as completion event buffer. * */ #define ASYNC_INP_ALG_HMAC_MD5 "ALG_HMAC_MD5" -static void crypto_test_alg_hmac_md5(void) +void crypto_test_alg_hmac_md5(void) { odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 }, auth_key = { .data = NULL, .length = 0 };