From 29ff6c9ccbe8c93d032ba3bc015998a82888de67 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 14 Oct 2008 13:03:38 +0000 Subject: 2008-10-14 Joel Sherrill * sp09/screen07.c: Use INT_MAX as number of messages so always properly sized and no overflow on constant. * sp09/screen10.c: Delay so on targets with simulator idle clock tick driver this will work. * sp09/screen11.c, sp09/system.h: Move badly aligned objects to odd byte boundaries rather than two byte boundaries. * sp09/screen03.c, sp09/screen14.c: Skip tests which try to allocate more memory than size_t holds on m32c. --- testsuites/sptests/ChangeLog | 11 +++++++++++ testsuites/sptests/sp09/screen03.c | 13 ++++++++++++- testsuites/sptests/sp09/screen07.c | 2 +- testsuites/sptests/sp09/screen10.c | 2 ++ testsuites/sptests/sp09/screen11.c | 4 ++-- testsuites/sptests/sp09/screen14.c | 25 +++++++++++++++++-------- testsuites/sptests/sp09/system.h | 4 ++-- 7 files changed, 47 insertions(+), 14 deletions(-) (limited to 'testsuites') diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index f2dc7041e1..fb7cfca87a 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,14 @@ +2008-10-14 Joel Sherrill + + * sp09/screen07.c: Use INT_MAX as number of messages so always + properly sized and no overflow on constant. + * sp09/screen10.c: Delay so on targets with simulator idle clock + tick driver this will work. + * sp09/screen11.c, sp09/system.h: Move badly aligned objects to odd + byte boundaries rather than two byte boundaries. + * sp09/screen03.c, sp09/screen14.c: Skip tests which try to + allocate more memory than size_t holds on m32c. + 2008-10-02 Joel Sherrill * sp09/screen01.c, sp09/screen12.c, sp25/system.h, sp25/task1.c, diff --git a/testsuites/sptests/sp09/screen03.c b/testsuites/sptests/sp09/screen03.c index 4bc8a5b392..7381bd6cb6 100644 --- a/testsuites/sptests/sp09/screen03.c +++ b/testsuites/sptests/sp09/screen03.c @@ -22,6 +22,7 @@ void Screen3() { rtems_name task_name; rtems_status_code status; + bool skipUnsatisfied; task_name = 1; status = rtems_task_create( @@ -42,9 +43,19 @@ void Screen3() /* * If the bsp provides its own stack allocator, then * skip the test that tries to allocate a stack that is too big. + * + * If on the m32c, we can't even ask for enough memory to trip this + * error. */ - if (rtems_configuration_get_stack_allocate_hook()) { + skipUnsatisfied = false; + if (rtems_configuration_get_stack_allocate_hook()) + skipUnsatisfied = true; + #if defined(__m32c__) + skipUnsatisfied = true; + #endif + + if ( skipUnsatisfied ) { puts( "TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED -- SKIPPED" ); diff --git a/testsuites/sptests/sp09/screen07.c b/testsuites/sptests/sp09/screen07.c index 1e2c2ec31c..4d3c26ff27 100644 --- a/testsuites/sptests/sp09/screen07.c +++ b/testsuites/sptests/sp09/screen07.c @@ -73,7 +73,7 @@ void Screen7() /* not enough memory for messages */ status = rtems_message_queue_create( Queue_name[ 1 ], - 1000000, /* 1 million messages should do it */ + INT_MAX, MESSAGE_SIZE, RTEMS_DEFAULT_ATTRIBUTES, &Queue_id[ 1 ] diff --git a/testsuites/sptests/sp09/screen10.c b/testsuites/sptests/sp09/screen10.c index 6dd4029feb..7fe865621d 100644 --- a/testsuites/sptests/sp09/screen10.c +++ b/testsuites/sptests/sp09/screen10.c @@ -106,6 +106,8 @@ void Screen10() status, "rtems_rate_monotonic_period waiting for timeout" ); + + rtems_task_wake_after( 1 ); } puts( "TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_TIMEOUT" diff --git a/testsuites/sptests/sp09/screen11.c b/testsuites/sptests/sp09/screen11.c index f9cbd5bbd3..3ddd87471e 100644 --- a/testsuites/sptests/sp09/screen11.c +++ b/testsuites/sptests/sp09/screen11.c @@ -44,7 +44,7 @@ void Screen11() Partition_name[ 1 ], Partition_good_area, 0, - 80, + 71, RTEMS_DEFAULT_ATTRIBUTES, &Junk_id ); @@ -135,7 +135,7 @@ void Screen11() Partition_name[ 1 ], Partition_good_area, 128, - 34, + 35, RTEMS_DEFAULT_ATTRIBUTES, &Junk_id ); diff --git a/testsuites/sptests/sp09/screen14.c b/testsuites/sptests/sp09/screen14.c index 534316eb7a..ef8b006f6c 100644 --- a/testsuites/sptests/sp09/screen14.c +++ b/testsuites/sptests/sp09/screen14.c @@ -23,6 +23,7 @@ void Screen14() rtems_status_code status; rtems_time_of_day time; rtems_timer_information timer_info; + bool skipUnsatisfied; status = rtems_timer_create( 0, &Junk_id ); fatal_directive_status( @@ -187,17 +188,25 @@ void Screen14() ); puts( "TA1 - rtems_timer_initiate_server - RTEMS_INVALID_PRIORITY" ); - status = rtems_timer_initiate_server( + skipUnsatisfied = false; + #if defined(__m32c__) + skipUnsatisfied = true; + #endif + if (skipUnsatisfied) { + puts( "TA1 - rtems_timer_initiate_server - RTEMS_UNSATISFIED -- SKIPPED" ); + } else { + status = rtems_timer_initiate_server( RTEMS_TIMER_SERVER_DEFAULT_PRIORITY, 0x10000000, 0 - ); - fatal_directive_status( - status, - RTEMS_UNSATISFIED, - "rtems_timer_initiate_server too much stack " - ); - puts( "TA1 - rtems_timer_initiate_server - RTEMS_UNSATISFIED" ); + ); + fatal_directive_status( + status, + RTEMS_UNSATISFIED, + "rtems_timer_initiate_server too much stack " + ); + puts( "TA1 - rtems_timer_initiate_server - RTEMS_UNSATISFIED" ); + } status = rtems_timer_initiate_server( RTEMS_TIMER_SERVER_DEFAULT_PRIORITY, 0, 0 ); diff --git a/testsuites/sptests/sp09/system.h b/testsuites/sptests/sp09/system.h index 2b043d0535..dd8c73c473 100644 --- a/testsuites/sptests/sp09/system.h +++ b/testsuites/sptests/sp09/system.h @@ -131,10 +131,10 @@ TEST_EXTERN rtems_id Junk_id; /* id used to return errors */ #define External_port_area (void *) 0x00002000 TEST_EXTERN uint8_t Partition_good_area[256] CPU_STRUCTURE_ALIGNMENT; -#define Partition_bad_area (void *) 0x00000006 +#define Partition_bad_area (void *) 0x00000005 TEST_EXTERN uint32_t Region_good_area[4096] CPU_STRUCTURE_ALIGNMENT; -#define Region_bad_area (void *) 0x00000006 +#define Region_bad_area (void *) 0x00000005 #define REGION_START_OFFSET 1024 #define REGION_LENGTH 512 -- cgit v1.2.3