From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4424BA0547; Fri, 23 Apr 2021 18:19:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C77F416FF; Fri, 23 Apr 2021 18:18:59 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id F2C90416FF for ; Fri, 23 Apr 2021 18:18:57 +0200 (CEST) IronPort-SDR: TRy8Z14GtunjBYRm0JAyZmoo1bVg6P6MNVHRUfs41r9BCY2FVMM6YPIaSU4clLL0CyK9sRhy6P oz2PSBQzgkOQ== X-IronPort-AV: E=McAfee;i="6200,9189,9963"; a="183572793" X-IronPort-AV: E=Sophos;i="5.82,246,1613462400"; d="scan'208";a="183572793" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2021 09:18:57 -0700 IronPort-SDR: 13N+C7QKiJhZGHqTToifJnWny0m135GAyoixlCuHRAA2BHcym6bByCuPGehEoZsyB5961Qr5j+ 9OLI+xUKk56g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,246,1613462400"; d="scan'208";a="428442354" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.223.148]) by orsmga008.jf.intel.com with ESMTP; 23 Apr 2021 09:18:53 -0700 From: Ciara Power To: dev@dpdk.org Cc: thomas@monjalon.net, declan.doherty@intel.com, gakhil@marvell.com, aconole@redhat.com, hemant.agrawal@nxp.com, anoobj@marvell.com, ruifeng.wang@arm.com, asomalap@amd.com, ajit.khaparde@broadcom.com, g.singh@nxp.com, Ciara Power Date: Fri, 23 Apr 2021 16:18:17 +0000 Message-Id: <20210423161820.2135053-5-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210423161820.2135053-1-ciara.power@intel.com> References: <20210423161820.2135053-1-ciara.power@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 4/7] test/crypto: replace unsupported with skipped X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Testcases were previously using -ENOTSUP and TEST_SKIPPED return statuses interchangeably. Both resulted in the testcase not being run. These return statuses are now standardised to TEST_SKIPPED. Signed-off-by: Ciara Power --- app/test/test_cryptodev.c | 464 ++++++++++++++++----------------- app/test/test_cryptodev_asym.c | 18 +- 2 files changed, 241 insertions(+), 241 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 4fe30ddb21..2c9477680e 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2060,12 +2060,12 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void) cap_idx.algo.auth = RTE_CRYPTO_AUTH_SHA1_HMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_AES_CBC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Generate test mbuf data and space for digest */ ut_params->ibuf = setup_test_string(ts_params->mbuf_pool, @@ -2593,7 +2593,7 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id, &ut_params->cipher_xform, ts_params->session_priv_mpool); if (status == -ENOTSUP) - return status; + return TEST_SKIPPED; TEST_ASSERT_EQUAL(status, 0, "session init failed"); return 0; @@ -2656,7 +2656,7 @@ create_wireless_cipher_auth_session(uint8_t dev_id, &ut_params->cipher_xform, ts_params->session_priv_mpool); if (status == -ENOTSUP) - return status; + return TEST_SKIPPED; TEST_ASSERT_EQUAL(status, 0, "session init failed"); TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); @@ -2732,7 +2732,7 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id, ts_params->session_priv_mpool); if (status == -ENOTSUP) - return status; + return TEST_SKIPPED; TEST_ASSERT_EQUAL(status, 0, "session init failed"); @@ -3076,17 +3076,17 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata) if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) && ((tdata->validAuthLenInBits.len % 8) != 0)) { printf("Device doesn't support NON-Byte Aligned Data.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -3094,7 +3094,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_SNOW3G_UIA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], @@ -3167,17 +3167,17 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata) if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) && ((tdata->validAuthLenInBits.len % 8) != 0)) { printf("Device doesn't support NON-Byte Aligned Data.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -3185,7 +3185,7 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_SNOW3G_UIA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], @@ -3258,11 +3258,11 @@ test_kasumi_authentication(const struct kasumi_hash_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -3270,7 +3270,7 @@ test_kasumi_authentication(const struct kasumi_hash_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_KASUMI_F9; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], @@ -3347,11 +3347,11 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -3359,7 +3359,7 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_KASUMI_F9; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], @@ -3571,11 +3571,11 @@ test_kasumi_encryption(const struct kasumi_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -3583,7 +3583,7 @@ test_kasumi_encryption(const struct kasumi_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -3667,7 +3667,7 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -3676,17 +3676,17 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata) if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather. " "Test Skipped.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -3767,13 +3767,13 @@ test_kasumi_encryption_oop(const struct kasumi_test_data *tdata) /* Data-path service does not support OOP */ if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -3854,13 +3854,13 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -3869,7 +3869,7 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata) printf("Device doesn't support out-of-place scatter-gather " "in both input and output mbufs. " "Test Skipped.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Create KASUMI session */ @@ -3945,13 +3945,13 @@ test_kasumi_decryption_oop(const struct kasumi_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -4029,11 +4029,11 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -4041,7 +4041,7 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -4121,11 +4121,11 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -4133,7 +4133,7 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -4211,13 +4211,13 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -4300,13 +4300,13 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -4316,7 +4316,7 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata) printf("Device doesn't support out-of-place scatter-gather " "in both input and output mbufs. " "Test Skipped.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Create SNOW 3G session */ @@ -4416,7 +4416,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata) if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) && ((tdata->validDataLenInBits.len % 8) != 0)) { printf("Device doesn't support NON-Byte Aligned Data.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -4425,13 +4425,13 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -4531,11 +4531,11 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -4543,7 +4543,7 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -4618,13 +4618,13 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata) cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -4710,17 +4710,17 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata) ((tdata->validAuthLenInBits.len % 8 != 0) || (tdata->validDataLenInBits.len % 8 != 0))) { printf("Device doesn't support NON-Byte Aligned Data.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Check if device supports ZUC EEA3 */ cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; @@ -4728,7 +4728,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata) if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Check if device supports ZUC EIA3 */ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; @@ -4736,7 +4736,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata) if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create ZUC session */ retval = create_zuc_cipher_auth_encrypt_generate_session( @@ -4817,11 +4817,11 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -4829,12 +4829,12 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_SNOW3G_UIA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create SNOW 3G session */ retval = create_wireless_algo_cipher_auth_session(ts_params->valid_devs[0], @@ -4933,15 +4933,15 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata, cap_idx.algo.auth = RTE_CRYPTO_AUTH_SNOW3G_UIA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -4950,16 +4950,16 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata, if (op_mode == OUT_OF_PLACE) { if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Create SNOW 3G session */ @@ -5125,15 +5125,15 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata, cap_idx.algo.auth = RTE_CRYPTO_AUTH_SNOW3G_UIA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_SNOW3G_UEA2; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -5143,24 +5143,24 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata, if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } else { if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { printf("Device doesn't support out-of-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } @@ -5332,12 +5332,12 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata, cap_idx.algo.auth = RTE_CRYPTO_AUTH_KASUMI_F9; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -5346,18 +5346,18 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata, if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; if (op_mode == OUT_OF_PLACE) { if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } @@ -5526,15 +5526,15 @@ test_kasumi_auth_cipher_sgl(const struct kasumi_test_data *tdata, cap_idx.algo.auth = RTE_CRYPTO_AUTH_KASUMI_F9; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -5544,24 +5544,24 @@ test_kasumi_auth_cipher_sgl(const struct kasumi_test_data *tdata, if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } else { if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { printf("Device doesn't support out-of-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } @@ -5729,11 +5729,11 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -5741,12 +5741,12 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_KASUMI_F9; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_KASUMI_F8; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create KASUMI session */ retval = create_wireless_algo_cipher_auth_session( @@ -5845,11 +5845,11 @@ test_zuc_encryption(const struct wireless_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; struct rte_cryptodev_sym_capability_idx cap_idx; @@ -5859,7 +5859,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata) if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create ZUC session */ retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], @@ -5941,10 +5941,10 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata) if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -5953,13 +5953,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata) if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather. " "Test Skipped.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } plaintext_len = ceil_byte_length(tdata->plaintext.len); @@ -6043,17 +6043,17 @@ test_zuc_authentication(const struct wireless_test_data *tdata) if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) && (tdata->validAuthLenInBits.len % 8 != 0)) { printf("Device doesn't support NON-Byte Aligned Data.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Check if device supports ZUC EIA3 */ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; @@ -6061,7 +6061,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata) if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create ZUC session */ retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], @@ -6140,7 +6140,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -6148,27 +6148,27 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (op_mode == IN_PLACE) { if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } else { if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { printf("Device doesn't support out-of-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } @@ -6338,7 +6338,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata, if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -6348,25 +6348,25 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata, if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } else { if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { printf("Device doesn't support out-of-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } @@ -6586,7 +6586,7 @@ test_kasumi_decryption_test_case_3(void) { /* rte_crypto_mbuf_to_vec does not support incomplete mbuf build */ if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; return test_kasumi_decryption(&kasumi_test_case_3); } @@ -6737,7 +6737,7 @@ test_snow3g_decryption_with_digest_test_case_1(void) if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support encrypted digest operations.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* @@ -6798,7 +6798,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 -ENOTSUP; + return TEST_SKIPPED; return test_snow3g_auth_cipher_sgl( &snow3g_auth_cipher_test_case_3, IN_PLACE, 0); } @@ -6815,7 +6815,7 @@ 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 -ENOTSUP; + return TEST_SKIPPED; return test_snow3g_auth_cipher_sgl( &snow3g_auth_cipher_partial_digest_encryption, IN_PLACE, 0); @@ -7142,13 +7142,13 @@ test_mixed_check_if_unsupported(const struct mixed_cipher_auth_test_data *tdata) cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = tdata->cipher_algo; if (rte_cryptodev_sym_capability_get(dev_id, &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Check if device supports particular hash algorithm */ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; cap_idx.algo.auth = tdata->auth_algo; if (rte_cryptodev_sym_capability_get(dev_id, &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; return 0; } @@ -7173,9 +7173,9 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, /* Check if device supports particular algorithms separately */ if (test_mixed_check_if_unsupported(tdata)) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -7183,7 +7183,7 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Create the session */ @@ -7270,7 +7270,7 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, RTE_CRYPTO_OP_STATUS_INVALID_SESSION) { printf("Device doesn't support this mixed combination. " "Test Skipped.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } ut_params->op = op; @@ -7367,9 +7367,9 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, /* Check if device supports particular algorithms */ if (test_mixed_check_if_unsupported(tdata)) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -7379,17 +7379,17 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } else { if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { printf("Device doesn't support out-of-place scatter-gather " "in both input and output mbufs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { printf("Device doesn't support digest encrypted.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } @@ -7476,7 +7476,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, RTE_CRYPTO_OP_STATUS_INVALID_SESSION) { printf("Device doesn't support this mixed combination. " "Test Skipped.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } ut_params->op = op; @@ -8028,7 +8028,7 @@ test_authenticated_encryption(const struct aead_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -8039,11 +8039,11 @@ test_authenticated_encryption(const struct aead_test_data *tdata) capability = rte_cryptodev_sym_capability_get( ts_params->valid_devs[0], &cap_idx); if (capability == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (rte_cryptodev_sym_capability_check_aead( capability, tdata->key.len, tdata->auth_tag.len, tdata->aad.len, tdata->iv.len)) - return -ENOTSUP; + return TEST_SKIPPED; /* Create AEAD session */ retval = create_aead_session(ts_params->valid_devs[0], @@ -8188,7 +8188,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc, sec_cap_idx.protocol = RTE_SECURITY_PROTOCOL_PDCP; sec_cap_idx.pdcp.domain = domain; if (rte_security_capability_get(ctx, &sec_cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Generate test mbuf data */ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); @@ -8374,7 +8374,7 @@ test_pdcp_proto_SGL(int i, int oop, sec_cap_idx.protocol = RTE_SECURITY_PROTOCOL_PDCP; sec_cap_idx.pdcp.domain = pdcp_test_params[i].domain; if (rte_security_capability_get(ctx, &sec_cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (fragsz > input_vec_len) fragsz = input_vec_len; @@ -8880,7 +8880,7 @@ test_PDCP_PROTO_all(void) uint64_t feat_flags = dev_info.feature_flags; if (!(feat_flags & RTE_CRYPTODEV_FF_SECURITY)) - return -ENOTSUP; + return TEST_SKIPPED; /* Set action type */ ut_params->type = gbl_action_type == RTE_SECURITY_ACTION_TYPE_NONE ? @@ -8889,7 +8889,7 @@ test_PDCP_PROTO_all(void) if (security_proto_supported(ut_params->type, RTE_SECURITY_PROTOCOL_PDCP) < 0) - return -ENOTSUP; + return TEST_SKIPPED; status = test_PDCP_PROTO_cplane_encap_all(); status += test_PDCP_PROTO_cplane_decap_all(); @@ -8936,7 +8936,7 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) sec_cap = rte_security_capability_get(ctx, &sec_cap_idx); if (sec_cap == NULL) - return -ENOTSUP; + return TEST_SKIPPED; while ((crypto_cap = &sec_cap->crypto_capabilities[j++])->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) { @@ -8954,7 +8954,7 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) } if (crypto_cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED) - return -ENOTSUP; + return TEST_SKIPPED; /* Setup source mbuf payload */ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); @@ -9112,7 +9112,7 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) sec_cap = rte_security_capability_get(ctx, &sec_cap_idx); if (sec_cap == NULL) - return -ENOTSUP; + return TEST_SKIPPED; while ((crypto_cap = &sec_cap->crypto_capabilities[j++])->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) { @@ -9130,7 +9130,7 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) } if (crypto_cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED) - return -ENOTSUP; + return TEST_SKIPPED; /* Setup source mbuf payload */ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); @@ -9265,10 +9265,10 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) printf("\t%2d)", n++); \ printf("+++++ PASSED:" #func"\n"); \ p++; \ - } else if (ret == -ENOTSUP) { \ + } else if (ret == TEST_SKIPPED) { \ printf("\t%2d)", n++); \ - printf("~~~~~ UNSUPP:" #func"\n"); \ - u++; \ + printf("~~~~~ SKIPPED:" #func"\n"); \ + s++; \ } else { \ printf("\t%2d)", n++); \ printf("----- FAILED:" #func"\n"); \ @@ -9279,7 +9279,7 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) static int test_DOCSIS_PROTO_uplink_all(void) { - int p = 0, u = 0, f = 0, n = 0; + int p = 0, s = 0, f = 0, n = 0; TEST_DOCSIS_COUNT(test_docsis_proto_uplink(1, &docsis_test_case_1)); TEST_DOCSIS_COUNT(test_docsis_proto_uplink(2, &docsis_test_case_2)); @@ -9309,8 +9309,8 @@ test_DOCSIS_PROTO_uplink_all(void) TEST_DOCSIS_COUNT(test_docsis_proto_uplink(26, &docsis_test_case_26)); if (f) - printf("## %s: %d passed out of %d (%d unsupported)\n", - __func__, p, n, u); + printf("## %s: %d passed out of %d (%d skipped)\n", + __func__, p, n, s); return f; }; @@ -9318,7 +9318,7 @@ test_DOCSIS_PROTO_uplink_all(void) static int test_DOCSIS_PROTO_downlink_all(void) { - int p = 0, u = 0, f = 0, n = 0; + int p = 0, s = 0, f = 0, n = 0; TEST_DOCSIS_COUNT(test_docsis_proto_downlink(1, &docsis_test_case_1)); TEST_DOCSIS_COUNT(test_docsis_proto_downlink(2, &docsis_test_case_2)); @@ -9348,8 +9348,8 @@ test_DOCSIS_PROTO_downlink_all(void) TEST_DOCSIS_COUNT(test_docsis_proto_downlink(26, &docsis_test_case_26)); if (f) - printf("## %s: %d passed out of %d (%d unsupported)\n", - __func__, p, n, u); + printf("## %s: %d passed out of %d (%d skipped)\n", + __func__, p, n, s); return f; }; @@ -9366,7 +9366,7 @@ test_DOCSIS_PROTO_all(void) uint64_t feat_flags = dev_info.feature_flags; if (!(feat_flags & RTE_CRYPTODEV_FF_SECURITY)) - return -ENOTSUP; + return TEST_SKIPPED; /* Set action type */ ut_params->type = gbl_action_type == RTE_SECURITY_ACTION_TYPE_NONE ? @@ -9375,7 +9375,7 @@ test_DOCSIS_PROTO_all(void) if (security_proto_supported(ut_params->type, RTE_SECURITY_PROTOCOL_DOCSIS) < 0) - return -ENOTSUP; + return TEST_SKIPPED; status = test_DOCSIS_PROTO_uplink_all(); status += test_DOCSIS_PROTO_downlink_all(); @@ -9547,7 +9547,7 @@ test_AES_GCM_auth_encryption_fail_iv_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.iv.data[0] += 1; res = test_authenticated_encryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "encryption not failed"); return TEST_SUCCESS; @@ -9563,7 +9563,7 @@ test_AES_GCM_auth_encryption_fail_in_data_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.plaintext.data[0] += 1; res = test_authenticated_encryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "encryption not failed"); return TEST_SUCCESS; @@ -9579,7 +9579,7 @@ test_AES_GCM_auth_encryption_fail_out_data_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.ciphertext.data[0] += 1; res = test_authenticated_encryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "encryption not failed"); return TEST_SUCCESS; @@ -9595,7 +9595,7 @@ test_AES_GCM_auth_encryption_fail_aad_len_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.aad.len += 1; res = test_authenticated_encryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "encryption not failed"); return TEST_SUCCESS; @@ -9614,7 +9614,7 @@ test_AES_GCM_auth_encryption_fail_aad_corrupt(void) aad[0] += 1; tdata.aad.data = aad; res = test_authenticated_encryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "encryption not failed"); return TEST_SUCCESS; @@ -9630,7 +9630,7 @@ test_AES_GCM_auth_encryption_fail_tag_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.auth_tag.data[0] += 1; res = test_authenticated_encryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "encryption not failed"); return TEST_SUCCESS; @@ -9653,7 +9653,7 @@ test_authenticated_decryption(const struct aead_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -9664,11 +9664,11 @@ test_authenticated_decryption(const struct aead_test_data *tdata) capability = rte_cryptodev_sym_capability_get( ts_params->valid_devs[0], &cap_idx); if (capability == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (rte_cryptodev_sym_capability_check_aead( capability, tdata->key.len, tdata->auth_tag.len, tdata->aad.len, tdata->iv.len)) - return -ENOTSUP; + return TEST_SKIPPED; /* Create AEAD session */ retval = create_aead_session(ts_params->valid_devs[0], @@ -9898,7 +9898,7 @@ test_AES_GCM_auth_decryption_fail_iv_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.iv.data[0] += 1; res = test_authenticated_decryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "decryption not failed"); return TEST_SUCCESS; @@ -9914,7 +9914,7 @@ test_AES_GCM_auth_decryption_fail_in_data_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.plaintext.data[0] += 1; res = test_authenticated_decryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "decryption not failed"); return TEST_SUCCESS; @@ -9929,7 +9929,7 @@ test_AES_GCM_auth_decryption_fail_out_data_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.ciphertext.data[0] += 1; res = test_authenticated_decryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "decryption not failed"); return TEST_SUCCESS; @@ -9944,7 +9944,7 @@ test_AES_GCM_auth_decryption_fail_aad_len_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.aad.len += 1; res = test_authenticated_decryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "decryption not failed"); return TEST_SUCCESS; @@ -9962,7 +9962,7 @@ test_AES_GCM_auth_decryption_fail_aad_corrupt(void) aad[0] += 1; tdata.aad.data = aad; res = test_authenticated_decryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "decryption not failed"); return TEST_SUCCESS; @@ -9977,7 +9977,7 @@ test_AES_GCM_auth_decryption_fail_tag_corrupt(void) memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); tdata.auth_tag.data[0] += 1; res = test_authenticated_decryption(&tdata); - if (res == -ENOTSUP) + if (res == TEST_SKIPPED) return res; TEST_ASSERT_EQUAL(res, TEST_FAILED, "authentication not failed"); return TEST_SUCCESS; @@ -9999,14 +9999,14 @@ test_authenticated_encryption_oop(const struct aead_test_data *tdata) cap_idx.algo.aead = tdata->algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; /* not supported with CPU crypto */ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Create AEAD session */ retval = create_aead_session(ts_params->valid_devs[0], @@ -10091,12 +10091,12 @@ test_authenticated_decryption_oop(const struct aead_test_data *tdata) cap_idx.algo.aead = tdata->algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* not supported with CPU crypto and raw data-path APIs*/ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO || global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; /* Create AEAD session */ retval = create_aead_session(ts_params->valid_devs[0], @@ -10176,12 +10176,12 @@ test_authenticated_encryption_sessionless( if (!(feat_flags & RTE_CRYPTODEV_FF_SYM_SESSIONLESS)) { printf("Device doesn't support Sessionless ops.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* not supported with CPU crypto */ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -10189,7 +10189,7 @@ test_authenticated_encryption_sessionless( cap_idx.algo.aead = tdata->algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); @@ -10278,18 +10278,18 @@ test_authenticated_decryption_sessionless( if (!(feat_flags & RTE_CRYPTODEV_FF_SYM_SESSIONLESS)) { printf("Device doesn't support Sessionless ops.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* not supported with CPU crypto */ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -10297,7 +10297,7 @@ test_authenticated_decryption_sessionless( cap_idx.algo.aead = tdata->algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* alloc mbuf and set payload */ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); @@ -10481,7 +10481,7 @@ test_stats(void) struct rte_cryptodev_stats stats; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -10489,16 +10489,16 @@ test_stats(void) cap_idx.algo.auth = RTE_CRYPTO_AUTH_SHA1_HMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_AES_CBC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats) - == -ENOTSUP) - return -ENOTSUP; + == TEST_SKIPPED) + return TEST_SKIPPED; rte_cryptodev_stats_reset(ts_params->valid_devs[0]); TEST_ASSERT((rte_cryptodev_stats_get(ts_params->valid_devs[0] + 600, @@ -10632,7 +10632,7 @@ test_MD5_HMAC_generate(const struct HMAC_MD5_vector *test_case) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -10641,7 +10641,7 @@ test_MD5_HMAC_generate(const struct HMAC_MD5_vector *test_case) cap_idx.algo.auth = RTE_CRYPTO_AUTH_MD5_HMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (MD5_HMAC_create_session(ts_params, ut_params, RTE_CRYPTO_AUTH_OP_GENERATE, test_case)) @@ -10705,7 +10705,7 @@ test_MD5_HMAC_verify(const struct HMAC_MD5_vector *test_case) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -10714,7 +10714,7 @@ test_MD5_HMAC_verify(const struct HMAC_MD5_vector *test_case) cap_idx.algo.auth = RTE_CRYPTO_AUTH_MD5_HMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; if (MD5_HMAC_create_session(ts_params, ut_params, RTE_CRYPTO_AUTH_OP_VERIFY, test_case)) { @@ -10789,12 +10789,12 @@ test_multi_session(void) cap_idx.algo.auth = RTE_CRYPTO_AUTH_SHA512_HMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_AES_CBC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(ut_params, aes_cbc_key, hmac_sha512_key); @@ -10917,12 +10917,12 @@ test_multi_session_random_usage(void) cap_idx.algo.auth = RTE_CRYPTO_AUTH_SHA512_HMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_AES_CBC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -11015,7 +11015,7 @@ test_null_invalid_operation(void) /* This test is for NULL PMD only */ if (gbl_driver_id != rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_NULL_PMD))) - return -ENOTSUP; + return TEST_SKIPPED; /* Setup Cipher Parameters */ ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; @@ -11072,7 +11072,7 @@ test_null_burst_operation(void) /* This test is for NULL PMD only */ if (gbl_driver_id != rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_NULL_PMD))) - return -ENOTSUP; + return TEST_SKIPPED; /* Setup Cipher Parameters */ ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; @@ -11536,7 +11536,7 @@ test_AES_GMAC_authentication(const struct gmac_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } int retval; @@ -11553,7 +11553,7 @@ test_AES_GMAC_authentication(const struct gmac_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_AES_GMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; retval = create_gmac_session(ts_params->valid_devs[0], tdata, RTE_CRYPTO_AUTH_OP_GENERATE); @@ -11670,7 +11670,7 @@ test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata) if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } TEST_ASSERT_NOT_EQUAL(tdata->gmac_tag.len, 0, @@ -11682,7 +11682,7 @@ test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata) cap_idx.algo.auth = RTE_CRYPTO_AUTH_AES_GMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; retval = create_gmac_session(ts_params->valid_devs[0], tdata, RTE_CRYPTO_AUTH_OP_VERIFY); @@ -11795,7 +11795,7 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata, cap_idx.algo.auth = RTE_CRYPTO_AUTH_AES_GMAC; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Check for any input SGL support */ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -11804,7 +11804,7 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata, if ((!(feature_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) || (!(feature_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT)) || (!(feature_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT))) - return -ENOTSUP; + return TEST_SKIPPED; if (fragsz > tdata->plaintext.len) fragsz = tdata->plaintext.len; @@ -11884,7 +11884,7 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata, ut_params->op->sym->m_src = ut_params->ibuf; if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; TEST_ASSERT_NOT_NULL( process_crypto_request(ts_params->valid_devs[0], @@ -12417,7 +12417,7 @@ test_authentication_verify_fail_when_data_corruption( if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -12426,7 +12426,7 @@ test_authentication_verify_fail_when_data_corruption( cap_idx.algo.auth = reference->auth_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create session */ @@ -12499,7 +12499,7 @@ test_authentication_verify_GMAC_fail_when_corruption( if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -12508,7 +12508,7 @@ test_authentication_verify_GMAC_fail_when_corruption( cap_idx.algo.auth = reference->auth_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create session */ retval = create_auth_cipher_session(ut_params, @@ -12584,7 +12584,7 @@ test_authenticated_decryption_fail_when_corruption( if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -12593,12 +12593,12 @@ test_authenticated_decryption_fail_when_corruption( cap_idx.algo.auth = reference->auth_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = reference->crypto_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create session */ retval = create_auth_cipher_session(ut_params, @@ -12674,7 +12674,7 @@ test_authenticated_encryt_with_esn( if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -12683,12 +12683,12 @@ test_authenticated_encryt_with_esn( cap_idx.algo.auth = reference->auth_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = reference->crypto_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create session */ memcpy(cipher_key, reference->cipher_key.data, @@ -12807,7 +12807,7 @@ test_authenticated_decrypt_with_esn( if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Verify the capabilities */ @@ -12816,12 +12816,12 @@ test_authenticated_decrypt_with_esn( cap_idx.algo.auth = reference->auth_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = reference->crypto_algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* Create session */ memcpy(cipher_key, reference->cipher_key.data, @@ -13013,11 +13013,11 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata, cap_idx.algo.aead = tdata->algo; if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], &cap_idx) == NULL) - return -ENOTSUP; + return TEST_SKIPPED; /* OOP not supported with CPU crypto */ if (oop && gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) - return -ENOTSUP; + return TEST_SKIPPED; /* Detailed check for the particular SGL support flag */ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); @@ -13025,14 +13025,14 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata, unsigned int sgl_in = fragsz < tdata->plaintext.len; if (sgl_in && (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL))) - return -ENOTSUP; + return TEST_SKIPPED; uint64_t feat_flags = dev_info.feature_flags; if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { printf("Device doesn't support RAW data-path APIs.\n"); - return -ENOTSUP; + return TEST_SKIPPED; } } else { unsigned int sgl_in = fragsz < tdata->plaintext.len; @@ -13040,19 +13040,19 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata, tdata->plaintext.len; /* Raw data path API does not support OOP */ if (global_api_test_type == CRYPTODEV_RAW_API_TEST) - return -ENOTSUP; + return TEST_SKIPPED; if (sgl_in && !sgl_out) { if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT)) - return -ENOTSUP; + return TEST_SKIPPED; } else if (!sgl_in && sgl_out) { if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT)) - return -ENOTSUP; + return TEST_SKIPPED; } else if (sgl_in && sgl_out) { if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) - return -ENOTSUP; + return TEST_SKIPPED; } } @@ -13323,7 +13323,7 @@ test_AES_GCM_auth_encrypt_SGL_in_place_1500B(void) /* This test is not for OPENSSL PMD */ if (gbl_driver_id == rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD))) - return -ENOTSUP; + return TEST_SKIPPED; return test_authenticated_encryption_SGL( &gcm_test_case_SGL_1, IN_PLACE, 1500, 0); diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 85cd076059..e935f38ca9 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -327,7 +327,7 @@ test_cryptodev_asym_op(struct crypto_testsuite_params *ts_params, if (capability == NULL) { RTE_LOG(INFO, USER1, "Device doesn't support MODEX. Test Skipped\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* Generate crypto op data structure */ @@ -665,7 +665,7 @@ test_rsa_sign_verify(void) RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) { RTE_LOG(INFO, USER1, "Device doesn't support sign op with " "exponent key type. Test Skipped\n"); - return -ENOTSUP; + return TEST_SKIPPED; } sess = rte_cryptodev_asym_session_create(sess_mpool); @@ -714,7 +714,7 @@ test_rsa_enc_dec(void) RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) { RTE_LOG(INFO, USER1, "Device doesn't support decrypt op with " "exponent key type. Test skipped\n"); - return -ENOTSUP; + return TEST_SKIPPED; } sess = rte_cryptodev_asym_session_create(sess_mpool); @@ -761,7 +761,7 @@ test_rsa_sign_verify_crt(void) if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT)) { RTE_LOG(INFO, USER1, "Device doesn't support sign op with " "quintuple key type. Test skipped\n"); - return -ENOTSUP; + return TEST_SKIPPED; } sess = rte_cryptodev_asym_session_create(sess_mpool); @@ -809,7 +809,7 @@ test_rsa_enc_dec_crt(void) if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT)) { RTE_LOG(INFO, USER1, "Device doesn't support decrypt op with " "quintuple key type. Test skipped\n"); - return -ENOTSUP; + return TEST_SKIPPED; } sess = rte_cryptodev_asym_session_create(sess_mpool); @@ -1501,7 +1501,7 @@ test_mod_inv(void) if (capability == NULL) { RTE_LOG(INFO, USER1, "Device doesn't support MOD INV. Test Skipped\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (rte_cryptodev_asym_xform_capability_check_modlen( @@ -1509,7 +1509,7 @@ test_mod_inv(void) modinv_xform.modinv.modulus.length)) { RTE_LOG(ERR, USER1, "Invalid MODULUS length specified\n"); - return -ENOTSUP; + return TEST_SKIPPED; } sess = rte_cryptodev_asym_session_create(sess_mpool); @@ -1626,14 +1626,14 @@ test_mod_exp(void) if (capability == NULL) { RTE_LOG(INFO, USER1, "Device doesn't support MOD EXP. Test Skipped\n"); - return -ENOTSUP; + return TEST_SKIPPED; } if (rte_cryptodev_asym_xform_capability_check_modlen( capability, modex_xform.modex.modulus.length)) { RTE_LOG(ERR, USER1, "Invalid MODULUS length specified\n"); - return -ENOTSUP; + return TEST_SKIPPED; } /* generate crypto op data structure */ -- 2.25.1