diff options
Diffstat (limited to 'spec/dev/clock/xil-ttc/val/fatal-irq-install.yml')
-rw-r--r-- | spec/dev/clock/xil-ttc/val/fatal-irq-install.yml | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/spec/dev/clock/xil-ttc/val/fatal-irq-install.yml b/spec/dev/clock/xil-ttc/val/fatal-irq-install.yml new file mode 100644 index 00000000..b2c22cdb --- /dev/null +++ b/spec/dev/clock/xil-ttc/val/fatal-irq-install.yml @@ -0,0 +1,92 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2024 embedded brains GmbH & Co. KG +enabled-by: bsps/arm/xilinx-zynqmp-rpu +links: [] +test-actions: +- action-brief: | + The test action is carried out by the OccupyClockInterrupt() system + initialization handler. + action-code: | + /* Nothing to do */ + checks: + - brief: | + Check that the expected fatal source is present. + code: | + T_step_eq_int( ${.:/step}, ctx->source, RTEMS_FATAL_SOURCE_BSP ); + links: + - role: validation + uid: ../req/fatal-irq-install + - brief: | + Check that the expected fatal code is present. + code: | + T_step_eq_ulong( + ${.:/step}, + ctx->code, + XIL_FATAL_TTC_IRQ_INSTALL + ); + links: + - role: validation + uid: ../req/fatal-irq-install + links: [] +test-brief: | + Tests a fatal error. +test-context: [] +test-context-support: null +test-description: null +test-header: + code: null + freestanding: true + includes: + - rtems.h + local-includes: [] + run-params: + - description: | + is fatal source. + dir: null + name: source + specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name} + - description: | + is fatal code. + dir: null + name: code + specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name} + target: testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.h +test-includes: +- rtems.h +- rtems/sysinit.h +- bsp.h +- bsp/fatal.h +test-local-includes: +- tr-fatal-clock-xil-ttc-irq-install.h +test-setup: null +test-stop: null +test-support: | + static void ClockInterrupt( void *arg ) + { + (void) arg; + } + + static rtems_interrupt_entry interrupt_entry = RTEMS_INTERRUPT_ENTRY_INITIALIZER( + ClockInterrupt, + NULL, + "Clock" + ); + + static void OccupyClockInterrupt( void ) + { + (void) rtems_interrupt_entry_install( + XIL_CLOCK_TTC_IRQ, + RTEMS_INTERRUPT_UNIQUE, + &interrupt_entry + ); + } + + RTEMS_SYSINIT_ITEM( + OccupyClockInterrupt, + RTEMS_SYSINIT_DEVICE_DRIVERS, + RTEMS_SYSINIT_ORDER_FIRST + ); +test-target: testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.c +test-teardown: null +type: test-case |