summaryrefslogtreecommitdiffstats
path: root/testsuites/ada/sptests/sp01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-01 22:37:06 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-04 14:15:18 +0100
commitfd5471b6b7761a03e87a11808b57dd123ae49e31 (patch)
tree0d268d4fd2db978715987ffd0d5498967deacd18 /testsuites/ada/sptests/sp01
parentscore: Use self-contained API mutex (diff)
downloadrtems-fd5471b6b7761a03e87a11808b57dd123ae49e31.tar.bz2
ada: Check C and POSIX types
Update #3256.
Diffstat (limited to 'testsuites/ada/sptests/sp01')
-rw-r--r--testsuites/ada/sptests/sp01/sp01.adb125
-rw-r--r--testsuites/ada/sptests/sp01/sptest.adb3
2 files changed, 125 insertions, 3 deletions
diff --git a/testsuites/ada/sptests/sp01/sp01.adb b/testsuites/ada/sptests/sp01/sp01.adb
index 656a6ff009..34dd39e8ca 100644
--- a/testsuites/ada/sptests/sp01/sp01.adb
+++ b/testsuites/ada/sptests/sp01/sp01.adb
@@ -21,12 +21,137 @@ with RTEMS;
with RTEMS.TASKS;
with SPTEST;
with TEST_SUPPORT;
+with TEXT_IO;
+with System.OS_Interface;
procedure SP01 is
INIT_ID : RTEMS.ID;
STATUS : RTEMS.STATUS_CODES;
+ obj_clockid_t : System.OS_Interface.clockid_t;
+ pragma Warnings (Off, obj_clockid_t);
+ obj_pid_t : System.OS_Interface.pid_t;
+ pragma Warnings (Off, obj_pid_t);
+ obj_pthread_attr_t : System.OS_Interface.pthread_attr_t;
+ pragma Warnings (Off, obj_pthread_attr_t);
+ obj_pthread_condattr_t : System.OS_Interface.pthread_condattr_t;
+ pragma Warnings (Off, obj_pthread_condattr_t);
+ obj_pthread_cond_t : System.OS_Interface.pthread_cond_t;
+ pragma Warnings (Off, obj_pthread_cond_t);
+ obj_pthread_key_t : System.OS_Interface.pthread_key_t;
+ pragma Warnings (Off, obj_pthread_key_t);
+ obj_pthread_mutexattr_t : System.OS_Interface.pthread_mutexattr_t;
+ pragma Warnings (Off, obj_pthread_mutexattr_t);
+ obj_pthread_mutex_t : System.OS_Interface.pthread_mutex_t;
+ pragma Warnings (Off, obj_pthread_mutex_t);
+ obj_pthread_rwlockattr_t : System.OS_Interface.pthread_rwlockattr_t;
+ pragma Warnings (Off, obj_pthread_rwlockattr_t);
+ obj_pthread_rwlock_t : System.OS_Interface.pthread_rwlock_t;
+ pragma Warnings (Off, obj_pthread_rwlock_t);
+ obj_pthread_t : System.OS_Interface.pthread_t;
+ pragma Warnings (Off, obj_pthread_t);
+ obj_rtems_id : System.OS_Interface.rtems_id;
+ pragma Warnings (Off, obj_rtems_id);
+ obj_sigset_t : System.OS_Interface.sigset_t;
+ pragma Warnings (Off, obj_sigset_t);
+ obj_stack_t : System.OS_Interface.stack_t;
+ pragma Warnings (Off, obj_stack_t);
+ obj_struct_sched_param : System.OS_Interface.struct_sched_param;
+ pragma Warnings (Off, obj_struct_sched_param);
+ obj_struct_sigaction : System.OS_Interface.struct_sigaction;
+ pragma Warnings (Off, obj_struct_sigaction);
+ obj_timespec : System.OS_Interface.timespec;
+ pragma Warnings (Off, obj_timespec);
begin
+ TEXT_IO.NEW_LINE( 2 );
+ TEST_SUPPORT.ADA_TEST_BEGIN;
+
+ TEST_SUPPORT.Check_Type(
+ 0,
+ obj_clockid_t'Size,
+ obj_clockid_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 1,
+ obj_pid_t'Size,
+ obj_pid_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 2,
+ obj_pthread_attr_t'Size,
+ obj_pthread_attr_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 3,
+ obj_pthread_condattr_t'Size,
+ obj_pthread_condattr_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 4,
+ obj_pthread_cond_t'Size,
+ obj_pthread_cond_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 5,
+ obj_pthread_key_t'Size,
+ obj_pthread_key_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 6,
+ obj_pthread_mutexattr_t'Size,
+ obj_pthread_mutexattr_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 7,
+ obj_pthread_mutex_t'Size,
+ obj_pthread_mutex_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 8,
+ obj_pthread_rwlockattr_t'Size,
+ obj_pthread_rwlockattr_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 9,
+ obj_pthread_rwlock_t'Size,
+ obj_pthread_rwlock_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 10,
+ obj_pthread_t'Size,
+ obj_pthread_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 11,
+ obj_rtems_id'Size,
+ obj_rtems_id'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 12,
+ obj_sigset_t'Size,
+ obj_sigset_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 13,
+ obj_stack_t'Size,
+ obj_stack_t'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 14,
+ obj_struct_sched_param'Size,
+ obj_struct_sched_param'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 15,
+ obj_struct_sigaction'Size,
+ obj_struct_sigaction'Alignment
+ );
+ TEST_SUPPORT.Check_Type(
+ 16,
+ obj_timespec'Size,
+ obj_timespec'Alignment
+ );
+
RTEMS.TASKS.CREATE(
RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
1,
diff --git a/testsuites/ada/sptests/sp01/sptest.adb b/testsuites/ada/sptests/sp01/sptest.adb
index eb7497bd9d..9ba4207205 100644
--- a/testsuites/ada/sptests/sp01/sptest.adb
+++ b/testsuites/ada/sptests/sp01/sptest.adb
@@ -37,9 +37,6 @@ package body SPTEST is
STATUS : RTEMS.STATUS_CODES;
begin
- TEXT_IO.NEW_LINE( 2 );
- TEST_SUPPORT.ADA_TEST_BEGIN;
-
TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
RTEMS.CLOCK.SET( TIME, STATUS );