Index: testsuites/sptests/Makefile.am
===================================================================
--- testsuites/sptests/Makefile.am	(revision 8cbba4496a6cab7cdd6d31b8deb9afd05247a940)
+++ testsuites/sptests/Makefile.am	(revision 5020a281b5f99a3a140ce96caa87e8a53edf0419)
@@ -1291,7 +1291,5 @@
 sp_screens += spintrcritical13/spintrcritical13.scn
 sp_docs += spintrcritical13/spintrcritical13.doc
-spintrcritical13_SOURCES = spintrcritical13/init.c \
-	spintrcritical_support/intrcritical.c \
-	spintrcritical_support/intrcritical.h
+spintrcritical13_SOURCES = spintrcritical13/init.c
 spintrcritical13_CPPFLAGS = $(AM_CPPFLAGS) \
 	$(TEST_FLAGS_spintrcritical13) $(support_includes) \
@@ -1303,6 +1301,5 @@
 sp_screens += spintrcritical14/spintrcritical14.scn
 sp_docs += spintrcritical14/spintrcritical14.doc
-spintrcritical14_SOURCES = spintrcritical14/init.c \
-	spintrcritical_support/intrcritical.c
+spintrcritical14_SOURCES = spintrcritical14/init.c
 spintrcritical14_CPPFLAGS = $(AM_CPPFLAGS) \
 	$(TEST_FLAGS_spintrcritical14) $(support_includes) \
Index: testsuites/sptests/spintrcritical13/spintrcritical13.scn
===================================================================
--- testsuites/sptests/spintrcritical13/spintrcritical13.scn	(revision 8cbba4496a6cab7cdd6d31b8deb9afd05247a940)
+++ testsuites/sptests/spintrcritical13/spintrcritical13.scn	(revision 5020a281b5f99a3a140ce96caa87e8a53edf0419)
@@ -1,7 +1,24 @@
-*** TEST INTERRUPT CRITICAL SECTION 13 ***
-Init - Trying to generate timer fire from ISR while firing
-Init - Variation is: Timer Fire After
-Init - There is no way for the test to know if it hits the case
-Init - rtems_timer_create - OK
-Support - rtems_timer_create - creating timer 1
-*** END OF TEST INTERRUPT CRITICAL SECTION 13 ***
+*** BEGIN OF TEST SPINTRCRITICAL 13 ***
+*** TEST VERSION: 6.0.0.929e49a54ab4d2d18c9fb8d03610614f63e25b8d
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_DEBUG RTEMS_POSIX_API RTEMS_SMP
+*** TEST TOOLS: 10.0.1 20200406 (RTEMS 6, RSB bec88a6dd856892c3e66e4598252ea07d7a0d762, Newlib ece49e4)
+A:SPINTRCRITICAL 13
+S:Platform:RTEMS
+S:Compiler:10.0.1 20200406 (RTEMS 6, RSB bec88a6dd856892c3e66e4598252ea07d7a0d762, Newlib ece49e4)
+S:Version:6.0.0.929e49a54ab4d2d18c9fb8d03610614f63e25b8d
+S:BSP:realview_pbx_a9_qemu
+S:RTEMS_DEBUG:1
+S:RTEMS_MULTIPROCESSING:0
+S:RTEMS_POSIX_API:1
+S:RTEMS_PROFILING:0
+S:RTEMS_SMP:1
+B:TimerFireAfterInterrupt
+P:0:0:UI1:spintrcritical13impl.h:131
+P:1:0:UI1:spintrcritical13impl.h:134
+P:2:0:UI1:spintrcritical13impl.h:137
+E:TimerFireAfterInterrupt:N:3:F:0:D:0.116053
+Z:SPINTRCRITICAL 13:C:1:N:3:F:0:D:0.117144
+Y:ReportHash:SHA256:66bf247c36962dc930b099cc4979215b4cadb41edd8925097a91e8e7a4356725
+
+*** END OF TEST SPINTRCRITICAL 13 ***
Index: testsuites/sptests/spintrcritical13/spintrcritical13impl.h
===================================================================
--- testsuites/sptests/spintrcritical13/spintrcritical13impl.h	(revision 8cbba4496a6cab7cdd6d31b8deb9afd05247a940)
+++ testsuites/sptests/spintrcritical13/spintrcritical13impl.h	(revision 5020a281b5f99a3a140ce96caa87e8a53edf0419)
@@ -1,3 +1,5 @@
 /*
+ *  Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ *
  *  COPYRIGHT (c) 1989-2009.
  *  On-Line Applications Research Corporation (OAR).
@@ -12,15 +14,17 @@
 #endif
 
-#include <tmacros.h>
-#include <intrcritical.h>
+#include <string.h>
+
+#include <rtems/test.h>
+#include <rtems/test-info.h>
 
 #if defined(FIRE_AFTER)
   #define TEST_NAME          "13"
-  #define TEST_STRING        "Timer Fire After"
+  #define TEST_STRING        TimerFireAfterInterrupt
   #define TEST_DIRECTIVE     rtems_timer_fire_after
 
 #elif defined(SERVER_FIRE_AFTER)
   #define TEST_NAME          "14"
-  #define TEST_STRING        "Timer Server Fire After"
+  #define TEST_STRING        TimerServerFireAfterInterrupt
   #define TEST_DIRECTIVE     rtems_timer_server_fire_after
 
@@ -31,69 +35,115 @@
 const char rtems_test_name[] = "SPINTRCRITICAL " TEST_NAME;
 
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
-rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
-rtems_timer_service_routine TimerMethod(rtems_id  timer, void *arg);
+typedef struct {
+  rtems_id timer;
+  long potential_hits;
+  volatile bool early;
+  volatile bool late;
+} test_context;
 
-rtems_id Timer;
-
-rtems_timer_service_routine TimerMethod(
+static rtems_timer_service_routine TimerMethod(
   rtems_id  timer,
   void     *arg
 )
 {
+  (void) timer;
+  (void) arg;
 }
 
-rtems_timer_service_routine test_release_from_isr(
-  rtems_id  timer,
-  void     *arg
-)
+static T_interrupt_test_state interrupt( void *arg )
 {
-  (void) rtems_timer_fire_after( Timer, 10, TimerMethod, NULL );
+  test_context           *ctx;
+  rtems_status_code       sc;
+  T_interrupt_test_state  state;
+
+  state = T_interrupt_test_get_state();
+
+  if ( state != T_INTERRUPT_TEST_ACTION ) {
+    return T_INTERRUPT_TEST_CONTINUE;
+  }
+
+  ctx = arg;
+  sc = TEST_DIRECTIVE( ctx->timer, 10, TimerMethod, NULL );
+  T_quiet_rsc_success( sc );
+
+  if ( ctx->early ) {
+    state = T_INTERRUPT_TEST_EARLY;
+  } else if ( ctx->late ) {
+    state = T_INTERRUPT_TEST_LATE;
+  } else {
+    ++ctx->potential_hits;
+
+    if ( ctx->potential_hits > 13 ) {
+      state = T_INTERRUPT_TEST_DONE;
+    } else {
+      state = T_INTERRUPT_TEST_CONTINUE;
+    }
+  }
+
+  return state;
 }
 
-static bool test_body( void *arg )
+static void prepare( void *arg )
 {
-  rtems_status_code sc;
+  test_context *ctx;
 
-  (void) arg;
-
-  sc = TEST_DIRECTIVE( Timer, 10, TimerMethod, NULL );
-  rtems_test_assert( sc == RTEMS_SUCCESSFUL );
-
-  return false;
+  ctx = arg;
+  ctx->early = true;
+  ctx->late = false;
 }
 
-rtems_task Init(
-  rtems_task_argument ignored
-)
+static void action( void *arg )
 {
-  rtems_status_code     sc;
+  test_context      *ctx;
+  rtems_status_code  sc;
 
-  TEST_BEGIN();
+  ctx = arg;
+  ctx->early = false;
+  sc = TEST_DIRECTIVE( ctx->timer, 10, TimerMethod, NULL );
+  T_quiet_rsc_success( sc );
+  ctx->late = true;
 
-  puts( "Init - Trying to generate timer fire from ISR while firing" );
-  puts( "Init - Variation is: " TEST_STRING );
+  T_interrupt_test_busy_wait_for_interrupt();
+}
 
-  puts( "Init - There is no way for the test to know if it hits the case" );
+static const T_interrupt_test_config config = {
+  .prepare = prepare,
+  .action = action,
+  .interrupt = interrupt,
+  .max_iteration_count = 10000
+};
 
-  #if defined(SERVER_FIRE_AFTER)
-   /* initiate timer server */
-    sc = rtems_timer_initiate_server(
-      RTEMS_MINIMUM_PRIORITY,
-      RTEMS_MINIMUM_STACK_SIZE,
-      RTEMS_DEFAULT_ATTRIBUTES
-    );
-    directive_failed( sc, "rtems_timer_initiate_server" );
-  #endif
+T_TEST_CASE( TEST_STRING )
+{
+  test_context           ctx;
+  rtems_status_code      sc;
+  T_interrupt_test_state state;
 
-  puts( "Init - rtems_timer_create - OK" );
-  sc = rtems_timer_create( rtems_build_name( 'P', 'E', 'R', '1' ), &Timer);
-  directive_failed( sc, "rtems_timer_create" );
+  memset( &ctx, 0, sizeof( ctx ) );
 
-  interrupt_critical_section_test( test_body, NULL, test_release_from_isr );
+  sc = rtems_timer_create(
+    rtems_build_name( 'P', 'E', 'R', '1' ),
+    &ctx.timer
+  );
+  T_assert_rsc_success( sc );
 
-  TEST_END();
-  rtems_test_exit(0);
+  state = T_interrupt_test( &config, &ctx );
+  T_eq_int( state, T_INTERRUPT_TEST_DONE );
+
+  sc = rtems_timer_delete( ctx.timer );
+  T_rsc_success( sc );
+}
+
+static rtems_task Init( rtems_task_argument argument )
+{
+#if defined(SERVER_FIRE_AFTER)
+  (void) rtems_timer_initiate_server(
+    RTEMS_MINIMUM_PRIORITY,
+    RTEMS_MINIMUM_STACK_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES
+  );
+#endif
+
+  rtems_test_run( argument, TEST_STATE );
 }
 
@@ -108,6 +158,5 @@
   #define CONFIGURE_MAXIMUM_TASKS     2
 #endif
-#define CONFIGURE_MAXIMUM_TIMERS      2
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
+#define CONFIGURE_MAXIMUM_TIMERS      1
 #define CONFIGURE_MICROSECONDS_PER_TICK  1000
 #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
Index: testsuites/sptests/spintrcritical14/spintrcritical14.scn
===================================================================
--- testsuites/sptests/spintrcritical14/spintrcritical14.scn	(revision 8cbba4496a6cab7cdd6d31b8deb9afd05247a940)
+++ testsuites/sptests/spintrcritical14/spintrcritical14.scn	(revision 5020a281b5f99a3a140ce96caa87e8a53edf0419)
@@ -1,7 +1,24 @@
-*** TEST INTERRUPT CRITICAL SECTION 14 ***
-Init - Trying to generate timer fire from ISR while firing
-Init - Variation is: Timer Server Fire After
-Init - There is no way for the test to know if it hits the case
-Init - rtems_timer_create - OK
-Support - rtems_timer_create - creating timer 1
-*** END OF TEST INTERRUPT CRITICAL SECTION 14 ***
+*** BEGIN OF TEST SPINTRCRITICAL 14 ***
+*** TEST VERSION: 6.0.0.929e49a54ab4d2d18c9fb8d03610614f63e25b8d
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_DEBUG RTEMS_POSIX_API RTEMS_SMP
+*** TEST TOOLS: 10.0.1 20200406 (RTEMS 6, RSB bec88a6dd856892c3e66e4598252ea07d7a0d762, Newlib ece49e4)
+A:SPINTRCRITICAL 14
+S:Platform:RTEMS
+S:Compiler:10.0.1 20200406 (RTEMS 6, RSB bec88a6dd856892c3e66e4598252ea07d7a0d762, Newlib ece49e4)
+S:Version:6.0.0.929e49a54ab4d2d18c9fb8d03610614f63e25b8d
+S:BSP:realview_pbx_a9_qemu
+S:RTEMS_DEBUG:1
+S:RTEMS_MULTIPROCESSING:0
+S:RTEMS_POSIX_API:1
+S:RTEMS_PROFILING:0
+S:RTEMS_SMP:1
+B:TimerServerFireAfterInterrupt
+P:0:0:UI1:spintrcritical13impl.h:131
+P:1:0:UI1:spintrcritical13impl.h:134
+P:2:0:UI1:spintrcritical13impl.h:137
+E:TimerServerFireAfterInterrupt:N:3:F:0:D:0.086586
+Z:SPINTRCRITICAL 14:C:1:N:3:F:0:D:0.087802
+Y:ReportHash:SHA256:d6f998056acf55838c88d67702cb4fee07f862f8d2eaa9638a606bd9da4d5c17
+
+*** END OF TEST SPINTRCRITICAL 14 ***
