[rtems-central commit] spec: Fix _Terminate() validation

Sebastian Huber sebh at rtems.org
Fri Jan 14 15:32:41 UTC 2022


Module:    rtems-central
Branch:    master
Commit:    96247b3e3c8330d8297dcc4fccff25e9d106f4c2
Changeset: http://git.rtems.org/rtems-central/commit/?id=96247b3e3c8330d8297dcc4fccff25e9d106f4c2

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jan 14 08:35:49 2022 +0100

spec: Fix _Terminate() validation

Enable interrupts before the rtems_extension_delete() directives are
called.

---

 spec/score/interr/val/terminate.yml | 41 ++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/spec/score/interr/val/terminate.yml b/spec/score/interr/val/terminate.yml
index ab0b53a..6ad12ae 100644
--- a/spec/score/interr/val/terminate.yml
+++ b/spec/score/interr/val/terminate.yml
@@ -69,14 +69,30 @@ test-actions:
     }
 
     test_case_active = false;
-
-    sc = rtems_extension_delete( extension_ids[ 2 ] );
-    T_step_rsc_success( ${step}, sc );
-
-    sc = rtems_extension_delete( extension_ids[ 6 ] );
-    T_step_rsc_success( ${step}, sc );
   checks:
   - brief: |
+      Where the system was built with SMP support enabled, check that a
+      shutdown request was issued.
+    code: |
+      #if defined(RTEMS_SMP)
+      shutdown_ok = ( shutdown_ok && _ISR_Get_level() != 0 &&
+        _Per_CPU_Get_state( _Per_CPU_Get() ) == PER_CPU_STATE_SHUTDOWN );
+      _ISR_Set_level( 0 );
+      #endif
+      T_step_true( ${step}, shutdown_ok );
+    links:
+    - role: validation
+      uid: ../req/terminate-shutdown
+  - brief: |
+      Delete the dynamic extension sets.
+    code: |
+      sc = rtems_extension_delete( extension_ids[ 2 ] );
+      T_step_rsc_success( ${step}, sc );
+
+      sc = rtems_extension_delete( extension_ids[ 6 ] );
+      T_step_rsc_success( ${step}, sc );
+    links: []
+  - brief: |
       Check that the fatal extensions were invoked with the expected source.
     code: |
       T_step_eq_int(
@@ -168,19 +184,6 @@ test-actions:
     - role: validation
       uid: ../req/terminate-state
   - brief: |
-      Where the system was built with SMP support enabled, check that a
-      shutdown request was issued.
-    code: |
-      #if defined(RTEMS_SMP)
-      shutdown_ok = ( shutdown_ok && _ISR_Get_level() != 0 &&
-        _Per_CPU_Get_state( _Per_CPU_Get() ) == PER_CPU_STATE_SHUTDOWN );
-      _ISR_Set_level( 0 );
-      #endif
-      T_step_true( ${step}, shutdown_ok );
-    links:
-    - role: validation
-      uid: ../req/terminate-shutdown
-  - brief: |
       Check that the system was halted with the expected fatal source.
     code: |
       T_step_eq_int( ${step}, halt_source, RTEMS_FATAL_SOURCE_APPLICATION );



More information about the vc mailing list