summaryrefslogtreecommitdiffstats
path: root/testsuites/samples/unlimited/test1.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-01-03 20:51:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-01-03 20:51:34 +0000
commit3d9f688e242fb73c10b2e945d2a4302420f35aa9 (patch)
treea8e470bad67db71de2168b48a6fcddedf1934af0 /testsuites/samples/unlimited/test1.c
parent6bd96fc7abe950c9547c6e552c3b5067bedaf7c4 (diff)
downloadrtems-3d9f688e242fb73c10b2e945d2a4302420f35aa9.tar.bz2
2002-10-31 Chris Johns <ccj@acm.org>
* unlimited/test1.c: PR296. Only fails if more tasks than allowed can be created. * unlimited/system.h: PR296. Reference the number of tasks in the configuration table rather than a hardcoded number.
Diffstat (limited to '')
-rw-r--r--testsuites/samples/unlimited/test1.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c
index 5b13c301de..a441b9953c 100644
--- a/testsuites/samples/unlimited/test1.c
+++ b/testsuites/samples/unlimited/test1.c
@@ -27,6 +27,7 @@ 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';
@@ -45,7 +46,8 @@ 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;
@@ -86,7 +88,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 != (TASK_ALLOCATION_SIZE - 1)) {
+ if (task_count != expected_count) {
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);
@@ -99,8 +101,3 @@ void test1()
printf( " TEST1 : completed\n" );
}
-
-
-
-
-