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 <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2021-05-05 09:57:46 +02:00
commit b7c964da48

View file

@ -19,7 +19,7 @@ static struct k_work_delayable interrupting_work;
static volatile bool work_done; static volatile bool work_done;
static char dummy_string[0x1000]; static char dummy_string[0x1000];
static char dummy_digest_correct[HASH_LEN]; 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 volatile const struct k_thread *main_thread;
static void do_hash(char *hash) static void do_hash(char *hash)
@ -76,7 +76,7 @@ static void work_func(struct k_work *work)
zassert_equal(PSA_SUCCESS, status, NULL); zassert_equal(PSA_SUCCESS, status, NULL);
} }
void test_thread_swap(void) void test_thread_swap_tz(void)
{ {
int err; int err;
char dummy_digest[HASH_LEN]; char dummy_digest[HASH_LEN];
@ -141,8 +141,8 @@ void test_thread_swap(void)
void test_main(void) void test_main(void)
{ {
ztest_test_suite(test_thread_swap, ztest_test_suite(test_thread_swap_tz,
ztest_unit_test(test_thread_swap) ztest_unit_test(test_thread_swap_tz)
); );
ztest_run_test_suite(test_thread_swap); ztest_run_test_suite(test_thread_swap_tz);
} }