[rtems-central commit] spec: Remove space profile test suite
Sebastian Huber
sebh at rtems.org
Tue Aug 17 07:36:33 UTC 2021
Module: rtems-central
Branch: master
Commit: 600a9757297612cc98708f956f57a723f25311ae
Changeset: http://git.rtems.org/rtems-central/commit/?id=600a9757297612cc98708f956f57a723f25311ae
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Aug 16 19:13:53 2021 +0200
spec: Remove space profile test suite
---
spec/testsuites/validation/c-library.yml | 93 --------------
spec/testsuites/validation/classic-barrier.yml | 106 ---------------
spec/testsuites/validation/profile.yml | 171 -------------------------
3 files changed, 370 deletions(-)
diff --git a/spec/testsuites/validation/c-library.yml b/spec/testsuites/validation/c-library.yml
deleted file mode 100644
index 0239e03..0000000
--- a/spec/testsuites/validation/c-library.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-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-actions:
-- action-brief: |
- Allocate four bytes with an alignment of 128 bytes with posix_memalign().
- action-code: |
- void *p;
- int eno;
-
- p = (void *)(uintptr_t) 1;
- eno = posix_memalign(&p, 128, 4);
- checks:
- - brief: |
- Check that the returned status is zero.
- code: |
- T_step_eq_int(${step}, eno, 0);
- links: []
- - brief: |
- Check that the returned pointer is not NULL.
- code: |
- T_step_not_null(${step}, p);
- links: []
- - brief: |
- Check that the returned pointer is aligned by 128 bytes.
- code: |
- T_step_eq_uptr(${step}, (uintptr_t) p % 128, 0);
- links: []
- links: []
-- action-brief: |
- Allocate four bytes with rtems_malloc().
- action-code: |
- void *p;
-
- p = rtems_malloc(4);
- checks:
- - brief: |
- Check that the returned pointer is not NULL.
- code: |
- T_step_not_null(${step}, p);
- links: []
- links: []
-- action-brief: |
- Set an integer variable to one and then to zero with memset().
- action-code: |
- int d;
-
- d = 1;
- memset(&d, 0, sizeof(d));
- checks:
- - brief: |
- Check that the integer variable is equal to zero.
- code: |
- T_step_eq_int(${step}, d, 0);
- links: []
- links: []
-- action-brief: |
- Set a source integer variable to one, set a destination integer variable to
- two, and copy the source to the destination variable through memcpy().
- action-code: |
- int s;
- int d;
-
- s = 1;
- d = 2;
- memcpy(&d, &s, sizeof(d));
- checks:
- - brief: |
- Check that the destination integer variable is equal to one.
- code: |
- T_step_eq_int(${step}, d, 1);
- links: []
- links: []
-test-brief: |
- This test case calls functions of the C Library which are included in the
- space profile.
-test-context: []
-test-context-support: null
-test-description: null
-test-header: null
-test-includes:
-- rtems.h
-- stdlib.h
-- rtems/malloc.h
-test-local-includes: []
-test-setup: null
-test-stop: null
-test-support: null
-test-target: testsuites/validation/tc-space-profile.c
-test-teardown: null
-type: test-case
diff --git a/spec/testsuites/validation/classic-barrier.yml b/spec/testsuites/validation/classic-barrier.yml
deleted file mode 100644
index 6e5f0cf..0000000
--- a/spec/testsuites/validation/classic-barrier.yml
+++ /dev/null
@@ -1,106 +0,0 @@
-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-actions:
-- action-brief: |
- Set an object identifier to an invalid value and create an automatic
- release barrier object for one task.
- action-code: |
- rtems_status_code sc;
-
- ctx->id = 0xffffffff;
- sc = rtems_barrier_create(
- name,
- RTEMS_BARRIER_AUTOMATIC_RELEASE,
- 1,
- &ctx->id
- );
- checks:
- - brief: |
- Check that the barrier creation was successful.
- code: |
- T_step_rsc_success(${step}, sc);
- links: []
- links: []
-- action-brief: |
- Set a second object identifier to an invalid value and identify a barrier
- object by its name.
- action-code: |
- rtems_status_code sc;
- rtems_id id;
-
- id = 0xffffffff;
- sc = rtems_barrier_ident(name, &id);
- checks:
- - brief: |
- Check that the barrier identification by name was successful.
- code: |
- T_step_rsc_success(${step}, sc);
- links: []
- - brief: |
- Check that the second identifier is equal to the one returned by the
- barrier creation.
- code: |
- T_step_eq_u32(${step}, id, ctx->id);
- links: []
- links: []
-- action-brief: |
- Set the count of released tasks to one and release the barrier.
- action-code: |
- rtems_status_code sc;
- uint32_t released;
-
- released = 1;
- sc = rtems_barrier_release(ctx->id, &released);
- checks:
- - brief: |
- Check that the barrier release was successful.
- code: |
- T_step_rsc_success(${step}, sc);
- links: []
- - brief: |
- Check that the count of released tasks is zero.
- code: |
- T_step_eq_u32(${step}, released, 0);
- links: []
- links: []
-- action-brief: |
- Wait with an infinite timeout for the barrier.
- action-code: |
- rtems_status_code sc;
-
- sc = rtems_barrier_wait(ctx->id, RTEMS_NO_TIMEOUT);
- checks:
- - brief: |
- Check that the barrier wait was successful.
- code: |
- T_step_rsc_success(${step}, sc);
- links: []
- links: []
-test-brief: |
- This test case calls functions of the Barrier Manager which are included in
- the space profile.
-test-context:
-- brief: null
- description: null
- member: |
- rtems_id id
-test-context-support: null
-test-description: null
-test-header: null
-test-includes:
-- rtems.h
-test-local-includes: []
-test-setup: null
-test-stop: null
-test-support: |
- static const rtems_name name = rtems_build_name( 'B', 'A', 'R', 'R' );
-test-target: testsuites/validation/tc-space-profile.c
-test-teardown:
- brief: null
- code: |
- T_check_rtems_barriers(T_EVENT_RUN_INITIALIZE_EARLY, T_case_name());
- description: null
-type: test-case
diff --git a/spec/testsuites/validation/profile.yml b/spec/testsuites/validation/profile.yml
deleted file mode 100644
index b5d595e..0000000
--- a/spec/testsuites/validation/profile.yml
+++ /dev/null
@@ -1,171 +0,0 @@
-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:
-- role: requirement-refinement
- uid: /req/test-suites
-test-brief: |
- This test suite contains test cases which call in combination all functions
- included in the space profile.
-test-code: |
- #define NAME rtems_build_name('N', 'A', 'M', 'E')
-
- static void fatal_extension(
- rtems_fatal_source source,
- bool always_set_to_false,
- rtems_fatal_code error
- )
- {
- T_make_runner();
- T_step_eq_int(0, source, RTEMS_FATAL_SOURCE_APPLICATION);
- T_step_false(1, always_set_to_false, "always_set_to_false");
- T_step_eq_ulong(2, error, 123);
- T_case_end();
- T_run_finalize();
- }
-
- static void Init(rtems_task_argument arg)
- {
- (void) arg;
-
- T_make_runner();
- T_register();
- T_run_all();
- T_case_begin("SpaceProfileFatalError", NULL);
- T_plan(3);
- rtems_fatal(RTEMS_FATAL_SOURCE_APPLICATION, 123);
- }
-
- #define INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
-
- #define MAX_TLS_SIZE RTEMS_ALIGN_UP(64, RTEMS_TASK_STORAGE_ALIGNMENT)
-
- RTEMS_ALIGNED(RTEMS_TASK_STORAGE_ALIGNMENT) static char init_task_storage[
- RTEMS_TASK_STORAGE_SIZE(
- MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE,
- INIT_TASK_ATTRIBUTES
- )
- ];
-
- static char buffer[512];
-
- static void check_task_context(T_event event, const char *name)
- {
- if (_System_state_Is_up(_System_state_Get())) {
- T_check_task_context(event, name);
- }
- }
-
- static const T_action actions[] = {
- T_report_hash_sha256,
- 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 = "${.:/test-suite-name}",
- .buf = buffer,
- .buf_size = sizeof(buffer),
- .putchar = rtems_put_char,
- .verbosity = T_VERBOSE,
- .now = T_now_clock,
- .action_count = T_ARRAY_SIZE(actions),
- .actions = actions
- };
-
- static const rtems_task_config task_config = {
- .name = NAME,
- .initial_priority = 1,
- .storage_area = init_task_storage,
- .storage_size = sizeof(init_task_storage),
- .maximum_thread_local_storage_size = MAX_TLS_SIZE,
- .initial_modes = RTEMS_DEFAULT_MODES,
- .attributes = INIT_TASK_ATTRIBUTES
- };
-
- static void init_task(void)
- {
- rtems_id id;
- rtems_status_code sc;
-
- T_run_initialize(&test_config);
- T_case_begin("SpaceProfileTaskBuild", NULL);
- T_plan(2);
-
- sc = rtems_task_construct(&task_config, &id);
- T_step_rsc_success(0, sc);
-
- sc = rtems_task_start(id, Init, 0);
- T_step_rsc_success(1, sc);
-
- T_check_rtems_tasks(T_EVENT_RUN_INITIALIZE_EARLY, T_case_name());
- T_case_end();
- }
-
- RTEMS_SYSINIT_ITEM(
- init_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 1
-
- #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-
- #define CONFIGURE_MAXIMUM_PARTITIONS 1
-
- #define CONFIGURE_MAXIMUM_PERIODS 1
-
- #define CONFIGURE_MAXIMUM_SEMAPHORES 1
-
- #define CONFIGURE_MAXIMUM_TASKS 1
-
- #define CONFIGURE_MAXIMUM_TIMERS 1
-
- #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
-
- #define CONFIGURE_MESSAGE_BUFFER_MEMORY 1
-
- #define CONFIGURE_MICROSECONDS_PER_TICK 10000
-
- #define CONFIGURE_SCHEDULER_NAME NAME
-
- #define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
-
- /* Mandatory for space profile */
-
- #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
-
- #define CONFIGURE_INIT
-
- #include <rtems/confdefs.h>
-test-description: null
-test-includes:
-- rtems.h
-- rtems/bspIo.h
-- rtems/sysinit.h
-- rtems/score/sysstate.h
-test-local-includes: []
-test-suite-name: SpaceProfile
-test-target: testsuites/validation/ts-space-profile.c
-type: test-suite
More information about the vc
mailing list