smptests: Print proper end of test message

Make sure that the end of test message is not mixed up with other test
output.
This commit is contained in:
Sebastian Huber
2023-05-23 14:19:13 +02:00
parent 6bc3ad3ed4
commit 3c1e264db6
3 changed files with 16 additions and 4 deletions

View File

@@ -35,6 +35,8 @@
const char rtems_test_name[] = "SMP 5";
static volatile bool init_task_done;
rtems_task Init(
rtems_task_argument argument
);
@@ -54,6 +56,10 @@ rtems_task Test_task(
rtems_task_argument argument
)
{
while (!init_task_done) {
/* Wait */
}
locked_printf( "Shut down from CPU %" PRIu32 "\n", rtems_scheduler_get_processor() );
success();
}
@@ -95,6 +101,8 @@ rtems_task Init(
directive_failed( status, "task start" );
}
init_task_done = true;
while (1)
;
}

View File

@@ -78,8 +78,6 @@ rtems_task Test_task(
if ( !TSRFired )
locked_printf( "*** ERROR TSR DID NOT FIRE BUT TEST TASK AWAKE***" );
TaskRan = true;
/* Print that the task is up and running. */
locked_printf(
" CPU %" PRIu32 " running Task %s after semaphore release\n",
@@ -87,6 +85,8 @@ rtems_task Test_task(
name
);
TaskRan = true;
rtems_task_exit();
}

View File

@@ -54,8 +54,12 @@ rtems_task Test_task(
status = rtems_clock_get_tod( &time );
rtems_test_assert( status == RTEMS_SUCCESSFUL );
if ( time.second >= 35 ) {
TEST_END();
rtems_test_exit( 0 );
if ( task_index == 1 ) {
TEST_END();
rtems_test_exit( 0 );
} else {
rtems_task_exit();
}
}
PrintTaskInfo( p, &time );