validation: Add test suites

The test source code is generated from specification items
by the "./spec2modules.py" script contained in the
git://git.rtems.org/rtems-central.git Git repository.

Please read the "How-To" section in the "Software Requirements Engineering"
chapter of the RTEMS Software Engineering manual to get more information about
the process.

Update #3716.
This commit is contained in:
Sebastian Huber
2021-12-09 15:58:14 +01:00
parent 40cc4f5009
commit 212b0ca440
30 changed files with 890 additions and 46 deletions

View File

@@ -9,6 +9,7 @@ actions:
rcxx01: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)

View File

@@ -6,6 +6,7 @@ actions:
linpack: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)

View File

@@ -59,6 +59,8 @@ links:
uid: optgdtdesc
- role: build-dependency
uid: start
- role: build-dependency
uid: tst-xfail-val
- role: build-dependency
uid: ../../obj
- role: build-dependency

View File

@@ -0,0 +1,20 @@
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
actions:
- set-test-state:
fatal-init-task-construct-failed: expected-fail
fatal-too-large-tls-size: expected-fail
performance-no-clock-0: expected-fail
validation-intr: expected-fail
validation-io-kernel: expected-fail
validation-no-clock-0: expected-fail
validation-one-cpu-0: expected-fail
validation-timecounter-1: expected-fail
build-type: option
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
default: null
default-by-variant: []
description: ''
enabled-by: true
links: []
type: build

View File

@@ -29,6 +29,8 @@ links:
uid: ../../objirq
- role: build-dependency
uid: ../../opto2
- role: build-dependency
uid: ../../tst-xfail-intr
- role: build-dependency
uid: ../crti
- role: build-dependency

View File

@@ -8,6 +8,7 @@ actions:
rcxx01: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)

View File

@@ -2,12 +2,10 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
actions:
- set-test-state:
fileio: exclude
fsdosfsname01: exclude
iostream: exclude
linpack: exclude
rcxx01: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
@@ -18,4 +16,6 @@ enabled-by: true
links:
- role: build-dependency
uid: ../../tstnoiconv
- role: build-dependency
uid: ../../tstsmallmem
type: build

View File

@@ -8,6 +8,7 @@ actions:
rcxx01: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)

View File

@@ -8,6 +8,7 @@ actions:
rcxx01: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)

View File

@@ -8,6 +8,7 @@ actions:
rcxx01: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)

View File

@@ -8,6 +8,7 @@ actions:
rcxx01: exclude
record02: exclude
utf8proc01: exclude
validation-no-clock-0: exclude
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)

View File

@@ -0,0 +1,13 @@
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
actions:
- set-test-state:
validation-intr: expected-fail
build-type: option
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
default: null
default-by-variant: []
description: ''
enabled-by: true
links: []
type: build

View File

@@ -4,14 +4,25 @@ actions:
flashdisk01: exclude
fsdosfsname01: exclude
linpack: exclude
performance-0: exclude
performance-no-clock-0: exclude
psxconfig01: exclude
psxusleep: exclude
record02: exclude
sp47: exclude
spstkalloc02: exclude
terminate: exclude
userext: exclude
validation-0: exclude
validation-1: exclude
validation-cache: exclude
validation-intr: exclude
validation-no-clock-0: exclude
validation-non-smp: exclude
validation-one-cpu-0: exclude
validation-one-cpu-1: exclude
validation-timecounter-0: exclude
validation-timecounter-1: exclude
validation-tls-0: exclude
- set-value: -DPER_ALLOCATION=10
- append-test-cppflags: sp71
- set-value: -DMAXIMUM_DISTRIBUTION=10

View File

@@ -13,11 +13,21 @@ links:
- role: build-dependency
uid: libvalidation
- role: build-dependency
uid: performance-0
uid: performance-no-clock-0
- role: build-dependency
uid: validation-0
- role: build-dependency
uid: validation-1
- role: build-dependency
uid: validation-no-clock-0
- role: build-dependency
uid: validation-non-smp
- role: build-dependency
uid: validation-one-cpu-0
- role: build-dependency
uid: validation-smp-only-0
- role: build-dependency
uid: validation-smp-only-1
type: build
use-after:
- validation

View File

@@ -11,10 +11,9 @@ includes: []
ldflags: []
links: []
source:
- testsuites/validation/tc-part-performance.c
- testsuites/validation/ts-performance-0.c
- testsuites/validation/ts-performance-no-clock-0.c
stlib: []
target: testsuites/validation/ts-performance-0.exe
target: testsuites/validation/ts-performance-no-clock-0.exe
type: build
use-after: []
use-before: []

View File

@@ -19,6 +19,5 @@ source:
stlib: []
target: testsuites/validation/ts-validation-1.exe
type: build
use-after:
- validation
use-after: []
use-before: []

View File

@@ -0,0 +1,20 @@
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
build-type: test-program
cflags: []
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
cppflags: []
cxxflags: []
enabled-by:
not: RTEMS_SMP
features: c cprogram
includes: []
ldflags: []
links: []
source:
- testsuites/validation/ts-validation-non-smp.c
stlib: []
target: testsuites/validation/ts-validation-non-smp.exe
type: build
use-after: []
use-before: []

View File

@@ -0,0 +1,19 @@
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
build-type: test-program
cflags: []
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
cppflags: []
cxxflags: []
enabled-by: true
features: c cprogram
includes: []
ldflags: []
links: []
source:
- testsuites/validation/ts-validation-one-cpu-0.c
stlib: []
target: testsuites/validation/ts-validation-one-cpu-0.exe
type: build
use-after: []
use-before: []

View File

@@ -0,0 +1,19 @@
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
build-type: test-program
cflags: []
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
cppflags: []
cxxflags: []
enabled-by: RTEMS_SMP
features: c cprogram
includes: []
ldflags: []
links: []
source:
- testsuites/validation/ts-validation-smp-only-0.c
stlib: []
target: testsuites/validation/ts-validation-smp-only-0.exe
type: build
use-after: []
use-before: []

View File

@@ -0,0 +1,19 @@
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
build-type: test-program
cflags: []
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
cppflags: []
cxxflags: []
enabled-by: RTEMS_SMP
features: c cprogram
includes: []
ldflags: []
links: []
source:
- testsuites/validation/ts-validation-smp-only-1.c
stlib: []
target: testsuites/validation/ts-validation-smp-only-1.exe
type: build
use-after: []
use-before: []

View File

@@ -0,0 +1,81 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief This header file provides a validation test suite runner for
* validation test cases specific to the application configuration.
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
#include <rtems/bspIo.h>
#include <rtems/test.h>
#include <rtems/test-info.h>
#include <rtems/testopts.h>
static char buffer[ 512 ];
static const T_action actions[] = {
T_report_hash_sha256
};
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_tick,
.allocate = T_memory_allocate,
.deallocate = T_memory_deallocate,
.action_count = T_ARRAY_SIZE( actions ),
.actions = actions
};
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
RTEMS_NO_RETURN static void RunTestSuite( void )
{
int exit_code;
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 );
}

View File

@@ -32,23 +32,29 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
#include <bsp.h>
#include <rtems/bspIo.h>
#include <rtems/chain.h>
#include <rtems/test-info.h>
#include <rtems/testopts.h>
#include <rtems/test.h>
#include <rtems/test-scheduler.h>
#define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
#include "ts-config.h"
#include "tx-support.h"
#define MAX_TASKS 32
#if !defined( MAX_TLS_SIZE )
#define MAX_TLS_SIZE TEST_MAXIMUM_TLS_SIZE
#endif
#define MAX_TASKS ( TEST_MAXIMUM_TASKS - 1 )
#define TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define TASK_STORAGE_SIZE \
RTEMS_TASK_STORAGE_SIZE( \
MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE + \
MAX_TLS_SIZE + TEST_MINIMUM_STACK_SIZE + \
CPU_STACK_ALIGNMENT - CPU_HEAP_ALIGNMENT, \
TASK_ATTRIBUTES \
)
@@ -75,7 +81,11 @@ static const T_config test_config = {
.buf_size = sizeof( buffer ),
.putchar = rtems_put_char,
.verbosity = RTEMS_TEST_VERBOSITY,
#if defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER)
.now = T_now_clock,
#else
.now = T_now_tick,
#endif
.allocate = T_memory_allocate,
.deallocate = T_memory_deallocate,
.action_count = T_ARRAY_SIZE( actions ),
@@ -91,11 +101,29 @@ static union {
rtems_chain_node node;
} task_storage[ MAX_TASKS ];
static void Init( rtems_task_argument arg )
rtems_task_argument test_runner_argument;
rtems_task_priority test_runner_initial_priority;
rtems_mode test_runner_initial_modes;
static void Runner( rtems_task_argument arg )
{
int exit_code;
(void) arg;
test_runner_argument = arg;
(void) rtems_task_mode(
RTEMS_ASR,
RTEMS_ASR_MASK,
&test_runner_initial_modes
);
(void) rtems_task_set_priority(
RTEMS_SELF,
PRIO_DEFAULT,
&test_runner_initial_priority
);
rtems_chain_initialize(
&free_task_storage,
@@ -115,16 +143,18 @@ static void Init( rtems_task_argument arg )
rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code );
}
static void *task_stack_allocate( size_t size )
void *test_task_stack_allocate( size_t size )
{
if ( size > sizeof( task_storage[ 0 ] ) ) {
return NULL;
}
T_quiet_ge_sz( size, TEST_MINIMUM_STACK_SIZE );
return rtems_chain_get_unprotected( &free_task_storage );
}
static void task_stack_deallocate( void *stack )
void test_task_stack_deallocate( void *stack )
{
rtems_chain_append_unprotected(
&free_task_storage,
@@ -132,28 +162,36 @@ static void task_stack_deallocate( void *stack )
);
}
#if !defined( CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER )
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#endif
#define CONFIGURE_MAXIMUM_BARRIERS 3
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE TEST_MINIMUM_STACK_SIZE
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 3
#define CONFIGURE_INTERRUPT_STACK_SIZE TEST_INTERRUPT_STACK_SIZE
#define CONFIGURE_MAXIMUM_PARTITIONS 3
#define CONFIGURE_MAXIMUM_BARRIERS TEST_MAXIMUM_BARRIERS
#define CONFIGURE_MAXIMUM_PERIODS 3
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES TEST_MAXIMUM_MESSAGE_QUEUES
#define CONFIGURE_MAXIMUM_SEMAPHORES 3
#define CONFIGURE_MAXIMUM_PARTITIONS TEST_MAXIMUM_PARTITIONS
#define CONFIGURE_MAXIMUM_TASKS ( 1 + MAX_TASKS )
#define CONFIGURE_MAXIMUM_PERIODS TEST_MAXIMUM_PERIODS
#define CONFIGURE_MAXIMUM_SEMAPHORES TEST_MAXIMUM_SEMAPHORES
#define CONFIGURE_MAXIMUM_TASKS TEST_MAXIMUM_TASKS
#define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE \
CONFIGURE_MAXIMUM_TASKS
#define CONFIGURE_MAXIMUM_TIMERS 3
#define CONFIGURE_MAXIMUM_TIMERS TEST_MAXIMUM_TIMERS
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 3
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS TEST_MAXIMUM_USER_EXTENSIONS
#define CONFIGURE_MICROSECONDS_PER_TICK 1000
#define CONFIGURE_MICROSECONDS_PER_TICK TEST_MICROSECONDS_PER_TICK
#define CONFIGURE_TICKS_PER_TIMESLICE TEST_TICKS_PER_TIMESLICE
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
@@ -165,35 +203,67 @@ static void task_stack_deallocate( void *stack )
#define CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
#define CONFIGURE_TASK_STACK_ALLOCATOR task_stack_allocate
#define CONFIGURE_TASK_STACK_ALLOCATOR test_task_stack_allocate
#define CONFIGURE_TASK_STACK_DEALLOCATOR task_stack_deallocate
#define CONFIGURE_TASK_STACK_DEALLOCATOR test_task_stack_deallocate
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_ATTRIBUTES TASK_ATTRIBUTES
#define CONFIGURE_INIT_TASK_ARGUMENTS TEST_RUNNER_ARGUMENT
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
#define CONFIGURE_INIT_TASK_ATTRIBUTES ( RTEMS_SYSTEM_TASK | TASK_ATTRIBUTES )
#define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE TASK_STORAGE_SIZE
#define CONFIGURE_INIT_TASK_ENTRY_POINT Runner
#define CONFIGURE_INIT_TASK_INITIAL_MODES TEST_RUNNER_INITIAL_MODES
#define CONFIGURE_INIT_TASK_NAME TEST_RUNNER_NAME
#define CONFIGURE_INIT_TASK_PRIORITY 0
#if !defined( CONFIGURE_INITIAL_EXTENSIONS )
#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = FatalInitialExtension }
#endif
#if defined( RTEMS_SMP ) && \
( CONFIGURE_MAXIMUM_PROCESSORS == 4 || CONFIGURE_MAXIMUM_PROCESSORS == 5 )
#include <rtems/score/scheduleredfsmp.h>
const Scheduler_Operations
T_scheduler_operations[ CONFIGURE_MAXIMUM_PROCESSORS ] = {
SCHEDULER_EDF_SMP_ENTRY_POINTS,
SCHEDULER_EDF_SMP_ENTRY_POINTS,
SCHEDULER_EDF_SMP_ENTRY_POINTS,
#if CONFIGURE_MAXIMUM_PROCESSORS >= 5
SCHEDULER_EDF_SMP_ENTRY_POINTS,
#endif
SCHEDULER_EDF_SMP_ENTRY_POINTS
};
#undef SCHEDULER_EDF_SMP_ENTRY_POINTS
#define SCHEDULER_EDF_SMP_ENTRY_POINTS T_SCHEDULER_ENTRY_POINTS
#define CONFIGURE_SCHEDULER_EDF_SMP
#include <rtems/scheduler.h>
RTEMS_SCHEDULER_EDF_SMP(a);
RTEMS_SCHEDULER_EDF_SMP( a );
RTEMS_SCHEDULER_EDF_SMP(b);
RTEMS_SCHEDULER_EDF_SMP( b );
RTEMS_SCHEDULER_EDF_SMP(c);
RTEMS_SCHEDULER_EDF_SMP( c );
RTEMS_SCHEDULER_EDF_SMP( d );
#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', ' ', ' ', ' '))
RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME ), \
RTEMS_SCHEDULER_TABLE_EDF_SMP( b, TEST_SCHEDULER_B_NAME ), \
RTEMS_SCHEDULER_TABLE_EDF_SMP( c, TEST_SCHEDULER_C_NAME ), \
RTEMS_SCHEDULER_TABLE_EDF_SMP( d, TEST_SCHEDULER_D_NAME )
#if CONFIGURE_MAXIMUM_PROCESSORS == 5
#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
@@ -210,7 +280,48 @@ RTEMS_SCHEDULER_EDF_SMP(c);
RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
#endif
#endif /* RTEMS_SMP */
#elif !defined( CONFIGURE_SCHEDULER_ASSIGNMENTS )
#include <rtems/score/schedulerpriority.h>
#undef CONFIGURE_MAXIMUM_PROCESSORS
#define CONFIGURE_MAXIMUM_PROCESSORS 1
const Scheduler_Operations
T_scheduler_operations[ CONFIGURE_MAXIMUM_PROCESSORS ] = {
SCHEDULER_PRIORITY_ENTRY_POINTS
};
#undef SCHEDULER_PRIORITY_ENTRY_POINTS
#define SCHEDULER_PRIORITY_ENTRY_POINTS T_SCHEDULER_ENTRY_POINTS
#define CONFIGURE_SCHEDULER_NAME TEST_SCHEDULER_A_NAME
#define CONFIGURE_SCHEDULER_PRIORITY
#define CONFIGURE_MAXIMUM_PRIORITY 127
#endif
#define CONFIGURE_IDLE_TASK_STACK_SIZE TEST_IDLE_STACK_SIZE
static char test_idle_stacks[ CONFIGURE_MAXIMUM_PROCESSORS ][
( TEST_IDLE_STACK_SIZE + CPU_IDLE_TASK_IS_FP * CONTEXT_FP_SIZE )
]
RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT )
RTEMS_SECTION( ".rtemsstack.idle" );
void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t size )
{
if ( size > sizeof( test_idle_stacks[ 0 ] ) ) {
rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 0xABAD1DEA );
}
return &test_idle_stacks[ cpu_index ][0];
}
#define CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE test_idle_task_stack_allocate
#define CONFIGURE_INIT

View File

@@ -0,0 +1,98 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief This header file provides a configurable validation test suite runner
* and application configuration for tests which should run within an idle
* task without a user initialization task.
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
#include <rtems/bspIo.h>
#include <rtems/test-info.h>
#include <rtems/testopts.h>
#include <rtems/test.h>
#include "tx-support.h"
static char buffer[ 512 ];
static const T_action actions[] = {
T_report_hash_sha256
};
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_tick,
.allocate = T_memory_allocate,
.deallocate = T_memory_deallocate,
.action_count = T_ARRAY_SIZE( actions ),
.actions = actions
};
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
#define CONFIGURE_INITIAL_EXTENSIONS \
{ .fatal = FatalInitialExtension }
#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
void *IdleBody( uintptr_t ignored )
{
int exit_code;
(void) ignored;
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 CONFIGURE_IDLE_TASK_BODY IdleBody
#define CONFIGURE_INIT
#include <rtems/confdefs.h>

View File

@@ -3,7 +3,7 @@
/**
* @file
*
* @ingroup RTEMSTestSuiteTestsuitesPerformance0
* @ingroup RTEMSTestSuiteTestsuitesPerformanceNoClock0
*/
/*
@@ -57,8 +57,8 @@
#include <rtems/test.h>
/**
* @defgroup RTEMSTestSuiteTestsuitesPerformance0 \
* spec:/testsuites/performance-0
* @defgroup RTEMSTestSuiteTestsuitesPerformanceNoClock0 \
* spec:/testsuites/performance-no-clock-0
*
* @ingroup RTEMSTestSuites
*
@@ -71,7 +71,11 @@
* @{
*/
const char rtems_test_name[] = "Performance0";
const char rtems_test_name[] = "PerformanceNoClock0";
#define CONFIGURE_MAXIMUM_PROCESSORS 4
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#include "ts-default.h"

View File

@@ -7,7 +7,7 @@
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
* Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,15 +60,17 @@
* @ingroup RTEMSTestSuites
*
* @brief This general purpose validation test suite provides enough resources
* to run basic tests for all specified managers and functions in a
* configuration with exactly one processor.
* to run basic tests for all specified managers and functions.
*
* In SMP configurations, up to three scheduler instances using the SMP EDF
* scheduler are provided using up to four processors.
*
* @{
*/
const char rtems_test_name[] = "Validation1";
#define CONFIGURE_MAXIMUM_PROCESSORS 1
#define CONFIGURE_MAXIMUM_PROCESSORS 5
#include "ts-default.h"

View File

@@ -0,0 +1,81 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSTestSuiteTestsuitesValidationNoClock0
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This file is part of the RTEMS quality process and was automatically
* generated. If you find something that needs to be fixed or
* worded better please post a report or patch to an RTEMS mailing list
* or raise a bug report:
*
* https://www.rtems.org/bugs.html
*
* For information on updating and regenerating please refer to the How-To
* section in the Software Requirements Engineering chapter of the
* RTEMS Software Engineering manual. The manual is provided as a part of
* a release. For development sources please refer to the online
* documentation at:
*
* https://docs.rtems.org
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/test.h>
/**
* @defgroup RTEMSTestSuiteTestsuitesValidationNoClock0 \
* spec:/testsuites/validation-no-clock-0
*
* @ingroup RTEMSTestSuites
*
* @brief This general purpose validation test suite provides enough resources
* to run basic tests without a Clock Driver for all specified managers and
* functions.
*
* In SMP configurations, up to three scheduler instances using the SMP EDF
* scheduler are provided using up to four processors.
*
* @{
*/
const char rtems_test_name[] = "ValidationNoClock0";
#define CONFIGURE_MAXIMUM_PROCESSORS 5
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#include "ts-default.h"
/** @} */

View File

@@ -0,0 +1,75 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSTestSuiteTestsuitesValidationNonSmp
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This file is part of the RTEMS quality process and was automatically
* generated. If you find something that needs to be fixed or
* worded better please post a report or patch to an RTEMS mailing list
* or raise a bug report:
*
* https://www.rtems.org/bugs.html
*
* For information on updating and regenerating please refer to the How-To
* section in the Software Requirements Engineering chapter of the
* RTEMS Software Engineering manual. The manual is provided as a part of
* a release. For development sources please refer to the online
* documentation at:
*
* https://docs.rtems.org
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/test.h>
/**
* @defgroup RTEMSTestSuiteTestsuitesValidationNonSmp \
* spec:/testsuites/validation-non-smp
*
* @ingroup RTEMSTestSuites
*
* @brief This test suite for non-SMP test cases provides enough resources to
* run basic tests for all specified managers and functions.
*
* @{
*/
const char rtems_test_name[] = "ValidationNonSMP";
#define CONFIGURE_MAXIMUM_PROCESSORS 1
#include "ts-default.h"
/** @} */

View File

@@ -0,0 +1,80 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSTestSuiteTestsuitesValidationOneCpu0
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This file is part of the RTEMS quality process and was automatically
* generated. If you find something that needs to be fixed or
* worded better please post a report or patch to an RTEMS mailing list
* or raise a bug report:
*
* https://www.rtems.org/bugs.html
*
* For information on updating and regenerating please refer to the How-To
* section in the Software Requirements Engineering chapter of the
* RTEMS Software Engineering manual. The manual is provided as a part of
* a release. For development sources please refer to the online
* documentation at:
*
* https://docs.rtems.org
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/test.h>
/**
* @defgroup RTEMSTestSuiteTestsuitesValidationOneCpu0 \
* spec:/testsuites/validation-one-cpu-0
*
* @ingroup RTEMSTestSuites
*
* @brief This general purpose validation test suite provides enough resources
* to run basic tests with exactly one processor and without a Clock Driver.
*
* Two test suites of this configuration are provided to limit test run
* duration.
*
* @{
*/
const char rtems_test_name[] = "ValidationOneCpu0";
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_PROCESSORS 1
#include "ts-default.h"
/** @} */

View File

@@ -0,0 +1,78 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly0
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This file is part of the RTEMS quality process and was automatically
* generated. If you find something that needs to be fixed or
* worded better please post a report or patch to an RTEMS mailing list
* or raise a bug report:
*
* https://www.rtems.org/bugs.html
*
* For information on updating and regenerating please refer to the How-To
* section in the Software Requirements Engineering chapter of the
* RTEMS Software Engineering manual. The manual is provided as a part of
* a release. For development sources please refer to the online
* documentation at:
*
* https://docs.rtems.org
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/test.h>
/**
* @defgroup RTEMSTestSuiteTestsuitesValidationSmpOnly0 \
* spec:/testsuites/validation-smp-only-0
*
* @ingroup RTEMSTestSuites
*
* @brief This test suite for SMP-only test cases provides enough resources to
* run basic tests for all specified managers and functions.
*
* Up to three scheduler instances using the SMP EDF scheduler are provided
* using up to four processors.
*
* @{
*/
const char rtems_test_name[] = "ValidationSMPOnly0";
#define CONFIGURE_MAXIMUM_PROCESSORS 5
#include "ts-default.h"
/** @} */

View File

@@ -0,0 +1,94 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly1
*/
/*
* Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This file is part of the RTEMS quality process and was automatically
* generated. If you find something that needs to be fixed or
* worded better please post a report or patch to an RTEMS mailing list
* or raise a bug report:
*
* https://www.rtems.org/bugs.html
*
* For information on updating and regenerating please refer to the How-To
* section in the Software Requirements Engineering chapter of the
* RTEMS Software Engineering manual. The manual is provided as a part of
* a release. For development sources please refer to the online
* documentation at:
*
* https://docs.rtems.org
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "ts-config.h"
#include <rtems/test.h>
/**
* @defgroup RTEMSTestSuiteTestsuitesValidationSmpOnly1 \
* spec:/testsuites/validation-smp-only-1
*
* @ingroup RTEMSTestSuites
*
* @brief This SMP-only test suite validates the clustered scheduler
* configuration through an application configuration with a processor
* maximum of two, however, only the first processor has a scheduler
* assigned.
*
* @{
*/
const char rtems_test_name[] = "ValidationSMPOnly1";
#define CONFIGURE_MAXIMUM_PROCESSORS 2
#include <rtems/score/scheduleredfsmp.h>
#define CONFIGURE_SCHEDULER_EDF_SMP
#include <rtems/scheduler.h>
RTEMS_SCHEDULER_EDF_SMP( a );
#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER
#include "ts-default.h"
/** @} */