test/crypto: fix the bug of AES-ECB test

Message ID 20250116083548.118-1-felix.zhang@jaguarmicro.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers
Series test/crypto: fix the bug of AES-ECB test |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Shaokai Zhang Jan. 16, 2025, 8:35 a.m. UTC
The test vector aes_test_data_19 plaintext is 192 bytes and this vector
is used to test 192-byte plaintext, but test vector plaintext.len
value is incorrectly assigned to 64.

The test vector aes_test_data_20 plaintext length is 256 bytes, but
testcase comment incorrectly describes it as "192-byte plaintext".

Fixes: c94c520b4163 ("crypto/aesni_mb: support AES-ECB")
Cc: stable@dpdk.org

Signed-off-by: Shaokai Zhang <felix.zhang@jaguarmicro.com>
Reviewed-by: Joey Xing <joey.xing@jaguarmicro.com>
---
 app/test/test_cryptodev_aes_test_vectors.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Akhil Goyal March 2, 2025, 8:25 p.m. UTC | #1
> The test vector aes_test_data_19 plaintext is 192 bytes and this vector
> is used to test 192-byte plaintext, but test vector plaintext.len
> value is incorrectly assigned to 64.
> 
> The test vector aes_test_data_20 plaintext length is 256 bytes, but
> testcase comment incorrectly describes it as "192-byte plaintext".
> 
> Fixes: c94c520b4163 ("crypto/aesni_mb: support AES-ECB")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shaokai Zhang <felix.zhang@jaguarmicro.com>
> Reviewed-by: Joey Xing <joey.xing@jaguarmicro.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto
  

Patch

diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
index 7127156cc4..505e603b7e 100644
--- a/app/test/test_cryptodev_aes_test_vectors.h
+++ b/app/test/test_cryptodev_aes_test_vectors.h
@@ -833,11 +833,11 @@  static const struct blockcipher_test_data aes_test_data_19 = {
 	},
 	.plaintext = {
 		.data = plaintext_aes192ecb_192bytes,
-		.len = 64
+		.len = 192
 	},
 	.ciphertext = {
 		.data = ciphertext_aes192ecb_192bytes,
-		.len = 64
+		.len = 192
 	}
 };
 
@@ -5103,7 +5103,7 @@  static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
 		.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
 	},
 	{
-		.test_descr = "AES-256-ECB Decryption (192-byte plaintext)",
+		.test_descr = "AES-256-ECB Decryption (256-byte plaintext)",
 		.test_data = &aes_test_data_20,
 		.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
 	},