* [dpdk-dev] [PATCH] app/test: add 3DES tests into QuickAssist PMD testsuite
@ 2016-08-26 17:40 Fiona Trahe
0 siblings, 0 replies; only message in thread
From: Fiona Trahe @ 2016-08-26 17:40 UTC (permalink / raw)
To: dev
Cc: pablo.de.lara.guarch, john.griffin, deepak.k.jain,
arkadiuszx.kusztal, fiona.trahe
From: Fiona Trahe <fiona.trahe@intel.com>
This patch depends on
* 3DES QuickAssist driver patch:
http://dpdk.org/dev/patchwork/patch/15413/
* libcrypto test patch:
http://dpdk.org/dev/patchwork/patch/15344/
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
app/test/test_cryptodev.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index b7559b7..2c1d93a 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -3901,6 +3901,73 @@ authenticated_decryption_3DES192CTR_HMAC_SHA1(void)
&triple_des192ctr_hmac_sha1_test_vector);
}
+static int
+test_3DES_qat_all(void)
+{
+ int status;
+ int i = 0;
+
+ status = encryption_3DES128CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CBC PASS\n", ++i);
+ status = decryption_3DES128CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CBC PASS\n", ++i);
+ status = encryption_3DES192CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CBC PASS\n", ++i);
+ status = decryption_3DES192CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CBC PASS\n", ++i);
+ status = encryption_3DES128CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CTR PASS\n", ++i);
+ status = decryption_3DES128CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CTR PASS\n", ++i);
+ status = encryption_3DES192CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CTR PASS\n", ++i);
+ status = decryption_3DES192CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CTR PASS\n", ++i);
+ status = authenticated_encryption_3DES128CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES128CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES192CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES192CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES128CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES128CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES192CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES192CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES128CBC_HMAC_SHA1_out_of_place();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CBC_HMAC_SHA1_oop PASS\n",
+ ++i);
+ status = authenticated_decryption_3DES128CBC_HMAC_SHA1_out_of_place();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CBC_HMAC_SHA1_oop PASS\n",
+ ++i);
+
+ return TEST_SUCCESS;
+}
+
+
/* ***** AES-GCM Tests ***** */
static int
@@ -4902,6 +4969,7 @@ static struct unit_test_suite cryptodev_qat_testsuite = {
test_multi_session),
TEST_CASE_ST(ut_setup, ut_teardown, test_AES_qat_all),
+ TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_qat_all),
TEST_CASE_ST(ut_setup, ut_teardown, test_stats),
/** AES GCM Authenticated Encryption */
--
2.5.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-26 17:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 17:40 [dpdk-dev] [PATCH] app/test: add 3DES tests into QuickAssist PMD testsuite Fiona Trahe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).