diff options
Diffstat (limited to 'spec/testsuites/validation-0.yml')
-rw-r--r-- | spec/testsuites/validation-0.yml | 57 |
1 files changed, 42 insertions, 15 deletions
diff --git a/spec/testsuites/validation-0.yml b/spec/testsuites/validation-0.yml index 3822bf9d..0a20e76d 100644 --- a/spec/testsuites/validation-0.yml +++ b/spec/testsuites/validation-0.yml @@ -4,9 +4,12 @@ copyrights: enabled-by: true links: [] test-brief: | - This test suite contains a collection of unrelated test cases. + This general purpose validation test suite provides enough resources to run + basic tests for all specified managers and functions. test-code: | - static char runner_task_stack[ RTEMS_MINIMUM_STACK_SIZE ]; + #include <rtems/test-info.h> + + const char rtems_test_name[] = "Validation0"; static char buffer[ 512 ]; @@ -24,7 +27,7 @@ test-code: | }; static const T_config test_config = { - .name = "Validation0", + .name = rtems_test_name, .buf = buffer, .buf_size = sizeof( buffer ), .putchar = rtems_put_char, @@ -34,36 +37,54 @@ test-code: | .actions = actions }; - static void Init( rtems_task_argument arg ) + static void runner_task( rtems_task_argument arg ) { int exit_code; (void) arg; + rtems_test_begin( rtems_test_name, TEST_STATE ); T_register(); exit_code = T_main( &test_config ); + + if ( exit_code == 0 ) { + rtems_test_end( rtems_test_name ); + } + rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code ); } + #define MAX_TLS_SIZE 64 + #define ATTRIBUTES RTEMS_FLOATING_POINT + + RTEMS_TASK_STORAGE_ALIGNMENT static char runner_task_storage[ + RTEMS_TASK_STORAGE_SIZE( + MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE, + ATTRIBUTES + ) + ]; + + static const rtems_task_config runner_task_config = { + .name = rtems_build_name( 'R', 'U', 'N', ' ' ), + .initial_priority = 1, + .storage_area = runner_task_storage, + .storage_size = sizeof( runner_task_storage ), + .maximum_thread_local_storage_size = MAX_TLS_SIZE, + .initial_modes = RTEMS_DEFAULT_MODES, + .attributes = ATTRIBUTES + }; + static void init_runner_task(void) { - static const rtems_task_config task_config = { - .name = rtems_build_name('R', 'U', 'N', ' '), - .initial_priority = 1, - .stack_area = runner_task_stack, - .stack_size = sizeof( runner_task_stack ), - .initial_modes = RTEMS_DEFAULT_MODES, - .attribute_set = RTEMS_DEFAULT_ATTRIBUTES - }; rtems_id id; rtems_status_code sc; - sc = rtems_task_build( &task_config, &id ); + sc = rtems_task_create_from_config( &runner_task_config, &id ); if ( sc != RTEMS_SUCCESSFUL ) { rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 ); } - sc = rtems_task_start( id, Init, 0 ); + sc = rtems_task_start( id, runner_task, 0 ); if ( sc != RTEMS_SUCCESSFUL ) { rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 ); } @@ -107,6 +128,8 @@ test-code: | #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body + #if defined(RTEMS_SMP) + #define CONFIGURE_SCHEDULER_EDF_SMP #include <rtems/scheduler.h> @@ -128,10 +151,14 @@ test-code: | RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL) + #endif /* RTEMS_SMP */ + #define CONFIGURE_INIT #include <rtems/confdefs.h> -test-description: null +test-description: | + In SMP configurations, up to three scheduler instances using the SMP EDF + scheduler are provided using up to four processors. test-includes: - rtems.h - rtems/bspIo.h |