[PATCH v1 16/22] test/qtest/hace: Add SHA-384 tests for AST2600

Jamin Lin via posted 22 patches 10 months, 3 weeks ago
There is a newer version of this series
[PATCH v1 16/22] test/qtest/hace: Add SHA-384 tests for AST2600
Posted by Jamin Lin via 10 months, 3 weeks ago
Introduced "test_sha384_ast2600" to validate SHA-384 hashing.
Added "test_sha384_sg_ast2600" for scatter-gather SHA-384 verification.
Implemented "test_sha384_accum_ast2600" to test SHA-384 accumulation.
Registered new test cases in "main" to ensure execution.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 tests/qtest/aspeed_hace-test.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/qtest/aspeed_hace-test.c b/tests/qtest/aspeed_hace-test.c
index 42a306af2a..ab0c98330e 100644
--- a/tests/qtest/aspeed_hace-test.c
+++ b/tests/qtest/aspeed_hace-test.c
@@ -44,6 +44,16 @@ static void test_sha256_sg_ast2600(void)
     aspeed_test_sha256_sg("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
 }
 
+static void test_sha384_ast2600(void)
+{
+    aspeed_test_sha384("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
+}
+
+static void test_sha384_sg_ast2600(void)
+{
+    aspeed_test_sha384_sg("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
+}
+
 static void test_sha512_ast2600(void)
 {
     aspeed_test_sha512("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
@@ -59,6 +69,11 @@ static void test_sha256_accum_ast2600(void)
     aspeed_test_sha256_accum("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
 }
 
+static void test_sha384_accum_ast2600(void)
+{
+    aspeed_test_sha384_accum("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
+}
+
 static void test_sha512_accum_ast2600(void)
 {
     aspeed_test_sha512_accum("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
@@ -117,13 +132,16 @@ int main(int argc, char **argv)
 
     qtest_add_func("ast2600/hace/addresses", test_addresses_ast2600);
     qtest_add_func("ast2600/hace/sha512", test_sha512_ast2600);
+    qtest_add_func("ast2600/hace/sha384", test_sha384_ast2600);
     qtest_add_func("ast2600/hace/sha256", test_sha256_ast2600);
     qtest_add_func("ast2600/hace/md5", test_md5_ast2600);
 
     qtest_add_func("ast2600/hace/sha512_sg", test_sha512_sg_ast2600);
+    qtest_add_func("ast2600/hace/sha384_sg", test_sha384_sg_ast2600);
     qtest_add_func("ast2600/hace/sha256_sg", test_sha256_sg_ast2600);
 
     qtest_add_func("ast2600/hace/sha512_accum", test_sha512_accum_ast2600);
+    qtest_add_func("ast2600/hace/sha384_accum", test_sha384_accum_ast2600);
     qtest_add_func("ast2600/hace/sha256_accum", test_sha256_accum_ast2600);
 
     qtest_add_func("ast2500/hace/addresses", test_addresses_ast2500);
-- 
2.43.0
Re: [PATCH v1 16/22] test/qtest/hace: Add SHA-384 tests for AST2600
Posted by Cédric Le Goater 10 months, 1 week ago
On 3/21/25 10:26, Jamin Lin wrote:
> Introduced "test_sha384_ast2600" to validate SHA-384 hashing.
> Added "test_sha384_sg_ast2600" for scatter-gather SHA-384 verification.
> Implemented "test_sha384_accum_ast2600" to test SHA-384 accumulation.
> Registered new test cases in "main" to ensure execution.
> 
> Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.


> ---
>   tests/qtest/aspeed_hace-test.c | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/tests/qtest/aspeed_hace-test.c b/tests/qtest/aspeed_hace-test.c
> index 42a306af2a..ab0c98330e 100644
> --- a/tests/qtest/aspeed_hace-test.c
> +++ b/tests/qtest/aspeed_hace-test.c
> @@ -44,6 +44,16 @@ static void test_sha256_sg_ast2600(void)
>       aspeed_test_sha256_sg("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
>   }
>   
> +static void test_sha384_ast2600(void)
> +{
> +    aspeed_test_sha384("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
> +}
> +
> +static void test_sha384_sg_ast2600(void)
> +{
> +    aspeed_test_sha384_sg("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
> +}
> +
>   static void test_sha512_ast2600(void)
>   {
>       aspeed_test_sha512("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
> @@ -59,6 +69,11 @@ static void test_sha256_accum_ast2600(void)
>       aspeed_test_sha256_accum("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
>   }
>   
> +static void test_sha384_accum_ast2600(void)
> +{
> +    aspeed_test_sha384_accum("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
> +}
> +
>   static void test_sha512_accum_ast2600(void)
>   {
>       aspeed_test_sha512_accum("-machine ast2600-evb", 0x1e6d0000, 0x80000000);
> @@ -117,13 +132,16 @@ int main(int argc, char **argv)
>   
>       qtest_add_func("ast2600/hace/addresses", test_addresses_ast2600);
>       qtest_add_func("ast2600/hace/sha512", test_sha512_ast2600);
> +    qtest_add_func("ast2600/hace/sha384", test_sha384_ast2600);
>       qtest_add_func("ast2600/hace/sha256", test_sha256_ast2600);
>       qtest_add_func("ast2600/hace/md5", test_md5_ast2600);
>   
>       qtest_add_func("ast2600/hace/sha512_sg", test_sha512_sg_ast2600);
> +    qtest_add_func("ast2600/hace/sha384_sg", test_sha384_sg_ast2600);
>       qtest_add_func("ast2600/hace/sha256_sg", test_sha256_sg_ast2600);
>   
>       qtest_add_func("ast2600/hace/sha512_accum", test_sha512_accum_ast2600);
> +    qtest_add_func("ast2600/hace/sha384_accum", test_sha384_accum_ast2600);
>       qtest_add_func("ast2600/hace/sha256_accum", test_sha256_accum_ast2600);
>   
>       qtest_add_func("ast2500/hace/addresses", test_addresses_ast2500);