From 7ab11c06b41c17dedd1f1255d3fee9112841b878 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 3 Jan 2003 22:55:54 +0000 Subject: 2003-01-03 Joel Sherrill * unlimited/system.h, unlimited/test1.c: Backed off previous modification as it does not compile. --- c/src/tests/samples/ChangeLog | 5 +++++ c/src/tests/samples/unlimited/system.h | 4 +--- c/src/tests/samples/unlimited/test1.c | 11 +++++++---- testsuites/samples/ChangeLog | 5 +++++ testsuites/samples/unlimited/system.h | 4 +--- testsuites/samples/unlimited/test1.c | 11 +++++++---- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/c/src/tests/samples/ChangeLog b/c/src/tests/samples/ChangeLog index 48d52d8fe4..b26000131f 100644 --- a/c/src/tests/samples/ChangeLog +++ b/c/src/tests/samples/ChangeLog @@ -1,3 +1,8 @@ +2003-01-03 Joel Sherrill + + * unlimited/system.h, unlimited/test1.c: Backed off previous + modification as it does not compile. + 2002-10-31 Chris Johns * unlimited/test1.c: PR296. Only fails if more tasks than allowed diff --git a/c/src/tests/samples/unlimited/system.h b/c/src/tests/samples/unlimited/system.h index f689847870..46e3991a65 100644 --- a/c/src/tests/samples/unlimited/system.h +++ b/c/src/tests/samples/unlimited/system.h @@ -46,9 +46,7 @@ void test3(); #define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define TASK_ALLOCATION_SIZE \ - (rtems_configuration_get_rtems_api_configuration()->maximum_tasks & \ - ~RTEMS_UNLIMITED_OBJECTS) +#define TASK_ALLOCATION_SIZE (5) #define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE) #define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE) diff --git a/c/src/tests/samples/unlimited/test1.c b/c/src/tests/samples/unlimited/test1.c index a441b9953c..5b13c301de 100644 --- a/c/src/tests/samples/unlimited/test1.c +++ b/c/src/tests/samples/unlimited/test1.c @@ -27,7 +27,6 @@ void test1() boolean auto_extend; rtems_status_code result; rtems_unsigned32 task_count = 0; - rtems_unsigned32 expected_count; Objects_Information *the_information; char c1 = 'a'; @@ -46,8 +45,7 @@ void test1() _Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS]; auto_extend = the_information->auto_extend; the_information->auto_extend = FALSE; - expected_count = the_information->inactive; - + while (task_count < MAX_TASKS) { rtems_name name; @@ -88,7 +86,7 @@ void test1() if (task_count >= MAX_TASKS) printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" ); - if (task_count != expected_count) { + if (task_count != (TASK_ALLOCATION_SIZE - 1)) { printf( " FAIL1 : the number of tasks does not equal the expected size -\n" " task created = %i, required number = %i\n", task_count, TASK_ALLOCATION_SIZE); @@ -101,3 +99,8 @@ void test1() printf( " TEST1 : completed\n" ); } + + + + + diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog index 48d52d8fe4..b26000131f 100644 --- a/testsuites/samples/ChangeLog +++ b/testsuites/samples/ChangeLog @@ -1,3 +1,8 @@ +2003-01-03 Joel Sherrill + + * unlimited/system.h, unlimited/test1.c: Backed off previous + modification as it does not compile. + 2002-10-31 Chris Johns * unlimited/test1.c: PR296. Only fails if more tasks than allowed diff --git a/testsuites/samples/unlimited/system.h b/testsuites/samples/unlimited/system.h index f689847870..46e3991a65 100644 --- a/testsuites/samples/unlimited/system.h +++ b/testsuites/samples/unlimited/system.h @@ -46,9 +46,7 @@ void test3(); #define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define TASK_ALLOCATION_SIZE \ - (rtems_configuration_get_rtems_api_configuration()->maximum_tasks & \ - ~RTEMS_UNLIMITED_OBJECTS) +#define TASK_ALLOCATION_SIZE (5) #define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE) #define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE) diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c index a441b9953c..5b13c301de 100644 --- a/testsuites/samples/unlimited/test1.c +++ b/testsuites/samples/unlimited/test1.c @@ -27,7 +27,6 @@ void test1() boolean auto_extend; rtems_status_code result; rtems_unsigned32 task_count = 0; - rtems_unsigned32 expected_count; Objects_Information *the_information; char c1 = 'a'; @@ -46,8 +45,7 @@ void test1() _Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS]; auto_extend = the_information->auto_extend; the_information->auto_extend = FALSE; - expected_count = the_information->inactive; - + while (task_count < MAX_TASKS) { rtems_name name; @@ -88,7 +86,7 @@ void test1() if (task_count >= MAX_TASKS) printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" ); - if (task_count != expected_count) { + if (task_count != (TASK_ALLOCATION_SIZE - 1)) { printf( " FAIL1 : the number of tasks does not equal the expected size -\n" " task created = %i, required number = %i\n", task_count, TASK_ALLOCATION_SIZE); @@ -101,3 +99,8 @@ void test1() printf( " TEST1 : completed\n" ); } + + + + + -- cgit v1.2.3