diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-17 20:08:15 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-12-01 14:25:15 +0100 |
commit | 1e36c38c750242a4a18f7f31f41b09ad334bad7d (patch) | |
tree | 53bf2c6ed906c2a185baa8ffc7d39daa3170e7ca | |
parent | e64a40d5852de195bbb186993a70fd69741aafa8 (diff) |
validation: acfg
-rw-r--r-- | spec/build/testsuites/validation/grp.yml | 2 | ||||
-rw-r--r-- | spec/build/testsuites/validation/validation-acfg-1.yml | 21 | ||||
-rw-r--r-- | testsuites/validation/tc-acfg-default.c | 107 | ||||
-rw-r--r-- | testsuites/validation/tc-acfg-disabled-bsp-settings.c | 141 | ||||
-rw-r--r-- | testsuites/validation/tc-acfg.c | 28 | ||||
-rw-r--r-- | testsuites/validation/ts-acfg.h | 81 | ||||
-rw-r--r-- | testsuites/validation/ts-validation-acfg-0.c | 60 | ||||
-rw-r--r-- | testsuites/validation/ts-validation-acfg-1.c | 111 |
8 files changed, 467 insertions, 84 deletions
diff --git a/spec/build/testsuites/validation/grp.yml b/spec/build/testsuites/validation/grp.yml index d5c083efd6..cd9916b678 100644 --- a/spec/build/testsuites/validation/grp.yml +++ b/spec/build/testsuites/validation/grp.yml @@ -53,6 +53,8 @@ links: - role: build-dependency uid: validation-acfg-0 - role: build-dependency + uid: validation-acfg-1 +- role: build-dependency uid: validation-dev-0 - role: build-dependency uid: validation-io-kernel diff --git a/spec/build/testsuites/validation/validation-acfg-1.yml b/spec/build/testsuites/validation/validation-acfg-1.yml new file mode 100644 index 0000000000..46ef8ac6ac --- /dev/null +++ b/spec/build/testsuites/validation/validation-acfg-1.yml @@ -0,0 +1,21 @@ +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/tc-acfg-disabled-bsp-settings.c +- testsuites/validation/ts-validation-acfg-1.c +stlib: [] +target: testsuites/validation/ts-validation-acfg-1.exe +type: build +use-after: +- validation +use-before: [] diff --git a/testsuites/validation/tc-acfg-default.c b/testsuites/validation/tc-acfg-default.c index 04e23a8ec5..f48d0dd760 100644 --- a/testsuites/validation/tc-acfg-default.c +++ b/testsuites/validation/tc-acfg-default.c @@ -52,8 +52,9 @@ #include "config.h" #endif -#include <rtems.h> +#include <bsp.h> #include <string.h> +#include <rtems/score/userextdata.h> #include "tx-support.h" @@ -68,6 +69,19 @@ * * This test case performs the following actions: * + * - Check the effect of application configuration options with optional + * BSP-provided settings. + * + * - Check the configured CONFIGURE_IDLE_TASK_BODY. + * + * - Check the default value CONFIGURE_IDLE_TASK_STACK_SIZE where the + * optional BSP-provided default value is enabled. + * + * - Check the default value CONFIGURE_INTERRUPT_STACK_SIZE where the + * optional BSP-provided default value is enabled. + * + * - Check the BSP-provided initial extension is registered. + * * - Try to create a barrier. * * - Check that the returned status code is RTEMS_TOO_MANY. @@ -125,10 +139,62 @@ static const rtems_task_config task_config = { }; /** - * @brief Try to create a barrier. + * @brief Check the effect of application configuration options with optional + * BSP-provided settings. */ static void AcfgValDefault_Action_0( void ) { + rtems_extensions_table bsp = BSP_INITIAL_EXTENSION; + + /* + * Check the configured CONFIGURE_IDLE_TASK_BODY. + */ + T_step_eq_ptr( 0, rtems_configuration_get_idle_task(), IdleBody ); + + /* + * Check the default value CONFIGURE_IDLE_TASK_STACK_SIZE where the optional + * BSP-provided default value is enabled. + */ + T_step_eq_sz( + 1, + rtems_configuration_get_idle_task_stack_size(), + #if defined(BSP_IDLE_TASK_STACK_SIZE) + BSP_IDLE_TASK_STACK_SIZE + #else + CPU_STACK_MINIMUM_SIZE + #endif + ); + + /* + * Check the default value CONFIGURE_INTERRUPT_STACK_SIZE where the optional + * BSP-provided default value is enabled. + */ + T_step_eq_sz( + 2, + rtems_configuration_get_interrupt_stack_size(), + #if defined(BSP_INTERRUPT_STACK_SIZE) + BSP_INTERRUPT_STACK_SIZE + #else + CPU_STACK_MINIMUM_SIZE + #endif + ); + + /* + * Check the BSP-provided initial extension is registered. + */ + T_step_eq_sz( 3, _User_extensions_Initial_count, 1 ); + T_step_eq_ptr( + 4, + _User_extensions_Initial_extensions[ 0 ].fatal, + bsp.fatal + ); +} + +/** + * @brief Try to create a barrier. + */ +static void AcfgValDefault_Action_1( void ) +{ rtems_status_code sc; rtems_id id; @@ -142,13 +208,13 @@ static void AcfgValDefault_Action_0( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 0, sc, RTEMS_TOO_MANY ); + T_step_rsc( 5, sc, RTEMS_TOO_MANY ); } /** * @brief Try to construct a message queue. */ -static void AcfgValDefault_Action_1( void ) +static void AcfgValDefault_Action_2( void ) { rtems_message_queue_config config; RTEMS_MESSAGE_QUEUE_BUFFER( 1 ) buffers[ 1 ]; @@ -168,13 +234,13 @@ static void AcfgValDefault_Action_1( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 1, sc, RTEMS_TOO_MANY ); + T_step_rsc( 6, sc, RTEMS_TOO_MANY ); } /** * @brief Try to create a partition. */ -static void AcfgValDefault_Action_2( void ) +static void AcfgValDefault_Action_3( void ) { RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t buffers[ 1 ][ 32 ]; rtems_status_code sc; @@ -192,13 +258,13 @@ static void AcfgValDefault_Action_2( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 2, sc, RTEMS_TOO_MANY ); + T_step_rsc( 7, sc, RTEMS_TOO_MANY ); } /** * @brief Try to create a period. */ -static void AcfgValDefault_Action_3( void ) +static void AcfgValDefault_Action_4( void ) { rtems_status_code sc; rtems_id id; @@ -208,21 +274,21 @@ static void AcfgValDefault_Action_3( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 3, sc, RTEMS_TOO_MANY ); + T_step_rsc( 8, sc, RTEMS_TOO_MANY ); } /** * @brief Check that the processor maximum is one. */ -static void AcfgValDefault_Action_4( void ) +static void AcfgValDefault_Action_5( void ) { - T_step_eq_u32( 4, rtems_scheduler_get_processor_maximum(), 1 ); + T_step_eq_u32( 9, rtems_scheduler_get_processor_maximum(), 1 ); } /** * @brief Try to create a semaphore. */ -static void AcfgValDefault_Action_5( void ) +static void AcfgValDefault_Action_6( void ) { rtems_status_code sc; rtems_id id; @@ -238,13 +304,13 @@ static void AcfgValDefault_Action_5( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 5, sc, RTEMS_TOO_MANY ); + T_step_rsc( 10, sc, RTEMS_TOO_MANY ); } /** * @brief Try to construct a task. */ -static void AcfgValDefault_Action_6( void ) +static void AcfgValDefault_Action_7( void ) { rtems_status_code sc; rtems_id id; @@ -254,13 +320,13 @@ static void AcfgValDefault_Action_6( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 6, sc, RTEMS_TOO_MANY ); + T_step_rsc( 11, sc, RTEMS_TOO_MANY ); } /** * @brief Try to create a timer. */ -static void AcfgValDefault_Action_7( void ) +static void AcfgValDefault_Action_8( void ) { rtems_status_code sc; rtems_id id; @@ -270,13 +336,13 @@ static void AcfgValDefault_Action_7( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 7, sc, RTEMS_TOO_MANY ); + T_step_rsc( 12, sc, RTEMS_TOO_MANY ); } /** * @brief Try to create a user extension set. */ -static void AcfgValDefault_Action_8( void ) +static void AcfgValDefault_Action_9( void ) { rtems_extensions_table table; rtems_status_code sc; @@ -288,7 +354,7 @@ static void AcfgValDefault_Action_8( void ) /* * Check that the returned status code is RTEMS_TOO_MANY. */ - T_step_rsc( 8, sc, RTEMS_TOO_MANY ); + T_step_rsc( 13, sc, RTEMS_TOO_MANY ); } /** @@ -296,7 +362,7 @@ static void AcfgValDefault_Action_8( void ) */ T_TEST_CASE( AcfgValDefault ) { - T_plan( 9 ); + T_plan( 14 ); AcfgValDefault_Action_0(); AcfgValDefault_Action_1(); @@ -307,6 +373,7 @@ T_TEST_CASE( AcfgValDefault ) AcfgValDefault_Action_6(); AcfgValDefault_Action_7(); AcfgValDefault_Action_8(); + AcfgValDefault_Action_9(); } /** @} */ diff --git a/testsuites/validation/tc-acfg-disabled-bsp-settings.c b/testsuites/validation/tc-acfg-disabled-bsp-settings.c new file mode 100644 index 0000000000..0dbae670f3 --- /dev/null +++ b/testsuites/validation/tc-acfg-disabled-bsp-settings.c @@ -0,0 +1,141 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseAcfgValDisabledBspSettings + */ + +/* + * 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 <bsp.h> +#include <rtems/score/userextdata.h> + +#include <rtems/test.h> + +/** + * @defgroup RTEMSTestCaseAcfgValDisabledBspSettings \ + * spec:/acfg/val/disabled-bsp-settings + * + * @ingroup RTEMSTestSuiteTestsuitesValidationAcfg1 + * + * @brief Tests the default values of application configuration options where + * all optional BSP provided settings are disabled. + * + * This test case performs the following actions: + * + * - Check the effect of application configuration options with optional + * BSP-provided settings. + * + * - Check the default value CONFIGURE_IDLE_TASK_BODY where the optional + * BSP-provided default value is disabled. + * + * - Check the default value CONFIGURE_IDLE_TASK_STACK_SIZE where the + * optional BSP-provided default value is disabled. + * + * - Check the default value CONFIGURE_INTERRUPT_STACK_SIZE where the + * optional BSP-provided default value is disabled. + * + * - Check the BSP-provided initial extension is not registered. + * + * @{ + */ + +/** + * @brief Check the effect of application configuration options with optional + * BSP-provided settings. + */ +static void AcfgValDisabledBspSettings_Action_0( void ) +{ + rtems_extensions_table bsp = BSP_INITIAL_EXTENSION; + + /* + * Check the default value CONFIGURE_IDLE_TASK_BODY where the optional + * BSP-provided default value is disabled. + */ + T_eq_ptr( + rtems_configuration_get_idle_task(), + _CPU_Thread_Idle_body + ); + + /* + * Check the default value CONFIGURE_IDLE_TASK_STACK_SIZE where the optional + * BSP-provided default value is disabled. + */ + T_eq_sz( + rtems_configuration_get_idle_task_stack_size(), + CPU_STACK_MINIMUM_SIZE + ); + + /* + * Check the default value CONFIGURE_INTERRUPT_STACK_SIZE where the optional + * BSP-provided default value is disabled. + */ + T_eq_sz( + rtems_configuration_get_interrupt_stack_size(), + CPU_STACK_MINIMUM_SIZE + ); + + /* + * Check the BSP-provided initial extension is not registered. + */ + T_eq_sz( _User_extensions_Initial_count, 1 ); + T_ne_ptr( + _User_extensions_Initial_extensions[ 0 ].fatal, + bsp.fatal + ); +} + +/** + * @fn void T_case_body_AcfgValDisabledBspSettings( void ) + */ +T_TEST_CASE( AcfgValDisabledBspSettings ) +{ + AcfgValDisabledBspSettings_Action_0(); +} + +/** @} */ diff --git a/testsuites/validation/tc-acfg.c b/testsuites/validation/tc-acfg.c index bb68d7f3c4..062c5f2882 100644 --- a/testsuites/validation/tc-acfg.c +++ b/testsuites/validation/tc-acfg.c @@ -52,7 +52,7 @@ #include "config.h" #endif -#include <rtems.h> +#include <bsp.h> #include <rtems/score/heap.h> #include "ts-config.h" @@ -71,6 +71,9 @@ * * - Check the effect of application configuration options. * + * - Check the default value CONFIGURE_IDLE_TASK_BODY where the optional + * BSP-provided default value is enabled. + * * - Check the configured CONFIGURE_INIT_TASK_ARGUMENTS. This validates also * the effect of CONFIGURE_INIT_TASK_ENTRY_POINT and * CONFIGURE_RTEMS_INIT_TASKS_TABLE. @@ -134,8 +137,6 @@ * * - Check the configured CONFIGURE_IDLE_TASK_STACK_SIZE value. * - * - Check the configured CONFIGURE_IDLE_TASK_BODY. - * * - Check the configured CONFIGURE_INTERRUPT_STACK_SIZE value. * * - Check the configured CONFIGURE_TICKS_PER_TIMESLICE value. @@ -152,6 +153,19 @@ static void AcfgValAcfg_Action_0( void ) rtems_id id; /* + * Check the default value CONFIGURE_IDLE_TASK_BODY where the optional + * BSP-provided default value is enabled. + */ + T_eq_ptr( + rtems_configuration_get_idle_task(), + #if defined(BSP_IDLE_TASK_BODY) + BSP_IDLE_TASK_BODY + #else + _CPU_Thread_Idle_body + #endif + ); + + /* * Check the configured CONFIGURE_INIT_TASK_ARGUMENTS. This validates also * the effect of CONFIGURE_INIT_TASK_ENTRY_POINT and * CONFIGURE_RTEMS_INIT_TASKS_TABLE. @@ -336,14 +350,6 @@ static void AcfgValAcfg_Action_0( void ) ); /* - * Check the configured CONFIGURE_IDLE_TASK_BODY. - */ - T_eq_ptr( - rtems_configuration_get_idle_task(), - test_idle_task_body - ); - - /* * Check the configured CONFIGURE_INTERRUPT_STACK_SIZE value. */ T_eq_sz( diff --git a/testsuites/validation/ts-acfg.h b/testsuites/validation/ts-acfg.h new file mode 100644 index 0000000000..3ee9951ebd --- /dev/null +++ b/testsuites/validation/ts-acfg.h @@ -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 ); +} diff --git a/testsuites/validation/ts-validation-acfg-0.c b/testsuites/validation/ts-validation-acfg-0.c index 73b05ae32a..e1144dd95d 100644 --- a/testsuites/validation/ts-validation-acfg-0.c +++ b/testsuites/validation/ts-validation-acfg-0.c @@ -52,6 +52,9 @@ #include "config.h" #endif +#include "ts-acfg.h" +#include "tx-support.h" + #include <rtems/test.h> /** @@ -61,69 +64,20 @@ * @ingroup RTEMSTestSuites * * @brief This validation test suite is used to validate the default value of - * application configuration options. + * application configuration options taking the optional BSP provided + * settings into account. * * @{ */ -#include <rtems.h> -#include <rtems/bspIo.h> -#include <rtems/test-info.h> -#include <rtems/testopts.h> - -#include <rtems/test.h> - -#include "tx-support.h" -#include "ts-config.h" - const char rtems_test_name[] = "ValidationAcfg0"; -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_IDLE_TASK_INITIALIZES_APPLICATION -#define CONFIGURE_IDLE_TASK_STACK_SIZE TEST_MINIMUM_STACK_SIZE - -static void *IdleBody( uintptr_t ignored ) +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 ); + RunTestSuite(); } #define CONFIGURE_IDLE_TASK_BODY IdleBody diff --git a/testsuites/validation/ts-validation-acfg-1.c b/testsuites/validation/ts-validation-acfg-1.c new file mode 100644 index 0000000000..863a672b23 --- /dev/null +++ b/testsuites/validation/ts-validation-acfg-1.c @@ -0,0 +1,111 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesValidationAcfg1 + */ + +/* + * 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 <bsp.h> + +#include "ts-acfg.h" + +#include <rtems/test.h> + +/** + * @defgroup RTEMSTestSuiteTestsuitesValidationAcfg1 \ + * spec:/testsuites/validation-acfg-1 + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite is used to validate the default value of + * application configuration options where all optional BSP provided settings + * are disabled. + * + * @{ + */ + +const char rtems_test_name[] = "ValidationAcfg1"; + +static void FatalExtension( + rtems_fatal_source source, + bool always_set_to_false, + rtems_fatal_code code +) +{ + rtems_extensions_table bsp = BSP_INITIAL_EXTENSION; + + ( *bsp.fatal )( source, always_set_to_false, code ); +} + +static void Init( rtems_task_argument arg ) +{ + (void) arg; + RunTestSuite(); +} + +#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = FatalExtension } + +#define CONFIGURE_DISABLE_BSP_SETTINGS + +#define CONFIGURE_MAXIMUM_TASKS 1 + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE \ + RTEMS_TASK_STORAGE_SIZE( \ + RTEMS_MINIMUM_STACK_SIZE, \ + RTEMS_DEFAULT_ATTRIBUTES \ + ) + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> + +/** @} */ |