[rtems commit] smpmulticast01: Use T_TEST_CASE()
Sebastian Huber
sebh at rtems.org
Tue May 21 04:25:00 UTC 2019
Module: rtems
Branch: master
Commit: 317997fd1bbf7ed46637b10fa04ffe8d6bb4c7a4
Changeset: http://git.rtems.org/rtems/commit/?id=317997fd1bbf7ed46637b10fa04ffe8d6bb4c7a4
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Sat Apr 20 10:09:43 2019 +0200
smpmulticast01: Use T_TEST_CASE()
---
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 f8e74e2..a2180bd 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();
More information about the vc
mailing list