diff options
Diffstat (limited to 'testsuites/smptests/smpmulticast01/init.c')
-rw-r--r-- | testsuites/smptests/smpmulticast01/init.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/testsuites/smptests/smpmulticast01/init.c b/testsuites/smptests/smpmulticast01/init.c index 96462e32e3..51a4624ea1 100644 --- a/testsuites/smptests/smpmulticast01/init.c +++ b/testsuites/smptests/smpmulticast01/init.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2019 embedded brains GmbH + * Copyright (C) 2019 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -390,7 +390,7 @@ static void set_wrong_cpu_state(void *arg) cpu_self = arg; T_step_eq_ptr(0, cpu_self, _Per_CPU_Get()); - cpu_self->state = 123; + _Per_CPU_Set_state(cpu_self, 123); while (true) { /* Do nothing */ @@ -466,7 +466,7 @@ T_TEST_CASE(JobOrder) } T_step(0); - _SMP_Send_message(_Per_CPU_Get_index(cpu_self), SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message(cpu_self, SMP_MESSAGE_PERFORM_JOBS); _Thread_Dispatch_enable(cpu_self); } @@ -505,9 +505,10 @@ T_TEST_CASE(AddJobInJob) _Per_CPU_Add_job(cpu_self, &add_job_in_job_jobs[0]); T_step(0); - _SMP_Send_message(_Per_CPU_Get_index(cpu_self), SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message(cpu_self, SMP_MESSAGE_PERFORM_JOBS); + _Per_CPU_Wait_for_job(cpu_self, &add_job_in_job_jobs[0]); T_step(2); - _SMP_Send_message(_Per_CPU_Get_index(cpu_self), SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message(cpu_self, SMP_MESSAGE_PERFORM_JOBS); _Thread_Dispatch_enable(cpu_self); } @@ -562,14 +563,16 @@ static void fatal_extension( bool ok; if (source == RTEMS_FATAL_SOURCE_SMP) { - T_step_eq_int(1, source, RTEMS_FATAL_SOURCE_SMP); - T_step_false(2, always_set_to_false, "unexpected argument value"); - T_step_eq_int(3, code, SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS); - T_case_end(); - - ok = T_run_finalize(); - rtems_test_assert(ok); - TEST_END(); + if (code != SMP_FATAL_SHUTDOWN_RESPONSE) { + T_step_eq_int(1, source, RTEMS_FATAL_SOURCE_SMP); + T_step_false(2, always_set_to_false, "unexpected argument value"); + T_step_eq_int(3, code, SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS); + T_case_end(); + + ok = T_run_finalize(); + rtems_test_assert(ok); + TEST_END(); + } } else if (source == RTEMS_FATAL_SOURCE_APPLICATION) { ok = T_run_finalize(); rtems_test_assert(ok); |