[rtems-central commit] spec: Wrap bsp_interrupt_spurious()
Sebastian Huber
sebh at rtems.org
Tue Aug 3 17:59:23 UTC 2021
Module: rtems-central
Branch: master
Commit: 2a68c015e555c641103e8bd35e3f5fb8b55fd092
Changeset: http://git.rtems.org/rtems-central/commit/?id=2a68c015e555c641103e8bd35e3f5fb8b55fd092
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Aug 3 19:37:48 2021 +0200
spec: Wrap bsp_interrupt_spurious()
Maybe this helps to fix a gcov issue.
---
spec/bsp/req/interrupt-spurious.yml | 33 +++++++++++++++++++++++++++------
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/spec/bsp/req/interrupt-spurious.yml b/spec/bsp/req/interrupt-spurious.yml
index b3e7cf9..c96a9a5 100644
--- a/spec/bsp/req/interrupt-spurious.yml
+++ b/spec/bsp/req/interrupt-spurious.yml
@@ -71,12 +71,10 @@ test-action: |
ctx->fatal_source = RTEMS_FATAL_SOURCE_LAST;
ctx->fatal_code = UINT32_MAX;
- if ( setjmp( ctx->before_call ) == 0 ) {
- if ( *ctx->first == NULL ) {
- bsp_interrupt_handler_dispatch_unchecked( ctx->vector );
- } else {
- bsp_interrupt_spurious( ctx->vector );
- }
+ if ( *ctx->first == NULL ) {
+ bsp_interrupt_handler_dispatch_unchecked( ctx->vector );
+ } else {
+ bsp_interrupt_spurious( ctx->vector );
}
test-brief: null
test-cleanup: null
@@ -157,12 +155,15 @@ test-setup:
];
rtems_interrupt_entry_initialize( &ctx->entry, EntryRoutine, ctx, "Info" );
+ test_case_active = true;
SetFatalExtension( FatalExtension );
description: null
test-stop: null
test-support: |
typedef BspReqInterruptSpurious_Context Context;
+ static bool test_case_active;
+
static void EntryRoutine( void *arg )
{
Context *ctx;
@@ -186,11 +187,31 @@ test-support: |
++ctx->fatal_counter;
longjmp( ctx->before_call, 1 );
}
+
+ void __real_bsp_interrupt_spurious( rtems_vector_number vector );
+
+ void __wrap_bsp_interrupt_spurious( rtems_vector_number vector );
+
+ void __wrap_bsp_interrupt_spurious( rtems_vector_number vector )
+ {
+ if ( test_case_active ) {
+ Context *ctx;
+
+ ctx = T_fixture_context();
+
+ if ( setjmp( ctx->before_call ) == 0 ) {
+ __real_bsp_interrupt_spurious( vector );
+ }
+ } else {
+ __real_bsp_interrupt_spurious( vector );
+ }
+ }
test-target: testsuites/validation/tc-bsp-interrupt-spurious.c
test-teardown:
brief: null
code: |
SetFatalExtension( NULL );
+ test_case_active = false;
description: null
text: ${.:text-template}
transition-map:
More information about the vc
mailing list