summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorHemant Agrawal <hemant.agrawal@nxp.com>2019-10-01 17:11:19 +0530
committerAkhil Goyal <akhil.goyal@nxp.com>2019-10-09 11:50:12 +0200
commite2e60edbdbfcf991db14058bb1aa031da0705b7c (patch)
treee9964d9bab78be0ab1bb648e72671949e98a92ba /app
parent0f44e7b7aa56f92d9bb383ddbabb2602a7e5619b (diff)
downloaddpdk-e2e60edbdbfcf991db14058bb1aa031da0705b7c.zip
dpdk-e2e60edbdbfcf991db14058bb1aa031da0705b7c.tar.gz
dpdk-e2e60edbdbfcf991db14058bb1aa031da0705b7c.tar.xz
test/crypto: add negative cases for NXP drivers
Negative cases with wrong cipher/auth text added to dpaa_sec and dpaa2_sec PMD test suites. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Diffstat (limited to 'app')
-rw-r--r--app/test/test_cryptodev.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index c83d962..089adf8 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -12128,6 +12128,16 @@ static struct unit_test_suite cryptodev_dpaa_sec_testsuite = {
TEST_CASE_ST(ut_setup, ut_teardown,
test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
+ /** Negative tests */
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ authentication_verify_HMAC_SHA1_fail_data_corrupt),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ authentication_verify_HMAC_SHA1_fail_tag_corrupt),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt),
+
TEST_CASES_END() /**< NULL terminate unit test array */
}
};
@@ -12351,6 +12361,16 @@ static struct unit_test_suite cryptodev_dpaa2_sec_testsuite = {
TEST_CASE_ST(ut_setup, ut_teardown,
test_zuc_hash_generate_test_case_8),
+ /** Negative tests */
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ authentication_verify_HMAC_SHA1_fail_data_corrupt),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ authentication_verify_HMAC_SHA1_fail_tag_corrupt),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt),
+
TEST_CASES_END() /**< NULL terminate unit test array */
}
};