From patchwork Fri Jul 24 11:27:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51418 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id B53A520323 for ; Fri, 24 Jul 2015 11:31:44 +0000 (UTC) Received: by lagw2 with SMTP id w2sf6581299lag.3 for ; Fri, 24 Jul 2015 04:31:43 -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=C3Gpdy7reKoev1UW6qEbUJW0s0krFnCaFzsxBxzyucI=; b=P3TIp/4eVELN6itHAcUeq4NKYO1uZvwlcTnbaX49qSjSau9VWqbWZKNPkspSABRFvA pEoI12T/7rjuiJX7anWP8GMdBICMK70XoC4cxWyKyVvL039vCpF/pPkASTpfdkw4kB/P 2OuiinoPgK7i4bUskrluIGvUAOybNhk0hqJf9TnQ8ptvpkf3guLcXdFQ/HMi+z5c7YVK IPhWxLuU9Mf8ePFygfpn0FukUed5kSOR4oiC+9avAO0z5e0K4n2PJlVmBq1JlwxvzVPw CjPV2F2ETFpmdFp2D2jGDUwKhJf9yNcN41PO1BZR9GefsDxRaE30Almm2Lk5YQsrjvnh KDoQ== X-Gm-Message-State: ALoCoQnrXM+Y6nxKOVPJB7Aa1uczQpfwaNhXJP8Nn7ajxJ6LNUFdbGloJ/6G+zXq7dPG0w8k8htc X-Received: by 10.194.176.167 with SMTP id cj7mr6025877wjc.2.1437737503372; Fri, 24 Jul 2015 04:31:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.81 with SMTP id v17ls413858laz.2.gmail; Fri, 24 Jul 2015 04:31:43 -0700 (PDT) X-Received: by 10.112.124.33 with SMTP id mf1mr13341402lbb.66.1437737503211; Fri, 24 Jul 2015 04:31:43 -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 l3si7257788lbq.158.2015.07.24.04.31.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 04:31:43 -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 lblf12 with SMTP id f12so13263550lbl.2 for ; Fri, 24 Jul 2015 04:31:43 -0700 (PDT) X-Received: by 10.112.133.72 with SMTP id pa8mr13053643lbb.117.1437737503108; Fri, 24 Jul 2015 04:31:43 -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 l6csp1115512lba; Fri, 24 Jul 2015 04:31:42 -0700 (PDT) X-Received: by 10.140.94.196 with SMTP id g62mr19459923qge.72.1437737501119; Fri, 24 Jul 2015 04:31:41 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 73si9647130qhx.3.2015.07.24.04.31.40; Fri, 24 Jul 2015 04:31:41 -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 3DD5C61B62; Fri, 24 Jul 2015 11:31:40 +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 83B6061B1C; Fri, 24 Jul 2015 11:28: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 54FD761B1A; Fri, 24 Jul 2015 11:28:51 +0000 (UTC) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id 0B83361841 for ; Fri, 24 Jul 2015 11:28:06 +0000 (UTC) Received: by laah7 with SMTP id h7so12362004laa.0 for ; Fri, 24 Jul 2015 04:28:05 -0700 (PDT) X-Received: by 10.112.50.230 with SMTP id f6mr13077303lbo.17.1437737284973; Fri, 24 Jul 2015 04:28:04 -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.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jul 2015 04:28:04 -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:24 +0200 Message-Id: <1437737259-16953-6-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: crypto patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 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.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/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 ca7e740..7a407d9 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..9432338 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 registery: */ +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 };