[rtems-central commit] spec: Add performance test suite

Sebastian Huber sebh at rtems.org
Fri Nov 13 10:09:47 UTC 2020


Module:    rtems-central
Branch:    master
Commit:    de365f1f17a7d4149810ce367dc3d3db3f22cca7
Changeset: http://git.rtems.org/rtems-central/commit/?id=de365f1f17a7d4149810ce367dc3d3db3f22cca7

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov 11 15:41:16 2020 +0100

spec: Add performance test suite

---

 spec/testsuites/performance-0.yml |  20 +++++
 spec/testsuites/validation-0.yml  | 155 +-------------------------------------
 2 files changed, 21 insertions(+), 154 deletions(-)

diff --git a/spec/testsuites/performance-0.yml b/spec/testsuites/performance-0.yml
new file mode 100644
index 0000000..b9784e6
--- /dev/null
+++ b/spec/testsuites/performance-0.yml
@@ -0,0 +1,20 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-brief: |
+  This general purpose performance test suite provides enough resources to run
+  basic performance tests for all specified managers and functions.
+test-code: |
+  const char rtems_test_name[] = "Performance0";
+
+  #include "ts-default.h"
+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/test-info.h
+test-local-includes: []
+test-target: testsuites/validation/ts-performance-0.c
+type: test-suite
diff --git a/spec/testsuites/validation-0.yml b/spec/testsuites/validation-0.yml
index f9cd552..b8fc847 100644
--- a/spec/testsuites/validation-0.yml
+++ b/spec/testsuites/validation-0.yml
@@ -9,165 +9,12 @@ test-brief: |
 test-code: |
   const char rtems_test_name[] = "Validation0";
 
-  static char buffer[ 512 ];
-
-  static const T_action actions[] = {
-    T_report_hash_sha256,
-    T_check_task_context,
-    T_check_rtems_barriers,
-    T_check_rtems_extensions,
-    T_check_rtems_message_queues,
-    T_check_rtems_partitions,
-    T_check_rtems_periods,
-    T_check_rtems_semaphores,
-    T_check_rtems_tasks,
-    T_check_rtems_timers
-  };
-
-  static const T_config test_config = {
-    .name = rtems_test_name,
-    .buf = buffer,
-    .buf_size = sizeof( buffer ),
-    .putchar = rtems_put_char,
-    .verbosity = RTEMS_TEST_VERBOSITY,
-    .now = T_now_clock,
-    .action_count = T_ARRAY_SIZE( actions ),
-    .actions = actions
-  };
-
-  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 RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
-
-  #define ATTRIBUTES RTEMS_FLOATING_POINT
-
-  RTEMS_ALIGNED( 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)
-  {
-    rtems_id id;
-    rtems_status_code sc;
-
-    sc = rtems_task_construct( &runner_task_config, &id );
-    if ( sc != RTEMS_SUCCESSFUL ) {
-      rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
-    }
-
-    sc = rtems_task_start( id, runner_task, 0 );
-    if ( sc != RTEMS_SUCCESSFUL ) {
-      rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
-    }
-  }
-
-  RTEMS_SYSINIT_ITEM(
-    init_runner_task,
-    RTEMS_SYSINIT_CLASSIC_USER_TASKS,
-    RTEMS_SYSINIT_ORDER_MIDDLE
-  );
-
-  #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-  #define CONFIGURE_MAXIMUM_PROCESSORS 4
-
-  #define CONFIGURE_MAXIMUM_BARRIERS 3
-
-  #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 3
-
-  #define CONFIGURE_MAXIMUM_PARTITIONS 3
-
-  #define CONFIGURE_MAXIMUM_PERIODS 3
-
-  #define CONFIGURE_MAXIMUM_SEMAPHORES 3
-
-  #define CONFIGURE_MAXIMUM_TASKS 3
-
-  #define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE \
-    CONFIGURE_MAXIMUM_TASKS
-
-  #define CONFIGURE_MAXIMUM_TIMERS 3
-
-  #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 3
-
-  #define CONFIGURE_MICROSECONDS_PER_TICK 1000
-
-  #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
-
-  #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
-
-  #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
-
-  #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
-
-  #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
-
-  #if defined(RTEMS_SMP)
-
-  #define CONFIGURE_SCHEDULER_EDF_SMP
-
-  #include <rtems/scheduler.h>
-
-  RTEMS_SCHEDULER_EDF_SMP(a);
-
-  RTEMS_SCHEDULER_EDF_SMP(b);
-
-  RTEMS_SCHEDULER_EDF_SMP(c);
-
-  #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
-    RTEMS_SCHEDULER_TABLE_EDF_SMP(a, rtems_build_name('A', ' ', ' ', ' ')), \
-    RTEMS_SCHEDULER_TABLE_EDF_SMP(b, rtems_build_name('B', ' ', ' ', ' ')), \
-    RTEMS_SCHEDULER_TABLE_EDF_SMP(c, rtems_build_name('C', ' ', ' ', ' '))
-
-  #define CONFIGURE_SCHEDULER_ASSIGNMENTS \
-    RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
-    RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
-    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>
+  #include "ts-default.h"
 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
-- rtems/sysinit.h
 - rtems/test-info.h
-- rtems/testopts.h
 test-local-includes: []
 test-target: testsuites/validation/ts-validation-0.c
 type: test-suite



More information about the vc mailing list