From 14f739cd9e92666c653b3db1bb037ecd3416a6e4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 10 Dec 2021 09:45:29 +0100 Subject: validation: Test sparc/leon3 BSP family --- .../validation/bsp-sparc-leon3-gr712rc.yml | 21 +++ ...sp-sparc-leon3-cache-snooping-disabled-boot.yml | 24 +++ ...arc-leon3-cache-snooping-disabled-secondary.yml | 25 +++ .../fatal-bsp-sparc-leon3-clock-initialization.yml | 21 +++ .../fatal-bsp-sparc-leon3-shutdown-nop.yml | 23 +++ .../fatal-bsp-sparc-leon3-shutdown-request.yml | 24 +++ .../fatal-bsp-sparc-leon3-shutdown-response.yml | 24 +++ .../fatal-bsp-sparc-leon3-shutdown-timeout.yml | 24 +++ spec/build/testsuites/validation/grp.yml | 14 ++ testsuites/validation/tc-bsp-sparc-leon3-gr712rc.c | 125 ++++++++++++++ ...-bsp-sparc-leon3-cache-snooping-disabled-boot.c | 175 +++++++++++++++++++ ...-bsp-sparc-leon3-cache-snooping-disabled-boot.h | 84 +++++++++ ...sparc-leon3-cache-snooping-disabled-secondary.c | 176 +++++++++++++++++++ ...sparc-leon3-cache-snooping-disabled-secondary.h | 84 +++++++++ ...tr-fatal-bsp-sparc-leon3-clock-initialization.c | 190 +++++++++++++++++++++ ...tr-fatal-bsp-sparc-leon3-clock-initialization.h | 84 +++++++++ .../tr-fatal-bsp-sparc-leon3-shutdown-response.c | 190 +++++++++++++++++++++ .../tr-fatal-bsp-sparc-leon3-shutdown-response.h | 84 +++++++++ .../tr-fatal-bsp-sparc-leon3-shutdown-timeout.c | 185 ++++++++++++++++++++ .../tr-fatal-bsp-sparc-leon3-shutdown-timeout.h | 84 +++++++++ testsuites/validation/ts-bsp-sparc-leon3-gr712rc.c | 72 ++++++++ ...-bsp-sparc-leon3-cache-snooping-disabled-boot.c | 79 +++++++++ ...sparc-leon3-cache-snooping-disabled-secondary.c | 82 +++++++++ ...ts-fatal-bsp-sparc-leon3-clock-initialization.c | 79 +++++++++ .../ts-fatal-bsp-sparc-leon3-shutdown-nop.c | 114 +++++++++++++ .../ts-fatal-bsp-sparc-leon3-shutdown-response.c | 94 ++++++++++ .../ts-fatal-bsp-sparc-leon3-shutdown-timeout.c | 81 +++++++++ 27 files changed, 2262 insertions(+) create mode 100644 spec/build/testsuites/validation/bsp-sparc-leon3-gr712rc.yml create mode 100644 spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.yml create mode 100644 spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.yml create mode 100644 spec/build/testsuites/validation/fatal-bsp-sparc-leon3-clock-initialization.yml create mode 100644 spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-nop.yml create mode 100644 spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-request.yml create mode 100644 spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-response.yml create mode 100644 spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-timeout.yml create mode 100644 testsuites/validation/tc-bsp-sparc-leon3-gr712rc.c create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.c create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.h create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.c create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.h create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.c create mode 100644 testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.h create mode 100644 testsuites/validation/ts-bsp-sparc-leon3-gr712rc.c create mode 100644 testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c create mode 100644 testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c create mode 100644 testsuites/validation/ts-fatal-bsp-sparc-leon3-clock-initialization.c create mode 100644 testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-nop.c create mode 100644 testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.c create mode 100644 testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-timeout.c diff --git a/spec/build/testsuites/validation/bsp-sparc-leon3-gr712rc.yml b/spec/build/testsuites/validation/bsp-sparc-leon3-gr712rc.yml new file mode 100644 index 0000000000..d7679a3bae --- /dev/null +++ b/spec/build/testsuites/validation/bsp-sparc-leon3-gr712rc.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: sparc/gr712rc +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/validation/tc-bsp-sparc-leon3-gr712rc.c +- testsuites/validation/ts-bsp-sparc-leon3-gr712rc.c +stlib: [] +target: testsuites/validation/ts-bsp-sparc-leon3-gr712rc.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.yml b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.yml new file mode 100644 index 0000000000..d544370f9f --- /dev/null +++ b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.yml @@ -0,0 +1,24 @@ +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: + and: + - RTEMS_SMP + - bsps/sparc/leon3 +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c +- testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c +stlib: [] +target: testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.yml b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.yml new file mode 100644 index 0000000000..cde3dc366a --- /dev/null +++ b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.yml @@ -0,0 +1,25 @@ +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: + and: + - RTEMS_SMP + - bsps/sparc/leon3 +features: c cprogram +includes: [] +ldflags: +- -Wl,--wrap=bsp_start_on_secondary_processor +links: [] +source: +- testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c +- testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c +stlib: [] +target: testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-clock-initialization.yml b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-clock-initialization.yml new file mode 100644 index 0000000000..fab4045c90 --- /dev/null +++ b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-clock-initialization.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: bsps/sparc/leon3 +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.c +- testsuites/validation/ts-fatal-bsp-sparc-leon3-clock-initialization.c +stlib: [] +target: testsuites/validation/ts-fatal-bsp-sparc-leon3-clock-initialization.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-nop.yml b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-nop.yml new file mode 100644 index 0000000000..0bebc1d5e2 --- /dev/null +++ b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-nop.yml @@ -0,0 +1,23 @@ +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: + and: + - RTEMS_SMP + - bsps/sparc/leon3 +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-nop.c +stlib: [] +target: testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-nop.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-request.yml b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-request.yml new file mode 100644 index 0000000000..730102a1de --- /dev/null +++ b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-request.yml @@ -0,0 +1,24 @@ +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: + and: + - RTEMS_SMP + - bsps/sparc/leon3 +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.c +- testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.c +stlib: [] +target: testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-response.yml b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-response.yml new file mode 100644 index 0000000000..730102a1de --- /dev/null +++ b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-response.yml @@ -0,0 +1,24 @@ +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: + and: + - RTEMS_SMP + - bsps/sparc/leon3 +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.c +- testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.c +stlib: [] +target: testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-timeout.yml b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-timeout.yml new file mode 100644 index 0000000000..0d3b4c9569 --- /dev/null +++ b/spec/build/testsuites/validation/fatal-bsp-sparc-leon3-shutdown-timeout.yml @@ -0,0 +1,24 @@ +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: + and: + - RTEMS_SMP + - bsps/sparc/leon3 +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.c +- testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-timeout.c +stlib: [] +target: testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-timeout.exe +type: build +use-after: +- validation +use-before: [] diff --git a/spec/build/testsuites/validation/grp.yml b/spec/build/testsuites/validation/grp.yml index 909936f149..1598a37db0 100644 --- a/spec/build/testsuites/validation/grp.yml +++ b/spec/build/testsuites/validation/grp.yml @@ -12,8 +12,22 @@ ldflags: [] links: - role: build-dependency uid: libvalidation +- role: build-dependency + uid: bsp-sparc-leon3-gr712rc - role: build-dependency uid: fatal-boot-processor-not-assigned-to-scheduler +- role: build-dependency + uid: fatal-bsp-sparc-leon3-cache-snooping-disabled-boot +- role: build-dependency + uid: fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary +- role: build-dependency + uid: fatal-bsp-sparc-leon3-clock-initialization +- role: build-dependency + uid: fatal-bsp-sparc-leon3-shutdown-nop +- role: build-dependency + uid: fatal-bsp-sparc-leon3-shutdown-response +- role: build-dependency + uid: fatal-bsp-sparc-leon3-shutdown-timeout - role: build-dependency uid: fatal-init-task-construct-failed - role: build-dependency diff --git a/testsuites/validation/tc-bsp-sparc-leon3-gr712rc.c b/testsuites/validation/tc-bsp-sparc-leon3-gr712rc.c new file mode 100644 index 0000000000..98e883146c --- /dev/null +++ b/testsuites/validation/tc-bsp-sparc-leon3-gr712rc.c @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValGr712rc + */ + +/* + * 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 + +#include "tx-support.h" + +#include + +/** + * @defgroup RTEMSTestCaseBspSparcLeon3ValGr712rc \ + * spec:/bsp/sparc/leon3/val/gr712rc + * + * @ingroup RTEMSTestSuiteTestsuitesBspSparcLeon3Gr712rc + * + * @brief This test case collection provides validation test cases for the + * ``sparc/gr712rc`` BSP. + * + * This test case performs the following actions: + * + * - Validate the use of the ``-mfix-gr712rc`` compiler option. + * + * - Check that the compiler built-in define ``__FIX_LEON3FT_B2BST`` is + * defined. + * + * - Check that the compiler built-in define ``__FIX_LEON3FT_TN0018`` is + * defined. + * + * - Check that the ``SPARC_LEON3FT_B2BST_NOP`` define expands to a ``nop`` + * instruction. + * + * @{ + */ + +/** + * @brief Validate the use of the ``-mfix-gr712rc`` compiler option. + */ +static void BspSparcLeon3ValGr712rc_Action_0( void ) +{ + const char *s; + + /* + * Check that the compiler built-in define ``__FIX_LEON3FT_B2BST`` is + * defined. + */ + #if !defined(__FIX_LEON3FT_B2BST) + #error "__FIX_LEON3FT_B2BST is not defined" + #endif + + /* + * Check that the compiler built-in define ``__FIX_LEON3FT_TN0018`` is + * defined. + */ + #if !defined(__FIX_LEON3FT_TN0018) + #error "__FIX_LEON3FT_TN0018 is not defined" + #endif + + /* + * Check that the ``SPARC_LEON3FT_B2BST_NOP`` define expands to a ``nop`` + * instruction. + */ + s = RTEMS_XSTRING( SPARC_LEON3FT_B2BST_NOP ); + T_true( IsEqualIgnoreWhiteSpace( s, "nop" ) ); +} + +/** + * @fn void T_case_body_BspSparcLeon3ValGr712rc( void ) + */ +T_TEST_CASE( BspSparcLeon3ValGr712rc ) +{ + BspSparcLeon3ValGr712rc_Action_0(); +} + +/** @} */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c new file mode 100644 index 0000000000..afc69a77f1 --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c @@ -0,0 +1,175 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledBoot + */ + +/* + * 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 +#include +#include + +#include "tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h" + +#include + +/** + * @defgroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledBoot \ + * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-boot + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3CacheSnoopingDisabledBoot + * + * @brief Tests a fatal error. + * + * This test case performs the following actions: + * + * - The test action is carried out by the DisableCacheSnooping() system + * initialization handler. + * + * - Check that the expected fatal source is present. + * + * - Check that the expected fatal code is present. + * + * @{ + */ + +/** + * @brief Test context for + * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-boot test case. + */ +typedef struct { + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run() parameter. + */ + rtems_fatal_source source; + + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run() parameter. + */ + rtems_fatal_code code; +} BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context; + +static BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context + BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Instance; + +static void DisableCacheSnooping( void ) +{ + uint32_t control; + + control = leon3_get_cache_control_register(); + control &= ~LEON3_REG_CACHE_CTRL_DS; + leon3_set_cache_control_register( control ); +} + +RTEMS_SYSINIT_ITEM( + DisableCacheSnooping, + RTEMS_SYSINIT_BSP_EARLY, + RTEMS_SYSINIT_ORDER_FIRST +); + +static T_fixture BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Fixture = { + .setup = NULL, + .stop = NULL, + .teardown = NULL, + .scope = NULL, + .initial_context = &BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Instance +}; + +/** + * @brief The test action is carried out by the DisableCacheSnooping() system + * initialization handler. + */ +static void BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Action_0( + BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context *ctx +) +{ + /* Nothing to do */ + + /* + * Check that the expected fatal source is present. + */ + T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_BSP ); + + /* + * Check that the expected fatal code is present. + */ + T_step_eq_ulong( + 1, + ctx->code, + LEON3_FATAL_INVALID_CACHE_CONFIG_BOOT_PROCESSOR + ); +} + +void BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run( + rtems_fatal_source source, + rtems_fatal_code code +) +{ + BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context *ctx; + + ctx = &BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Instance; + ctx->source = source; + ctx->code = code; + + ctx = T_case_begin( + "BspSparcLeon3ValFatalCacheSnoopingDisabledBoot", + &BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Fixture + ); + + T_plan( 2 ); + + BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Action_0( ctx ); + + T_case_end(); +} + +/** @} */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h new file mode 100644 index 0000000000..5254d0caf3 --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h @@ -0,0 +1,84 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledBoot + */ + +/* + * 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 + */ + +#ifndef _TR_FATAL_BSP_SPARC_LEON3_CACHE_SNOOPING_DISABLED_BOOT_H +#define _TR_FATAL_BSP_SPARC_LEON3_CACHE_SNOOPING_DISABLED_BOOT_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledBoot + * + * @{ + */ + +/** + * @brief Runs the parameterized test case. + * + * @param source is fatal source. + * + * @param code is fatal code. + */ +void BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run( + rtems_fatal_source source, + rtems_fatal_code code +); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TR_FATAL_BSP_SPARC_LEON3_CACHE_SNOOPING_DISABLED_BOOT_H */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c new file mode 100644 index 0000000000..623adc02dc --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c @@ -0,0 +1,176 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledSecondary + */ + +/* + * 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 +#include +#include + +#include "tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h" + +#include + +/** + * @defgroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledSecondary \ + * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-secondary + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3CacheSnoopingDisabledSecondary + * + * @brief Tests a fatal error. + * + * This test case performs the following actions: + * + * - The test action is carried out by the wrapped + * bsp_start_on_secondary_processor() function. + * + * - Check that the expected fatal source is present. + * + * - Check that the expected fatal code is present. + * + * @{ + */ + +/** + * @brief Test context for + * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-secondary test + * case. + */ +typedef struct { + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run() parameter. + */ + rtems_fatal_source source; + + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run() parameter. + */ + rtems_fatal_code code; +} BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context; + +static BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context + BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Instance; + +void __real_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self ); + +void __wrap_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self ); + +void __wrap_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self ) +{ + uint32_t control; + + control = leon3_get_cache_control_register(); + control &= ~LEON3_REG_CACHE_CTRL_DS; + leon3_set_cache_control_register( control ); + + __real_bsp_start_on_secondary_processor( cpu_self ); +} + +static T_fixture BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Fixture = { + .setup = NULL, + .stop = NULL, + .teardown = NULL, + .scope = NULL, + .initial_context = &BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Instance +}; + +/** + * @brief The test action is carried out by the wrapped + * bsp_start_on_secondary_processor() function. + */ +static void BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Action_0( + BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context *ctx +) +{ + /* Nothing to do */ + + /* + * Check that the expected fatal source is present. + */ + T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_BSP ); + + /* + * Check that the expected fatal code is present. + */ + T_step_eq_ulong( + 1, + ctx->code, + LEON3_FATAL_INVALID_CACHE_CONFIG_SECONDARY_PROCESSOR + ); +} + +void BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run( + rtems_fatal_source source, + rtems_fatal_code code +) +{ + BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context *ctx; + + ctx = &BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Instance; + ctx->source = source; + ctx->code = code; + + ctx = T_case_begin( + "BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary", + &BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Fixture + ); + + T_plan( 2 ); + + BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Action_0( ctx ); + + T_case_end(); +} + +/** @} */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h new file mode 100644 index 0000000000..638f3f204a --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h @@ -0,0 +1,84 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledSecondary + */ + +/* + * 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 + */ + +#ifndef _TR_FATAL_BSP_SPARC_LEON3_CACHE_SNOOPING_DISABLED_SECONDARY_H +#define _TR_FATAL_BSP_SPARC_LEON3_CACHE_SNOOPING_DISABLED_SECONDARY_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup RTEMSTestCaseBspSparcLeon3ValFatalCacheSnoopingDisabledSecondary + * + * @{ + */ + +/** + * @brief Runs the parameterized test case. + * + * @param source is fatal source. + * + * @param code is fatal code. + */ +void BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run( + rtems_fatal_source source, + rtems_fatal_code code +); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TR_FATAL_BSP_SPARC_LEON3_CACHE_SNOOPING_DISABLED_SECONDARY_H */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.c b/testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.c new file mode 100644 index 0000000000..f727311fb1 --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.c @@ -0,0 +1,190 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalClockInitialization + */ + +/* + * 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 +#include +#include +#include + +#include "tr-fatal-bsp-sparc-leon3-clock-initialization.h" + +#include + +/** + * @defgroup RTEMSTestCaseBspSparcLeon3ValFatalClockInitialization \ + * spec:/bsp/sparc/leon3/val/fatal-clock-initialization + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ClockInitialization + * + * @brief Tests a fatal error. + * + * This test case performs the following actions: + * + * - The test action is carried out by the OccupyClockInterrupt() system + * initialization handler. + * + * - Check that the expected fatal source is present. + * + * - Check that the expected fatal code is present. + * + * @{ + */ + +/** + * @brief Test context for spec:/bsp/sparc/leon3/val/fatal-clock-initialization + * test case. + */ +typedef struct { + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalClockInitialization_Run() parameter. + */ + rtems_fatal_source source; + + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalClockInitialization_Run() parameter. + */ + rtems_fatal_code code; +} BspSparcLeon3ValFatalClockInitialization_Context; + +static BspSparcLeon3ValFatalClockInitialization_Context + BspSparcLeon3ValFatalClockInitialization_Instance; + +static void ClockInterrupt( void *arg ) +{ + (void) arg; +} + +static rtems_interrupt_entry interrupt_entry = RTEMS_INTERRUPT_ENTRY_INITIALIZER( + ClockInterrupt, + NULL, + "Clock" +); + +static void OccupyClockInterrupt( void ) +{ + rtems_vector_number vector; + + vector = GPTIMER_CONFIG_IRQ_GET( grlib_load_32( &LEON3_Timer_Regs->config ) ); + (void) rtems_interrupt_entry_install( + vector, + RTEMS_INTERRUPT_UNIQUE, + &interrupt_entry + ); +} + +RTEMS_SYSINIT_ITEM( + OccupyClockInterrupt, + RTEMS_SYSINIT_DEVICE_DRIVERS, + RTEMS_SYSINIT_ORDER_FIRST +); + +static T_fixture BspSparcLeon3ValFatalClockInitialization_Fixture = { + .setup = NULL, + .stop = NULL, + .teardown = NULL, + .scope = NULL, + .initial_context = &BspSparcLeon3ValFatalClockInitialization_Instance +}; + +/** + * @brief The test action is carried out by the OccupyClockInterrupt() system + * initialization handler. + */ +static void BspSparcLeon3ValFatalClockInitialization_Action_0( + BspSparcLeon3ValFatalClockInitialization_Context *ctx +) +{ + /* Nothing to do */ + + /* + * Check that the expected fatal source is present. + */ + T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_BSP ); + + /* + * Check that the expected fatal code is present. + */ + T_step_eq_ulong( + 1, + ctx->code, + LEON3_FATAL_CLOCK_INITIALIZATION + ); +} + +void BspSparcLeon3ValFatalClockInitialization_Run( + rtems_fatal_source source, + rtems_fatal_code code +) +{ + BspSparcLeon3ValFatalClockInitialization_Context *ctx; + + ctx = &BspSparcLeon3ValFatalClockInitialization_Instance; + ctx->source = source; + ctx->code = code; + + ctx = T_case_begin( + "BspSparcLeon3ValFatalClockInitialization", + &BspSparcLeon3ValFatalClockInitialization_Fixture + ); + + T_plan( 2 ); + + BspSparcLeon3ValFatalClockInitialization_Action_0( ctx ); + + T_case_end(); +} + +/** @} */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.h b/testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.h new file mode 100644 index 0000000000..f782643359 --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.h @@ -0,0 +1,84 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalClockInitialization + */ + +/* + * 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 + */ + +#ifndef _TR_FATAL_BSP_SPARC_LEON3_CLOCK_INITIALIZATION_H +#define _TR_FATAL_BSP_SPARC_LEON3_CLOCK_INITIALIZATION_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup RTEMSTestCaseBspSparcLeon3ValFatalClockInitialization + * + * @{ + */ + +/** + * @brief Runs the parameterized test case. + * + * @param source is fatal source. + * + * @param code is fatal code. + */ +void BspSparcLeon3ValFatalClockInitialization_Run( + rtems_fatal_source source, + rtems_fatal_code code +); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TR_FATAL_BSP_SPARC_LEON3_CLOCK_INITIALIZATION_H */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.c b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.c new file mode 100644 index 0000000000..42c510b8fa --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.c @@ -0,0 +1,190 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownResponse + */ + +/* + * 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 +#include +#include + +#include "tr-fatal-bsp-sparc-leon3-shutdown-response.h" + +#include + +/** + * @defgroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownResponse \ + * spec:/bsp/sparc/leon3/val/fatal-shutdown-response + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownResponse + * + * @brief Tests a fatal error. + * + * This test case performs the following actions: + * + * - Request an SMP shutdown on the second processor and wait for a power down + * of this processor. + * + * - Check that the expected fatal source is present. + * + * - Check that the expected fatal code is present. + * + * - Check that the second processor was not powered down before the shutdown + * request. + * + * - Wait until the second processor is powered down. + * + * @{ + */ + +/** + * @brief Test context for spec:/bsp/sparc/leon3/val/fatal-shutdown-response + * test case. + */ +typedef struct { + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalShutdownResponse_Run() parameter. + */ + rtems_fatal_source source; + + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalShutdownResponse_Run() parameter. + */ + rtems_fatal_code code; +} BspSparcLeon3ValFatalShutdownResponse_Context; + +static BspSparcLeon3ValFatalShutdownResponse_Context + BspSparcLeon3ValFatalShutdownResponse_Instance; + +static void TriggerTestCase( void ) +{ + rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 123456 ); +} + +RTEMS_SYSINIT_ITEM( + TriggerTestCase, + RTEMS_SYSINIT_DEVICE_DRIVERS, + RTEMS_SYSINIT_ORDER_MIDDLE +); + +static T_fixture BspSparcLeon3ValFatalShutdownResponse_Fixture = { + .setup = NULL, + .stop = NULL, + .teardown = NULL, + .scope = NULL, + .initial_context = &BspSparcLeon3ValFatalShutdownResponse_Instance +}; + +/** + * @brief Request an SMP shutdown on the second processor and wait for a power + * down of this processor. + */ +static void BspSparcLeon3ValFatalShutdownResponse_Action_0( + BspSparcLeon3ValFatalShutdownResponse_Context *ctx +) +{ + irqamp *regs; + uint32_t mpstat; + + regs = LEON3_IrqCtrl_Regs; + mpstat = grlib_load_32( ®s->mpstat ); + _SMP_Request_shutdown(); + + /* + * Check that the expected fatal source is present. + */ + T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_APPLICATION ); + + /* + * Check that the expected fatal code is present. + */ + T_step_eq_ulong( 1, ctx->code, 123456 ); + + /* + * Check that the second processor was not powered down before the shutdown + * request. + */ + T_step_eq_u32( 2, mpstat & 0x2U, 0 ); + + /* + * Wait until the second processor is powered down. + */ + while ( ( grlib_load_32( ®s->mpstat ) & 0x2U ) != 0x2U ) { + /* Wait */ + } +} + +void BspSparcLeon3ValFatalShutdownResponse_Run( + rtems_fatal_source source, + rtems_fatal_code code +) +{ + BspSparcLeon3ValFatalShutdownResponse_Context *ctx; + + ctx = &BspSparcLeon3ValFatalShutdownResponse_Instance; + ctx->source = source; + ctx->code = code; + + ctx = T_case_begin( + "BspSparcLeon3ValFatalShutdownResponse", + &BspSparcLeon3ValFatalShutdownResponse_Fixture + ); + + T_plan( 3 ); + + BspSparcLeon3ValFatalShutdownResponse_Action_0( ctx ); + + T_case_end(); +} + +/** @} */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.h b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.h new file mode 100644 index 0000000000..15e02131d3 --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.h @@ -0,0 +1,84 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownResponse + */ + +/* + * 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 + */ + +#ifndef _TR_FATAL_BSP_SPARC_LEON3_SHUTDOWN_RESPONSE_H +#define _TR_FATAL_BSP_SPARC_LEON3_SHUTDOWN_RESPONSE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownResponse + * + * @{ + */ + +/** + * @brief Runs the parameterized test case. + * + * @param source is fatal source. + * + * @param code is fatal code. + */ +void BspSparcLeon3ValFatalShutdownResponse_Run( + rtems_fatal_source source, + rtems_fatal_code code +); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TR_FATAL_BSP_SPARC_LEON3_SHUTDOWN_RESPONSE_H */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.c b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.c new file mode 100644 index 0000000000..3ce3da298a --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.c @@ -0,0 +1,185 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownTimeout + */ + +/* + * 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 +#include +#include + +#include "tr-fatal-bsp-sparc-leon3-shutdown-timeout.h" + +#include + +/** + * @defgroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownTimeout \ + * spec:/bsp/sparc/leon3/val/fatal-shutdown-timeout + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownTimeout + * + * @brief Tests a fatal error. + * + * This test case performs the following actions: + * + * - Request the second processor to wait in an infinite loop with maskable + * interrupts disabled. The test suite will only finish execution if + * bsp_fatal_extension() halts the processor after a shutdown request + * timeout. + * + * - Check that the expected fatal source is present. + * + * - Check that the expected fatal code is present. + * + * @{ + */ + +/** + * @brief Test context for spec:/bsp/sparc/leon3/val/fatal-shutdown-timeout + * test case. + */ +typedef struct { + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalShutdownTimeout_Run() parameter. + */ + rtems_fatal_source source; + + /** + * @brief This member contains a copy of the corresponding + * BspSparcLeon3ValFatalShutdownTimeout_Run() parameter. + */ + rtems_fatal_code code; +} BspSparcLeon3ValFatalShutdownTimeout_Context; + +static BspSparcLeon3ValFatalShutdownTimeout_Context + BspSparcLeon3ValFatalShutdownTimeout_Instance; + +static void IdleHandler( void *arg ) +{ + (void) arg; + (void) _CPU_Thread_Idle_body( 0 ); +} + +static const Per_CPU_Job_context idle_context = { + .handler = IdleHandler +}; + +static Per_CPU_Job idle_job = { + .context = &idle_context +}; + +static void TriggerTestCase( void ) +{ + rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 123456 ); +} + +RTEMS_SYSINIT_ITEM( + TriggerTestCase, + RTEMS_SYSINIT_DEVICE_DRIVERS, + RTEMS_SYSINIT_ORDER_MIDDLE +); + +static T_fixture BspSparcLeon3ValFatalShutdownTimeout_Fixture = { + .setup = NULL, + .stop = NULL, + .teardown = NULL, + .scope = NULL, + .initial_context = &BspSparcLeon3ValFatalShutdownTimeout_Instance +}; + +/** + * @brief Request the second processor to wait in an infinite loop with + * maskable interrupts disabled. The test suite will only finish execution + * if bsp_fatal_extension() halts the processor after a shutdown request + * timeout. + */ +static void BspSparcLeon3ValFatalShutdownTimeout_Action_0( + BspSparcLeon3ValFatalShutdownTimeout_Context *ctx +) +{ + _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 1 ), &idle_job ); + + /* + * Check that the expected fatal source is present. + */ + T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_APPLICATION ); + + /* + * Check that the expected fatal code is present. + */ + T_step_eq_ulong( 1, ctx->code, 123456 ); +} + +void BspSparcLeon3ValFatalShutdownTimeout_Run( + rtems_fatal_source source, + rtems_fatal_code code +) +{ + BspSparcLeon3ValFatalShutdownTimeout_Context *ctx; + + ctx = &BspSparcLeon3ValFatalShutdownTimeout_Instance; + ctx->source = source; + ctx->code = code; + + ctx = T_case_begin( + "BspSparcLeon3ValFatalShutdownTimeout", + &BspSparcLeon3ValFatalShutdownTimeout_Fixture + ); + + T_plan( 2 ); + + BspSparcLeon3ValFatalShutdownTimeout_Action_0( ctx ); + + T_case_end(); +} + +/** @} */ diff --git a/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.h b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.h new file mode 100644 index 0000000000..536c3c5989 --- /dev/null +++ b/testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.h @@ -0,0 +1,84 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownTimeout + */ + +/* + * 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 + */ + +#ifndef _TR_FATAL_BSP_SPARC_LEON3_SHUTDOWN_TIMEOUT_H +#define _TR_FATAL_BSP_SPARC_LEON3_SHUTDOWN_TIMEOUT_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup RTEMSTestCaseBspSparcLeon3ValFatalShutdownTimeout + * + * @{ + */ + +/** + * @brief Runs the parameterized test case. + * + * @param source is fatal source. + * + * @param code is fatal code. + */ +void BspSparcLeon3ValFatalShutdownTimeout_Run( + rtems_fatal_source source, + rtems_fatal_code code +); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TR_FATAL_BSP_SPARC_LEON3_SHUTDOWN_TIMEOUT_H */ diff --git a/testsuites/validation/ts-bsp-sparc-leon3-gr712rc.c b/testsuites/validation/ts-bsp-sparc-leon3-gr712rc.c new file mode 100644 index 0000000000..deb4874cf9 --- /dev/null +++ b/testsuites/validation/ts-bsp-sparc-leon3-gr712rc.c @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesBspSparcLeon3Gr712rc + */ + +/* + * 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 + +/** + * @defgroup RTEMSTestSuiteTestsuitesBspSparcLeon3Gr712rc \ + * spec:/testsuites/bsp-sparc-leon3-gr712rc + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite contains BSP-specific test cases. + * + * @{ + */ + +const char rtems_test_name[] = "BspSparcLeon3Gr712rc"; + +#include "ts-default.h" + +/** @} */ diff --git a/testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c b/testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c new file mode 100644 index 0000000000..082f0efeb7 --- /dev/null +++ b/testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c @@ -0,0 +1,79 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3CacheSnoopingDisabledBoot + */ + +/* + * 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 "tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h" + +#include + +/** + * @defgroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3CacheSnoopingDisabledBoot \ + * spec:/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite contains a test case which triggers a + * fatal error during system initialization. + * + * @{ + */ + +const char rtems_test_name[] = "FatalBspSparcLeon3CacheSnoopingDisabledBoot"; + +#define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run + +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#include "ts-fatal-sysinit.h" + +/** @} */ diff --git a/testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c b/testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c new file mode 100644 index 0000000000..8037a2529b --- /dev/null +++ b/testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c @@ -0,0 +1,82 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3CacheSnoopingDisabledSecondary + */ + +/* + * 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 "tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h" + +#include + +/** + * @defgroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3CacheSnoopingDisabledSecondary \ + * spec:/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite contains a test case which triggers a + * fatal error during system initialization. + * + * @{ + */ + +const char rtems_test_name[] = "FatalBspSparcLeon3CacheSnoopingDisabledSecondary"; + +#define FATAL_SYSINIT_RUN \ + BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run + +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_PROCESSORS 2 + +#include "ts-fatal-sysinit.h" + +/** @} */ diff --git a/testsuites/validation/ts-fatal-bsp-sparc-leon3-clock-initialization.c b/testsuites/validation/ts-fatal-bsp-sparc-leon3-clock-initialization.c new file mode 100644 index 0000000000..e9dfcddb59 --- /dev/null +++ b/testsuites/validation/ts-fatal-bsp-sparc-leon3-clock-initialization.c @@ -0,0 +1,79 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ClockInitialization + */ + +/* + * 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 "tr-fatal-bsp-sparc-leon3-clock-initialization.h" + +#include + +/** + * @defgroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ClockInitialization \ + * spec:/testsuites/fatal-bsp-sparc-leon3-clock-initialization + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite contains a test case which triggers a + * fatal error during system initialization. + * + * @{ + */ + +const char rtems_test_name[] = "FatalBspSparcLeon3ClockInitialization"; + +#define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalClockInitialization_Run + +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#include "ts-fatal-sysinit.h" + +/** @} */ diff --git a/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-nop.c b/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-nop.c new file mode 100644 index 0000000000..afe66d92d5 --- /dev/null +++ b/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-nop.c @@ -0,0 +1,114 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownNop + */ + +/* + * 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 +#include + +#include "ts-config.h" + +#include + +/** + * @defgroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownNop \ + * spec:/testsuites/fatal-bsp-sparc-leon3-shutdown-nop + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite provides an application configuration to + * perform a shutdown with present but not configured processors and a + * processor which is configured but not present. It contains no test cases. + * + * @{ + */ + +const char rtems_test_name[] = "FatalBspSparcLeon3ShutdownNop"; + +static void FinishTestSuite( void ) +{ + rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 123456 ); +} + +RTEMS_SYSINIT_ITEM( + FinishTestSuite, + RTEMS_SYSINIT_DEVICE_DRIVERS, + RTEMS_SYSINIT_ORDER_MIDDLE +); + +#define FATAL_SYSINIT_RUN( source, code ) do { } while ( 0 ) + +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_PROCESSORS 5 + +#include + +#define CONFIGURE_SCHEDULER_EDF_SMP + +#include + +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, \ + RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \ + RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \ + RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL ) + +#include "ts-fatal-sysinit.h" + +/** @} */ diff --git a/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.c b/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.c new file mode 100644 index 0000000000..6f5eb21bfb --- /dev/null +++ b/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.c @@ -0,0 +1,94 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownResponse + */ + +/* + * 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 + +#include "tr-fatal-bsp-sparc-leon3-shutdown-response.h" + +#include + +/** + * @defgroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownResponse \ + * spec:/testsuites/fatal-bsp-sparc-leon3-shutdown-response + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite contains a test case which performs a + * system shutdown. + * + * @{ + */ + +const char rtems_test_name[] = "FatalBspSparcLeon3ShutdownResponse"; + +#define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalShutdownResponse_Run + +static void FatalSysinitExit( rtems_fatal_code exit_code ) +{ + if ( exit_code == 0 ) { + rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN ); + } else { + rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, exit_code ); + } +} + +#define FATAL_SYSINIT_EXIT( exit_code ) FatalSysinitExit( exit_code ) + +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_PROCESSORS 2 + +#include "ts-fatal-sysinit.h" + +/** @} */ diff --git a/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-timeout.c b/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-timeout.c new file mode 100644 index 0000000000..20be30a0db --- /dev/null +++ b/testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-timeout.c @@ -0,0 +1,81 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownTimeout + */ + +/* + * 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 "tr-fatal-bsp-sparc-leon3-shutdown-timeout.h" + +#include + +/** + * @defgroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownTimeout \ + * spec:/testsuites/fatal-bsp-sparc-leon3-shutdown-timeout + * + * @ingroup RTEMSTestSuites + * + * @brief This validation test suite contains a test case which performs a + * system shutdown. + * + * @{ + */ + +const char rtems_test_name[] = "FatalBspSparcLeon3ShutdownTimeout"; + +#define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalShutdownTimeout_Run + +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_PROCESSORS 2 + +#include "ts-fatal-sysinit.h" + +/** @} */ -- cgit v1.2.3