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>
This commit is contained in:
Hemant Agrawal 2019-10-01 17:11:19 +05:30 committed by Akhil Goyal
parent 0f44e7b7aa
commit e2e60edbdb

View File

@ -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 */
}
};