Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:53

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /**
0004  * @file
0005  *
0006  * @ingroup RTEMSTestSuitesValidation
0007  *
0008  * @brief This header file provides the constants used by the test suite
0009  *   configuration.
0010  */
0011 
0012 /*
0013  * Copyright (C) 2021 embedded brains GmbH & Co. KG
0014  *
0015  * Redistribution and use in source and binary forms, with or without
0016  * modification, are permitted provided that the following conditions
0017  * are met:
0018  * 1. Redistributions of source code must retain the above copyright
0019  *    notice, this list of conditions and the following disclaimer.
0020  * 2. Redistributions in binary form must reproduce the above copyright
0021  *    notice, this list of conditions and the following disclaimer in the
0022  *    documentation and/or other materials provided with the distribution.
0023  *
0024  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0025  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0026  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0027  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0028  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0029  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0030  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0031  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0032  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0033  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0034  * POSSIBILITY OF SUCH DAMAGE.
0035  */
0036 
0037 #ifndef _TS_CONFIG_H
0038 #define _TS_CONFIG_H
0039 
0040 #include <rtems.h>
0041 
0042 #ifdef __cplusplus
0043 extern "C" {
0044 #endif
0045 
0046 /**
0047  * @addtogroup RTEMSTestSuitesValidation
0048  *
0049  * @{
0050  */
0051 
0052 #define TEST_MICROSECONDS_PER_TICK 1000
0053 
0054 #define TEST_RUNNER_NAME rtems_build_name( 'R', 'U', 'N', ' ' )
0055 
0056 #define TEST_RUNNER_ARGUMENT 123456789
0057 
0058 #define TEST_RUNNER_INITIAL_MODES RTEMS_NO_ASR
0059 
0060 #define TEST_SCHEDULER_A_NAME rtems_build_name( 'A', ' ', ' ', ' ' )
0061 
0062 #define TEST_SCHEDULER_B_NAME rtems_build_name( 'B', ' ', ' ', ' ' )
0063 
0064 #define TEST_SCHEDULER_C_NAME rtems_build_name( 'C', ' ', ' ', ' ' )
0065 
0066 #define TEST_SCHEDULER_D_NAME rtems_build_name( 'D', ' ', ' ', ' ' )
0067 
0068 #if defined( __OPTIMIZE__ ) && !defined( RTEMS_GCOV_COVERAGE )
0069 #define TEST_BASE_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
0070 #else
0071 #define TEST_BASE_STACK_SIZE ( 4 * RTEMS_MINIMUM_STACK_SIZE )
0072 #endif
0073 
0074 #define TEST_MAXIMUM_TLS_SIZE \
0075   RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
0076 
0077 #define TEST_MINIMUM_STACK_SIZE \
0078   ( TEST_BASE_STACK_SIZE + CPU_STACK_ALIGNMENT )
0079 
0080 #define TEST_IDLE_STACK_SIZE \
0081   ( TEST_BASE_STACK_SIZE + 2 * CPU_STACK_ALIGNMENT )
0082 
0083 #define TEST_INTERRUPT_STACK_SIZE \
0084   ( TEST_BASE_STACK_SIZE + 4 * CPU_INTERRUPT_STACK_ALIGNMENT )
0085 
0086 #define TEST_MAXIMUM_BARRIERS 7
0087 
0088 #define TEST_MAXIMUM_MESSAGE_QUEUES 3
0089 
0090 #define TEST_MAXIMUM_PARTITIONS 4
0091 
0092 #define TEST_MAXIMUM_PERIODS 2
0093 
0094 #define TEST_MAXIMUM_SEMAPHORES 7
0095 
0096 #define TEST_MAXIMUM_TASKS 32
0097 
0098 #define TEST_MAXIMUM_TIMERS 10
0099 
0100 #define TEST_MAXIMUM_USER_EXTENSIONS 5
0101 
0102 /*
0103  * Use at least two so that the CPU time budget decrement in
0104  * _Scheduler_default_Tick() does not always result in a zero.
0105  */
0106 #define TEST_TICKS_PER_TIMESLICE 2
0107 
0108 void *test_task_stack_allocate( size_t size );
0109 
0110 void test_task_stack_deallocate( void *stack );
0111 
0112 void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t *size );
0113 
0114 extern rtems_task_argument test_runner_argument;
0115 
0116 extern rtems_task_priority test_runner_initial_priority;
0117 
0118 extern rtems_mode test_runner_initial_modes;
0119 
0120 /** @} */
0121 
0122 #ifdef __cplusplus
0123 }
0124 #endif
0125 
0126 #endif /* _TS_CONFIG_H */