[rtems commit] ada/sp09: Fix region test cases

Sebastian Huber sebh at rtems.org
Mon Dec 4 09:54:35 UTC 2017


Module:    rtems
Branch:    master
Commit:    535d0183d89478316100ca3fd89443bd8e121064
Changeset: http://git.rtems.org/rtems/commit/?id=535d0183d89478316100ca3fd89443bd8e121064

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Dec  4 10:51:33 2017 +0100

ada/sp09: Fix region test cases

---

 testsuites/ada/sptests/sp09/sptest.adb | 29 +++++++++++++++--------------
 testsuites/ada/sptests/sp09/sptest.ads |  4 ++--
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/testsuites/ada/sptests/sp09/sptest.adb b/testsuites/ada/sptests/sp09/sptest.adb
index e064ebe..8390ab4 100644
--- a/testsuites/ada/sptests/sp09/sptest.adb
+++ b/testsuites/ada/sptests/sp09/sptest.adb
@@ -2475,49 +2475,50 @@ package body SPTEST is
 
       RTEMS.REGION.EXTEND(
          SPTEST.REGION_ID( 1 ),
-         SPTEST.REGION_BAD_AREA'ADDRESS,
-         128,
+         SPTEST.REGION_GOOD_AREA(
+            SPTEST.REGION_START_OFFSET - 2 * SPTEST.REGION_LENGTH )'ADDRESS,
+         SPTEST.REGION_LENGTH,
          STATUS
       );
       TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
          STATUS,
-         RTEMS.NOT_IMPLEMENTED,
-         "REGION_EXTEND WITH NOT_IMPLEMENTED"
+         RTEMS.SUCCESSFUL,
+         "REGION_EXTEND"
       );
       TEXT_IO.PUT_LINE(
-         "TA1 - region_extend - non-contiguous lower - NOT_IMPLEMENTED"
+         "TA1 - region_extend - non-contiguous lower - SUCCESSFUL"
       );
 
       RTEMS.REGION.EXTEND(
          SPTEST.REGION_ID( 1 ),
          SPTEST.REGION_GOOD_AREA( 
             SPTEST.REGION_START_OFFSET - SPTEST.REGION_LENGTH )'ADDRESS,
-         128,
+         SPTEST.REGION_LENGTH,
          STATUS
       );
       TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
          STATUS,
-         RTEMS.NOT_IMPLEMENTED,
-         "REGION_EXTEND WITH NOT_IMPLEMENTED"
+         RTEMS.SUCCESSFUL,
+         "REGION_EXTEND"
       );
       TEXT_IO.PUT_LINE(
-         "TA1 - region_extend - contiguous lower - NOT_IMPLEMENTED"
+         "TA1 - region_extend - contiguous lower - SUCCESSFUL"
       );
 
       RTEMS.REGION.EXTEND(
          SPTEST.REGION_ID( 1 ),
          SPTEST.REGION_GOOD_AREA( 
-            SPTEST.REGION_START_OFFSET + SPTEST.REGION_LENGTH + 16 )'ADDRESS,
-         128,
+            SPTEST.REGION_START_OFFSET + 2 * SPTEST.REGION_LENGTH )'ADDRESS,
+         SPTEST.REGION_LENGTH,
          STATUS
       );
       TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
          STATUS,
-         RTEMS.NOT_IMPLEMENTED,
-         "REGION_EXTEND WITH NOT_IMPLEMENTED"
+         RTEMS.SUCCESSFUL,
+         "REGION_EXTEND"
       );
       TEXT_IO.PUT_LINE(
-         "TA1 - region_extend - non-contiguous higher - NOT_IMPLEMENTED"
+         "TA1 - region_extend - non-contiguous higher - SUCCESSFUL"
       );
 
    end SCREEN_12;
diff --git a/testsuites/ada/sptests/sp09/sptest.ads b/testsuites/ada/sptests/sp09/sptest.ads
index 9fdad75..d1bef16 100644
--- a/testsuites/ada/sptests/sp09/sptest.ads
+++ b/testsuites/ada/sptests/sp09/sptest.ads
@@ -165,7 +165,7 @@ package SPTEST is
       of RTEMS.UNSIGNED32;
    for REGION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
 
-   REGION_START_OFFSET : constant RTEMS.UNSIGNED32 := 1024;
+   REGION_START_OFFSET : constant RTEMS.UNSIGNED32 := 2048;
    REGION_LENGTH       : constant RTEMS.UNSIGNED32 := 512;
 
 --
@@ -174,7 +174,7 @@ package SPTEST is
 -- 
 
    REGION_BAD_AREA_ADDRESS : constant System.Address :=
-       System.Storage_Elements.To_Address(16#00000006#);
+       System.Storage_Elements.To_Address(16#00000000#);
 
    REGION_BAD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
       of RTEMS.UNSIGNED8;




More information about the vc mailing list