[rtems commit] sptests/splinkersets01: Fix 64-bit targets

Sebastian Huber sebh at rtems.org
Fri Nov 24 14:13:24 UTC 2017


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Nov 24 15:12:20 2017 +0100

sptests/splinkersets01: Fix 64-bit targets

Update #3082.

---

 testsuites/sptests/splinkersets01/init.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/testsuites/sptests/splinkersets01/init.c b/testsuites/sptests/splinkersets01/init.c
index a567cb9..ab0ce77 100644
--- a/testsuites/sptests/splinkersets01/init.c
+++ b/testsuites/sptests/splinkersets01/init.c
@@ -125,8 +125,14 @@ static void test(void)
 
   rtems_test_assert((size_t) (e - b) == RTEMS_ARRAY_SIZE(a));
   rtems_test_assert((size_t) (ce - cb) == RTEMS_ARRAY_SIZE(ca));
-  rtems_test_assert(RTEMS_LINKER_SET_SIZE(test_rw) == sizeof(a));
-  rtems_test_assert(RTEMS_LINKER_SET_SIZE(test_ro) == sizeof(ca));
+  rtems_test_assert(
+    RTEMS_LINKER_SET_SIZE(test_rw)
+      == sizeof(const int *) * RTEMS_ARRAY_SIZE(a)
+  );
+  rtems_test_assert(
+    RTEMS_LINKER_SET_SIZE(test_ro)
+      == sizeof(const int *) * RTEMS_ARRAY_SIZE(ca)
+  );
   rtems_test_assert(
     RTEMS_LINKER_SET_ITEM_COUNT(test_rw) == RTEMS_ARRAY_SIZE(a)
   );
@@ -139,8 +145,14 @@ static void test(void)
   rtems_test_assert((size_t) (ei - bi) == RTEMS_ARRAY_SIZE(a));
   rtems_test_assert((size_t) (cei - cbi) == RTEMS_ARRAY_SIZE(ca));
   rtems_test_assert((size_t) (se - sb) == 3);
-  rtems_test_assert(RTEMS_LINKER_SET_SIZE(test_rw_i) == sizeof(a));
-  rtems_test_assert(RTEMS_LINKER_SET_SIZE(test_ro_i) == sizeof(ca));
+  rtems_test_assert(
+    RTEMS_LINKER_SET_SIZE(test_rw_i)
+      == sizeof(const int *) * RTEMS_ARRAY_SIZE(a)
+  );
+  rtems_test_assert(
+    RTEMS_LINKER_SET_SIZE(test_ro_i)
+      == sizeof(const int *) * RTEMS_ARRAY_SIZE(ca)
+  );
   rtems_test_assert(RTEMS_LINKER_SET_SIZE(test_ro_s) == 3 * sizeof(int *));
   rtems_test_assert(
     RTEMS_LINKER_SET_ITEM_COUNT(test_rw_i) == RTEMS_ARRAY_SIZE(a)



More information about the vc mailing list