automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw121683 [PATCH] test/crypto: fix and improve ZUC cipher and auth tests
@ 2023-01-06 16:27 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2023-01-06 16:27 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 14405 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/121683

_apply patch failure_

Submitter: Ciara Power <ciara.power@intel.com>
Date: Friday, January 06 2023 16:15:36 
Applied on: CommitID:373f4c7de8ff350548cacc3d56e788461677f2c7
Apply patch set 121683 failed:

Checking patch app/test/test_cryptodev.c...
error: while searching for:
		debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);

		const uint8_t *reference_plaintext = tdata->plaintext.data +
				(tdata->validCipherOffsetInBits.len);

		/* Validate obuf */
		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(

error: patch failed: app/test/test_cryptodev.c:6059
error: while searching for:
	unsigned int plaintext_len = 0;
	unsigned int ciphertext_len = 0;
	const uint8_t *ciphertext, *plaintext;
	uint8_t ciphertext_buffer[2048], plaintext_buffer[2048];
	struct rte_cryptodev_info dev_info;

	/* Check if device supports ZUC EEA3 */

error: patch failed: app/test/test_cryptodev.c:6085
error: while searching for:
	if (direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
		if (ut_params->obuf)
			ciphertext = rte_pktmbuf_read(ut_params->obuf,
				0, plaintext_len, ciphertext_buffer);
		else
			ciphertext = rte_pktmbuf_read(ut_params->ibuf,
				0, plaintext_len, ciphertext_buffer);

		/* Validate obuf */
		debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);

error: patch failed: app/test/test_cryptodev.c:6174
error: while searching for:
	} else {
		if (ut_params->obuf)
			plaintext = rte_pktmbuf_read(ut_params->obuf,
				0, ciphertext_len, plaintext_buffer);
		else
			plaintext = rte_pktmbuf_read(ut_params->ibuf,
				0, ciphertext_len, plaintext_buffer);

		/* Validate obuf */
		debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);

error: patch failed: app/test/test_cryptodev.c:6191
error: while searching for:
}

static int
test_zuc_authentication(const struct wireless_test_data *tdata, uint8_t verify)
{
	struct crypto_testsuite_params *ts_params = &testsuite_params;
	struct crypto_unittest_params *ut_params = &unittest_params;

error: patch failed: app/test/test_cryptodev.c:6211
error: while searching for:
	retval = create_wireless_algo_hash_session(ts_params->valid_devs[0],
			tdata->key.data, tdata->key.len,
			tdata->auth_iv.len, tdata->digest.len,
			(verify ? RTE_CRYPTO_AUTH_OP_VERIFY
					: RTE_CRYPTO_AUTH_OP_GENERATE),
			RTE_CRYPTO_AUTH_ZUC_EIA3);
	if (retval != 0)
		return retval;


error: patch failed: app/test/test_cryptodev.c:6251
error: while searching for:
			tdata->digest.len,
			tdata->auth_iv.data, tdata->auth_iv.len,
			plaintext_pad_len,
			(verify ? RTE_CRYPTO_AUTH_OP_VERIFY
					: RTE_CRYPTO_AUTH_OP_GENERATE),
			tdata->validAuthLenInBits.len,
			0);
	if (retval < 0)
		return retval;


error: patch failed: app/test/test_cryptodev.c:6276
error: while searching for:
	ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
			+ plaintext_pad_len;

	if (!verify) {
		/* Validate obuf */
		TEST_ASSERT_BUFFERS_ARE_EQUAL(
				ut_params->digest,

error: patch failed: app/test/test_cryptodev.c:6294
error: while searching for:
static int
test_zuc_hash_generate_test_case_1(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_1b, 0);
}

static int
test_zuc_hash_generate_test_case_2(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_90b, 0);
}

static int
test_zuc_hash_generate_test_case_3(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_577b, 0);
}

static int
test_zuc_hash_generate_test_case_4(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_2079b, 0);
}

static int
test_zuc_hash_generate_test_case_5(void)
{
	return test_zuc_authentication(&zuc_test_auth_5670b, 0);
}

static int
test_zuc_hash_generate_test_case_6(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_128b, 0);
}

static int
test_zuc_hash_generate_test_case_7(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_2080b, 0);
}

static int
test_zuc_hash_generate_test_case_8(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_584b, 0);
}

static int
test_zuc_hash_generate_test_case_9(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b, 0);
}

static int
test_zuc_hash_generate_test_case_10(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b, 0);
}

static int
test_zuc_hash_generate_test_case_11(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b, 0);
}

static int
test_zuc_hash_verify_test_case_1(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_1b, 1);
}

static int
test_zuc_hash_verify_test_case_2(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_90b, 1);
}

static int
test_zuc_hash_verify_test_case_3(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_577b, 1);
}

static int
test_zuc_hash_verify_test_case_4(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_2079b, 1);
}

static int
test_zuc_hash_verify_test_case_5(void)
{
	return test_zuc_authentication(&zuc_test_auth_5670b, 1);
}

static int
test_zuc_hash_verify_test_case_6(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_128b, 1);
}

static int
test_zuc_hash_verify_test_case_7(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_2080b, 1);
}

static int
test_zuc_hash_verify_test_case_8(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_584b, 1);
}

static int
test_zuc_hash_verify_test_case_9(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b, 1);
}

static int
test_zuc_hash_verify_test_case_10(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b, 1);
}

static int
test_zuc_hash_verify_test_case_11(void)
{
	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b, 1);
}

static int

error: patch failed: app/test/test_cryptodev.c:7336
Applying patch app/test/test_cryptodev.c with 9 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
diff a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c	(rejected hunks)
@@ -6059,7 +6059,7 @@ test_zuc_cipher(const struct wireless_test_data *tdata,
 		debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);
 
 		const uint8_t *reference_plaintext = tdata->plaintext.data +
-				(tdata->validCipherOffsetInBits.len);
+				(tdata->validCipherOffsetInBits.len >> 3);
 
 		/* Validate obuf */
 		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@ -6085,7 +6085,7 @@ test_zuc_cipher_sgl(const struct wireless_test_data *tdata,
 	unsigned int plaintext_len = 0;
 	unsigned int ciphertext_len = 0;
 	const uint8_t *ciphertext, *plaintext;
-	uint8_t ciphertext_buffer[2048], plaintext_buffer[2048];
+	uint8_t buffer[2048];
 	struct rte_cryptodev_info dev_info;
 
 	/* Check if device supports ZUC EEA3 */
@@ -6174,10 +6174,10 @@ test_zuc_cipher_sgl(const struct wireless_test_data *tdata,
 	if (direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
 		if (ut_params->obuf)
 			ciphertext = rte_pktmbuf_read(ut_params->obuf,
-				0, plaintext_len, ciphertext_buffer);
+				0, plaintext_len, buffer);
 		else
 			ciphertext = rte_pktmbuf_read(ut_params->ibuf,
-				0, plaintext_len, ciphertext_buffer);
+				0, plaintext_len, buffer);
 
 		/* Validate obuf */
 		debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
@@ -6191,10 +6191,10 @@ test_zuc_cipher_sgl(const struct wireless_test_data *tdata,
 	} else {
 		if (ut_params->obuf)
 			plaintext = rte_pktmbuf_read(ut_params->obuf,
-				0, ciphertext_len, plaintext_buffer);
+				0, ciphertext_len, buffer);
 		else
 			plaintext = rte_pktmbuf_read(ut_params->ibuf,
-				0, ciphertext_len, plaintext_buffer);
+				0, ciphertext_len, buffer);
 
 		/* Validate obuf */
 		debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);
@@ -6211,7 +6211,8 @@ test_zuc_cipher_sgl(const struct wireless_test_data *tdata,
 }
 
 static int
-test_zuc_authentication(const struct wireless_test_data *tdata, uint8_t verify)
+test_zuc_authentication(const struct wireless_test_data *tdata,
+		enum rte_crypto_auth_operation auth_op)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
@@ -6251,9 +6252,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata, uint8_t verify)
 	retval = create_wireless_algo_hash_session(ts_params->valid_devs[0],
 			tdata->key.data, tdata->key.len,
 			tdata->auth_iv.len, tdata->digest.len,
-			(verify ? RTE_CRYPTO_AUTH_OP_VERIFY
-					: RTE_CRYPTO_AUTH_OP_GENERATE),
-			RTE_CRYPTO_AUTH_ZUC_EIA3);
+			auth_op, RTE_CRYPTO_AUTH_ZUC_EIA3);
 	if (retval != 0)
 		return retval;
 
@@ -6276,10 +6275,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata, uint8_t verify)
 			tdata->digest.len,
 			tdata->auth_iv.data, tdata->auth_iv.len,
 			plaintext_pad_len,
-			(verify ? RTE_CRYPTO_AUTH_OP_VERIFY
-					: RTE_CRYPTO_AUTH_OP_GENERATE),
-			tdata->validAuthLenInBits.len,
-			0);
+			auth_op, tdata->validAuthLenInBits.len, 0);
 	if (retval < 0)
 		return retval;
 
@@ -6294,7 +6290,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata, uint8_t verify)
 	ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
 			+ plaintext_pad_len;
 
-	if (!verify) {
+	if (auth_op != RTE_CRYPTO_AUTH_OP_VERIFY) {
 		/* Validate obuf */
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 				ut_params->digest,
@@ -7336,133 +7332,155 @@ test_zuc_decryption_test_case_6_sgl(void)
 static int
 test_zuc_hash_generate_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_1b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_1b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_90b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_90b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_3(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_577b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_577b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_4(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_2079b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_2079b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_5(void)
 {
-	return test_zuc_authentication(&zuc_test_auth_5670b, 0);
+	return test_zuc_authentication(&zuc_test_auth_5670b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_6(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_128b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_128b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_7(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_2080b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_2080b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_8(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_584b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_584b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_9(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_10(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_generate_test_case_11(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b, 0);
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc_hash_verify_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_1b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_1b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_90b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_90b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_3(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_577b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_577b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_4(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_2079b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_2079b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_5(void)
 {
-	return test_zuc_authentication(&zuc_test_auth_5670b, 1);
+	return test_zuc_authentication(&zuc_test_auth_5670b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_6(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_128b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_128b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_7(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_2080b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_2080b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_8(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_584b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_584b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_9(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_10(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc_hash_verify_test_case_11(void)
 {
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b, 1);
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int

https://lab.dpdk.org/results/dashboard/patchsets/24900/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-06 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 16:27 |WARNING| pw121683 [PATCH] test/crypto: fix and improve ZUC cipher and auth tests dpdklab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).