From fb44419c9b646c6320c6d64e04ae65f27e62e040 Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Mon, 18 Jul 2022 22:18:23 +0530
Subject: [PATCH] app/test: skip pdcp tests

Skipping zuc, snow3g and aes-ctr-cmac tests
that are not supported on cnxk platforms.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Change-Id: Id36f63a179e362ea702b694c9ea18af13c06713a
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev.c | 71 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index a33ef574cc..83a67368bf 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7519,6 +7519,13 @@ test_snow3g_cipher_auth_test_case_1(void)
 static int
 test_snow3g_auth_cipher_test_case_1(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher(
 		&snow3g_auth_cipher_test_case_1, IN_PLACE, 0);
 }
@@ -7540,6 +7547,13 @@ test_snow3g_auth_cipher_test_case_2_oop(void)
 static int
 test_snow3g_auth_cipher_part_digest_enc(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			IN_PLACE, 0);
@@ -7548,6 +7562,13 @@ test_snow3g_auth_cipher_part_digest_enc(void)
 static int
 test_snow3g_auth_cipher_part_digest_enc_oop(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			OUT_OF_PLACE, 0);
@@ -7559,6 +7580,7 @@ test_snow3g_auth_cipher_test_case_3_sgl(void)
 	/* rte_crypto_mbuf_to_vec does not support incomplete mbuf build */
 	if (global_api_test_type == CRYPTODEV_RAW_API_TEST)
 		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher_sgl(
 		&snow3g_auth_cipher_test_case_3, IN_PLACE, 0);
 }
@@ -7576,6 +7598,13 @@ test_snow3g_auth_cipher_part_digest_enc_sgl(void)
 	/* rte_crypto_mbuf_to_vec does not support incomplete mbuf build */
 	if (global_api_test_type == CRYPTODEV_RAW_API_TEST)
 		return TEST_SKIPPED;
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher_sgl(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			IN_PLACE, 0);
@@ -7584,6 +7613,13 @@ test_snow3g_auth_cipher_part_digest_enc_sgl(void)
 static int
 test_snow3g_auth_cipher_part_digest_enc_oop_sgl(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher_sgl(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			OUT_OF_PLACE, 0);
@@ -7620,6 +7656,13 @@ test_snow3g_auth_cipher_total_digest_enc_1_oop_sgl(void)
 static int
 test_snow3g_auth_cipher_verify_test_case_1(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher(
 		&snow3g_auth_cipher_test_case_1, IN_PLACE, 1);
 }
@@ -7641,6 +7684,13 @@ test_snow3g_auth_cipher_verify_test_case_2_oop(void)
 static int
 test_snow3g_auth_cipher_verify_part_digest_enc(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			IN_PLACE, 1);
@@ -7649,6 +7699,13 @@ test_snow3g_auth_cipher_verify_part_digest_enc(void)
 static int
 test_snow3g_auth_cipher_verify_part_digest_enc_oop(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			OUT_OF_PLACE, 1);
@@ -7671,6 +7728,13 @@ test_snow3g_auth_cipher_verify_test_case_3_oop_sgl(void)
 static int
 test_snow3g_auth_cipher_verify_part_digest_enc_sgl(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher_sgl(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			IN_PLACE, 1);
@@ -7679,6 +7743,13 @@ test_snow3g_auth_cipher_verify_part_digest_enc_sgl(void)
 static int
 test_snow3g_auth_cipher_verify_part_digest_enc_oop_sgl(void)
 {
+	if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN9K_PMD)))
+		return TEST_SKIPPED;
+	else if (gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_CN10K_PMD)))
+		return TEST_SKIPPED;
+
 	return test_snow3g_auth_cipher_sgl(
 		&snow3g_auth_cipher_partial_digest_encryption,
 			OUT_OF_PLACE, 1);
-- 
2.45.2

