[PATCH 02/18] smpmulticast01: Use T_TEST_CASE()
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon May 20 07:33:28 UTC 2019
---
testsuites/smptests/smpmulticast01/init.c | 49 +++++++++++++++++--------------
1 file changed, 27 insertions(+), 22 deletions(-)
diff --git a/testsuites/smptests/smpmulticast01/init.c b/testsuites/smptests/smpmulticast01/init.c
index f8e74e22cc..a2180bdf14 100644
--- a/testsuites/smptests/smpmulticast01/init.c
+++ b/testsuites/smptests/smpmulticast01/init.c
@@ -258,35 +258,40 @@ static void test_wrong_cpu_state_to_perform_jobs(void)
rtems_fatal(RTEMS_FATAL_SOURCE_APPLICATION, 0);
}
-static void Init(rtems_task_argument arg)
+T_TEST_CASE(UnicastDuringMultitasking)
{
- test_context *ctx;
-
- ctx = &test_instance;
+ test_unicast(&test_instance, _SMP_Multicast_action);
+}
- T_case_begin("UnicastDuringMultitasking", NULL);
- test_unicast(ctx, _SMP_Multicast_action);
- T_case_end();
+T_TEST_CASE(UnicastDuringMultitaskingIRQDisabled)
+{
+ test_unicast(&test_instance, multicast_action_irq_disabled);
+}
- T_case_begin("UnicastDuringMultitaskingIRQDisabled", NULL);
- test_unicast(ctx, multicast_action_irq_disabled);
- T_case_end();
+T_TEST_CASE(UnicastDuringMultitaskingDispatchDisabled)
+{
+ test_unicast(&test_instance, multicast_action_dispatch_disabled);
+}
- T_case_begin("UnicastDuringMultitaskingDispatchDisabled", NULL);
- test_unicast(ctx, multicast_action_dispatch_disabled);
- T_case_end();
+T_TEST_CASE(BroadcastDuringMultitasking)
+{
+ test_broadcast(&test_instance, _SMP_Multicast_action);
+}
- T_case_begin("BroadcastDuringMultitasking", NULL);
- test_broadcast(ctx, _SMP_Multicast_action);
- T_case_end();
+T_TEST_CASE(BroadcastDuringMultitaskingIRQDisabled)
+{
+ test_broadcast(&test_instance, multicast_action_irq_disabled);
+}
- T_case_begin("BroadcastDuringMultitaskingIRQDisabled", NULL);
- test_broadcast(ctx, multicast_action_irq_disabled);
- T_case_end();
+T_TEST_CASE(BroadcastDuringMultitaskingDispatchDisabled)
+{
+ test_broadcast(&test_instance, multicast_action_dispatch_disabled);
+}
- T_case_begin("BroadcastDuringMultitaskingDispatchDisabled", NULL);
- test_broadcast(ctx, multicast_action_dispatch_disabled);
- T_case_end();
+static void Init(rtems_task_argument arg)
+{
+ T_register();
+ T_run_all();
if (rtems_scheduler_get_processor_maximum() > 1) {
test_wrong_cpu_state_to_perform_jobs();
--
2.16.4
More information about the devel
mailing list