}
};
-static struct unit_test_suite cryptodev_octeontx_testsuite = {
- .suite_name = "Crypto Device OCTEONTX Unit Test Suite",
- .setup = testsuite_setup,
- .teardown = testsuite_teardown,
- .unit_test_cases = {
- TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_AES_cipheronly_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_cipheronly_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_authonly_all),
-
- /** AES GCM Authenticated Encryption */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_6),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_7),
-
- /** AES GCM Authenticated Decryption */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_6),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_7),
- /** AES GMAC Authentication */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_verify_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_verify_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_verify_test_case_3),
-
- /** SNOW 3G encrypt only (UEA2) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_5),
-
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_1_oop),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_1_oop),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_1_oop_sgl),
-
- /** SNOW 3G decrypt only (UEA2) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_5),
-
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_generate_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_generate_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_generate_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_verify_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_verify_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_verify_test_case_3),
-
- /** ZUC encrypt only (EEA3) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_6_sgl),
-
- /** KASUMI encrypt only (UEA1) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1_sgl),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1_oop_sgl),
- /** KASUMI decrypt only (UEA1) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_5),
-
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1_oop),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_1_oop),
-
- /** KASUMI hash only (UIA1) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_6),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_5),
-
- /** 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,
- authentication_verify_AES128_GMAC_fail_data_corrupt),
- TEST_CASE_ST(ut_setup, ut_teardown,
- authentication_verify_AES128_GMAC_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 */
- }
-};
-
static struct unit_test_suite cryptodev_nitrox_testsuite = {
.suite_name = "Crypto NITROX Unit Test Suite",
.setup = testsuite_setup,
}
};
-static struct unit_test_suite cryptodev_octeontx2_testsuite = {
- .suite_name = "Crypto Device OCTEON TX2 Unit Test Suite",
- .setup = testsuite_setup,
- .teardown = testsuite_teardown,
- .unit_test_cases = {
- TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_AES_cipheronly_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_cipheronly_all),
- TEST_CASE_ST(ut_setup, ut_teardown, test_authonly_all),
-
- /** AES GCM Authenticated Encryption */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_6),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_encryption_test_case_7),
-
- /** AES GCM Authenticated Decryption */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_6),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GCM_authenticated_decryption_test_case_7),
- /** AES GMAC Authentication */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_verify_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_verify_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_AES_GMAC_authentication_verify_test_case_3),
-
- /** SNOW 3G encrypt only (UEA2) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_5),
-
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_1_oop),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_1_oop),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_encryption_test_case_1_oop_sgl),
-
- /** SNOW 3G decrypt only (UEA2) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_decryption_test_case_5),
-
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_generate_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_generate_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_generate_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_verify_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_verify_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_hash_verify_test_case_3),
-
- /** ZUC encrypt only (EEA3) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_hash_generate_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_6_sgl),
-
- /** KASUMI encrypt only (UEA1) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1_sgl),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1_oop_sgl),
- /** KASUMI decrypt only (UEA1) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_5),
-
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_encryption_test_case_1_oop),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_decryption_test_case_1_oop),
-
- /** KASUMI hash only (UIA1) */
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_5),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_generate_test_case_6),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_2),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_3),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_4),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_kasumi_hash_verify_test_case_5),
-
- /** 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,
- authentication_verify_AES128_GMAC_fail_data_corrupt),
- TEST_CASE_ST(ut_setup, ut_teardown,
- authentication_verify_AES128_GMAC_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 */
- }
-};
-
static int
test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
{
"testsuite.\n");
return TEST_FAILED;
}
- return unit_test_suite_runner(&cryptodev_octeontx_testsuite);
+ return unit_test_suite_runner(&cryptodev_testsuite);
}
static int
"testsuite.\n");
return TEST_FAILED;
}
- return unit_test_suite_runner(&cryptodev_octeontx2_testsuite);
+ return unit_test_suite_runner(&cryptodev_testsuite);
}
static int