From patchwork Fri Jul 10 00:44:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50994 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 59E3E228E5 for ; Fri, 10 Jul 2015 00:47:54 +0000 (UTC) Received: by wgjx7 with SMTP id x7sf82727217wgj.3 for ; Thu, 09 Jul 2015 17:47:53 -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=1AoZPPz9Kl32OocxH8yUCk4mufyHVVVeKtXWywv5GbA=; b=ByZlAsyw0d87sg3RipIw1Cj1JYIcZJMVNet+JehIJV1MyRFakYHS8njjL9jQNXACvS E9CjfWl/QrBGcKJyPSFKSG/1rO9fpMjZ7FwxQ1Ekp6hDNyYsnQynO67+s9Y0vSzODkyO 7YuejhcZXZCGK9BML5TsTNQURXGsuJO2K8N430s4C2eOtQRGLLuSNw2wokZjx+iHc0RW t2HAlFvtnxgi86aT1Kmzl30kzd5gUrjq8P+Mf5YfEGYOJEZDs6NlxYzSqZ1S7r6cTbc8 tbBjNQcpbeyj5QtnAgbr9ZVaovNZHFaXDrIbEEO09jT2+NuRs7nv7s+n5x94J0J8m5XN M8Xw== X-Gm-Message-State: ALoCoQn3xooy9h0BChl9C0IX6gw01ifTjUgcPwfhWO4USKdod/ZPjWoxtvwfSonJy7Rb9krdqguv X-Received: by 10.112.99.37 with SMTP id en5mr9421600lbb.7.1436489273632; Thu, 09 Jul 2015 17:47:53 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.231 with SMTP id e7ls639578laa.34.gmail; Thu, 09 Jul 2015 17:47:53 -0700 (PDT) X-Received: by 10.152.37.102 with SMTP id x6mr17254083laj.69.1436489273484; Thu, 09 Jul 2015 17:47:53 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id bo7si6182383lbb.108.2015.07.09.17.47.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 17:47:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lagx9 with SMTP id x9so256043751lag.1 for ; Thu, 09 Jul 2015 17:47:53 -0700 (PDT) X-Received: by 10.152.22.99 with SMTP id c3mr17718073laf.32.1436489273371; Thu, 09 Jul 2015 17:47:53 -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 hn6csp1011254lbb; Thu, 9 Jul 2015 17:47:52 -0700 (PDT) X-Received: by 10.55.31.85 with SMTP id f82mr28356771qkf.88.1436489272101; Thu, 09 Jul 2015 17:47:52 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 82si8164029qkv.40.2015.07.09.17.47.50; Thu, 09 Jul 2015 17:47:52 -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 A68686203A; Fri, 10 Jul 2015 00:47:50 +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 301E662090; Fri, 10 Jul 2015 00:45:22 +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 98B046206D; Fri, 10 Jul 2015 00:45:13 +0000 (UTC) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by lists.linaro.org (Postfix) with ESMTPS id 7D3ED62077 for ; Fri, 10 Jul 2015 00:44:42 +0000 (UTC) Received: by lbzd8 with SMTP id d8so38678219lbz.0 for ; Thu, 09 Jul 2015 17:44:40 -0700 (PDT) X-Received: by 10.112.118.210 with SMTP id ko18mr17098770lbb.75.1436489080757; Thu, 09 Jul 2015 17:44:40 -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.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 17:44:39 -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:13 +0200 Message-Id: <1436489068-8929-3-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: crypto patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 02/17] 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.215.45 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 5b06cdc..88b0466 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 aacb511..747abf2 100644 --- a/test/validation/crypto/crypto.h +++ b/test/validation/crypto/crypto.h @@ -4,4 +4,28 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#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); 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 };