From b7c964da48aeb3fafe8ddf93eb02038f13ce6a8d Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Wed, 5 May 2021 09:57:46 +0200 Subject: [PATCH] tests: arm_thread_swap_tz: decrease work delay to ensure test passing Decrease the submitted work delay, to ensure that the PSA crypto operation will be preempted when the work fires. The modification is required for devices with fast crypto operations. Also minor corrections to the test ase name, so it is not the same with the other arm_thread_swap test. Signed-off-by: Ioannis Glaropoulos --- tests/arch/arm/arm_thread_swap_tz/src/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/arch/arm/arm_thread_swap_tz/src/main.c b/tests/arch/arm/arm_thread_swap_tz/src/main.c index 2104dfccc22..47d71312653 100644 --- a/tests/arch/arm/arm_thread_swap_tz/src/main.c +++ b/tests/arch/arm/arm_thread_swap_tz/src/main.c @@ -19,7 +19,7 @@ static struct k_work_delayable interrupting_work; static volatile bool work_done; static char dummy_string[0x1000]; static char dummy_digest_correct[HASH_LEN]; -static const uint32_t delay_ms = 4; +static const uint32_t delay_ms = 1; static volatile const struct k_thread *main_thread; static void do_hash(char *hash) @@ -76,7 +76,7 @@ static void work_func(struct k_work *work) zassert_equal(PSA_SUCCESS, status, NULL); } -void test_thread_swap(void) +void test_thread_swap_tz(void) { int err; char dummy_digest[HASH_LEN]; @@ -141,8 +141,8 @@ void test_thread_swap(void) void test_main(void) { - ztest_test_suite(test_thread_swap, - ztest_unit_test(test_thread_swap) + ztest_test_suite(test_thread_swap_tz, + ztest_unit_test(test_thread_swap_tz) ); - ztest_run_test_suite(test_thread_swap); + ztest_run_test_suite(test_thread_swap_tz); }