diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-10-02 20:57:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-10-02 20:57:28 +0000 |
commit | 82478ffc7db2e3f07ee89b91e40647bb679912cd (patch) | |
tree | e7590fa0a880ab69cd97e8baef47a46fc3954f85 | |
parent | 2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-82478ffc7db2e3f07ee89b91e40647bb679912cd.tar.bz2 |
2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen01.c, sp09/screen12.c, sp25/system.h, sp25/task1.c,
sp28/init.c, sp39/init.c, sp41/init.c, spfatal01/testcase.h,
spfatal08/testcase.h: Change size_t to ssize_t on all Heap, Workspace
and Region calls. On 16-bit architectures, size_t can be 16-bits
which would limit sizes to 64K. Also address constants which
overflowed on 16-bit integer targets.
-rw-r--r-- | testsuites/sptests/ChangeLog | 9 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen01.c | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen12.c | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp25/system.h | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp25/task1.c | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp28/init.c | 19 | ||||
-rw-r--r-- | testsuites/sptests/sp39/init.c | 8 | ||||
-rw-r--r-- | testsuites/sptests/sp41/init.c | 8 | ||||
-rw-r--r-- | testsuites/sptests/spfatal01/testcase.h | 2 | ||||
-rw-r--r-- | testsuites/sptests/spfatal08/testcase.h | 2 |
10 files changed, 34 insertions, 22 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index e01a96abdc..f505c930d6 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,12 @@ +2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com> + + * sp09/screen01.c, sp09/screen12.c, sp25/system.h, sp25/task1.c, + sp28/init.c, sp39/init.c, sp41/init.c, spfatal01/testcase.h, + spfatal08/testcase.h: Change size_t to ssize_t on all Heap, Workspace + and Region calls. On 16-bit architectures, size_t can be 16-bits + which would limit sizes to 64K. Also address constants which + overflowed on 16-bit integer targets. + 2008-10-01 Joel Sherrill <joel.sherrill@oarcorp.com> * sp43/sp43.scn: Bump version to 4.9.99.0 diff --git a/testsuites/sptests/sp09/screen01.c b/testsuites/sptests/sp09/screen01.c index 3c0b864e6e..3de2811d8d 100644 --- a/testsuites/sptests/sp09/screen01.c +++ b/testsuites/sptests/sp09/screen01.c @@ -62,7 +62,7 @@ void Screen1() puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" ); status = rtems_task_get_note( - _RTEMS_tasks_Information.minimum_id + (3<<OBJECTS_API_START_BIT), + _RTEMS_tasks_Information.minimum_id + (3L<<OBJECTS_API_START_BIT), RTEMS_NOTEPAD_LAST, ¬epad_value ); diff --git a/testsuites/sptests/sp09/screen12.c b/testsuites/sptests/sp09/screen12.c index 069f578a76..000c4a5f16 100644 --- a/testsuites/sptests/sp09/screen12.c +++ b/testsuites/sptests/sp09/screen12.c @@ -26,7 +26,7 @@ void Screen12() uint32_t good_back_flag; uint32_t good_front_flag; uint32_t offset; - size_t segment_size; + ssize_t segment_size; rtems_status_code status; Heap_Information_block the_info; diff --git a/testsuites/sptests/sp25/system.h b/testsuites/sptests/sp25/system.h index 49d906b094..453168c3c7 100644 --- a/testsuites/sptests/sp25/system.h +++ b/testsuites/sptests/sp25/system.h @@ -44,7 +44,7 @@ TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */ TEST_EXTERN rtems_id Region_id[ 2 ]; /* array of region ids */ TEST_EXTERN rtems_name Region_name[ 2 ]; /* array of region names */ -TEST_EXTERN uint8_t Area_1[64000] CPU_STRUCTURE_ALIGNMENT; +TEST_EXTERN uint8_t Area_1[1024] CPU_STRUCTURE_ALIGNMENT; #define BASE_PRIORITY 140 diff --git a/testsuites/sptests/sp25/task1.c b/testsuites/sptests/sp25/task1.c index 86e9dcead0..accbb21a9b 100644 --- a/testsuites/sptests/sp25/task1.c +++ b/testsuites/sptests/sp25/task1.c @@ -33,7 +33,7 @@ rtems_task Task_1( void *address_8; rtems_id region_id; Heap_Information_block region_info; - size_t segment_size; + ssize_t segment_size; rtems_status_code status; /* Obtain the region id */ diff --git a/testsuites/sptests/sp28/init.c b/testsuites/sptests/sp28/init.c index 97cd13528f..89f8c2a5ad 100644 --- a/testsuites/sptests/sp28/init.c +++ b/testsuites/sptests/sp28/init.c @@ -35,7 +35,7 @@ volatile int nDeleted; rtems_task subtask (rtems_task_argument arg) { - int localvar = arg; + uintptr_t localvar = arg; int i; rtems_status_code sc; @@ -49,10 +49,11 @@ subtask (rtems_task_argument arg) while (localvar < 1000) { localvar++; rtems_task_wake_after (0); - taskvar = (void *)((int)taskvar + 1); + taskvar = (void *)((uintptr_t)taskvar + 1); rtems_task_wake_after (0); - if ((int)taskvar != localvar) { - printf ("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar); + if ((uintptr_t)taskvar != localvar) { + printf ("Task:%d taskvar:%d localvar:%d\n", + arg, (uintptr_t)taskvar, localvar); rtems_task_suspend (RTEMS_SELF); } } @@ -60,8 +61,9 @@ subtask (rtems_task_argument arg) nDeleted++; directive_failed( sc, "task variable delete" ); - if ((int)taskvar == localvar) { - printf("Task:%d deleted taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar); + if ((uintptr_t)taskvar == localvar) { + printf("Task:%d deleted taskvar:%d localvar:%d\n", + arg, (uintptr_t)taskvar, localvar); nRunning--; rtems_task_suspend (RTEMS_SELF); } @@ -72,8 +74,9 @@ subtask (rtems_task_argument arg) rtems_task_wake_after(0); if (nRunning <= 1) break; - if ((int)taskvar == localvar) { - printf("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar); + if ((uintptr_t)taskvar == localvar) { + printf("Task:%d taskvar:%d localvar:%d\n", + arg, (uintptr_t)taskvar, localvar); nRunning--; rtems_task_suspend(RTEMS_SELF); } diff --git a/testsuites/sptests/sp39/init.c b/testsuites/sptests/sp39/init.c index 16efd7fe01..570d6c3f42 100644 --- a/testsuites/sptests/sp39/init.c +++ b/testsuites/sptests/sp39/init.c @@ -70,7 +70,7 @@ rtems_task Init( rtems_event_set out; int i; int max; - int iterations = 0; + uint32_t iterations = 0; puts( "\n\n*** TEST 39 ***" ); @@ -116,7 +116,7 @@ rtems_task Init( max += 2; /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4 * 1000 * 30) + if ( ++iterations >= 4L * 1000L * 30L) break; } @@ -150,7 +150,7 @@ rtems_task Init( max += 2; /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4 * 1000 * 30) + if ( ++iterations >= 4L * 1000L * 30L) break; } @@ -183,7 +183,7 @@ rtems_task Init( max = 0; /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4 * 1000 * 30) + if ( ++iterations >= 4L * 1000L * 30L) break; } diff --git a/testsuites/sptests/sp41/init.c b/testsuites/sptests/sp41/init.c index b259be614f..db6c2c42a3 100644 --- a/testsuites/sptests/sp41/init.c +++ b/testsuites/sptests/sp41/init.c @@ -74,7 +74,7 @@ rtems_task Init( rtems_id timer; int i; int max; - int iterations = 0; + uint32_t iterations = 0; puts( "\n\n*** TEST 41 ***" ); @@ -119,7 +119,7 @@ rtems_task Init( max += 2; /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4 * 1000 * 30) + if ( ++iterations >= 4L * 1000L * 30L) break; } @@ -155,7 +155,7 @@ rtems_task Init( max += 2; /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4 * 1000 * 30) + if ( ++iterations >= 4L * 1000L * 30L) break; } @@ -188,7 +188,7 @@ rtems_task Init( max = 0; /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4 * 1000 * 30) + if ( ++iterations >= 4L * 1000L * 30L) break; } diff --git a/testsuites/sptests/spfatal01/testcase.h b/testsuites/sptests/spfatal01/testcase.h index 28fc5584d4..2c824fddce 100644 --- a/testsuites/sptests/spfatal01/testcase.h +++ b/testsuites/sptests/spfatal01/testcase.h @@ -12,7 +12,7 @@ #define CONFIGURE_INIT_TASK_STACK_SIZE 0 rtems_initialization_tasks_table Initialization_tasks[] = { { rtems_build_name('I', 'N', 'I', ' '), - 64 * 1024 * 1024, + 32UL * 1024UL, 1, RTEMS_DEFAULT_ATTRIBUTES, Init, diff --git a/testsuites/sptests/spfatal08/testcase.h b/testsuites/sptests/spfatal08/testcase.h index 8a2065c2ee..a44b72dd5a 100644 --- a/testsuites/sptests/spfatal08/testcase.h +++ b/testsuites/sptests/spfatal08/testcase.h @@ -29,7 +29,7 @@ rtems_initialization_tasks_table Initialization_tasks[] = { #define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_WORKSPACE_ALLOCATION -char Workspace[ 64 * 1024 ] CPU_STRUCTURE_ALIGNMENT; +char Workspace[ 256 ] CPU_STRUCTURE_ALIGNMENT; void force_error() { |