forked from Imagelibrary/rtems
2009-10-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp07/init.c, sp07/sp07.scn, sp09/init.c, sp09/screen01.c, sp09/sp09.scn, sp28/init.c, sp62/init.c, sp62/sp62.scn, sp64/init.c, sp64/sp64.scn: Add more test cases highlighted on SPARC at -O2, x86 at -Os and m68k at -Os. Fix typos.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-10-04 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* sp07/init.c, sp07/sp07.scn, sp09/init.c, sp09/screen01.c,
|
||||
sp09/sp09.scn, sp28/init.c, sp62/init.c, sp62/sp62.scn, sp64/init.c,
|
||||
sp64/sp64.scn: Add more test cases highlighted on SPARC at -O2, x86
|
||||
at -Os and m68k at -Os. Fix typos.
|
||||
|
||||
2009-10-02 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* sp54/init.c: Use rtems_build_id to make building Objects_Id
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is a user initialization task and has the responsibility for creating
|
||||
* and starting the tasks that make up the test. If the time of day
|
||||
* clock is required for the test, it should also be set to a known
|
||||
* value by this function.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -171,9 +159,14 @@ rtems_task Init(
|
||||
|
||||
buffered_io_flush();
|
||||
|
||||
status = rtems_task_set_note( rtems_task_self(), RTEMS_NOTEPAD_4, 32 );
|
||||
directive_failed( status, "task_set_node of Self id" );
|
||||
printf( "INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
|
||||
status = rtems_task_set_note( RTEMS_SELF, RTEMS_NOTEPAD_4, 32 );
|
||||
directive_failed( status, "task_set_node of Self" );
|
||||
printf( "INIT - rtems_task_set_note - set my RTEMS_NOTEPAD_4 " );
|
||||
directive_failed( status, "task_set_node of Self 0" );
|
||||
printf( "INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
|
||||
status = rtems_task_set_note( Task_id[ 1 ], RTEMS_NOTEPAD_8, 4 );
|
||||
|
||||
@@ -18,7 +18,8 @@ TASK_START - TA2 - started
|
||||
TASK_START - TA3 - started
|
||||
TASK_START - TA4 - started
|
||||
TASK_RESTART - TA3 - restarted
|
||||
INIT - rtems_task_set_note - set my RTEMS_NOTEPAD_4 to TA1's priority: 04
|
||||
INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 to TA1's priority: 04
|
||||
INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 to TA1's priority: 04
|
||||
INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 to TA1's priority: 04
|
||||
INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 to TA2's priority: 04
|
||||
<pause>
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is a user initialization task and has the responsibility for creating
|
||||
* and starting the tasks that make up the test. If the time of day
|
||||
* clock is required for the test, it should also be set to a known
|
||||
* value by this function.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -60,6 +48,7 @@ rtems_task Init(
|
||||
|
||||
Period_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
|
||||
|
||||
/* priority of 0 error */
|
||||
status = rtems_task_create(
|
||||
Task_name[1],
|
||||
0,
|
||||
@@ -73,7 +62,25 @@ rtems_task Init(
|
||||
RTEMS_INVALID_PRIORITY,
|
||||
"rtems_task_create with illegal priority"
|
||||
);
|
||||
puts( "INIT - rtems_task_create - RTEMS_INVALID_PRIORITY" );
|
||||
puts( "INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY" );
|
||||
|
||||
/* priority > 255 error */
|
||||
status = rtems_task_create(
|
||||
Task_name[1],
|
||||
257,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_INVALID_PRIORITY,
|
||||
"rtems_task_create with illegal priority"
|
||||
);
|
||||
puts(
|
||||
"INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY"
|
||||
);
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
*
|
||||
* This routine generates error screen 1 for test 9.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -26,6 +22,16 @@ void Screen1()
|
||||
rtems_task_priority previous_priority;
|
||||
rtems_status_code status;
|
||||
|
||||
/* bad Id */
|
||||
status = rtems_task_is_suspended( 100 );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_INVALID_ID,
|
||||
"rtems_task_set_priority with illegal id"
|
||||
);
|
||||
puts( "TA1 - rtems_task_is_suspended - RTEMS_INVALID_ID" );
|
||||
|
||||
/* bad Id */
|
||||
status = rtems_task_delete( 100 );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
*** TEST 9 ***
|
||||
INIT - rtems_task_create - RTEMS_INVALID_PRIORITY
|
||||
INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY
|
||||
INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY
|
||||
INIT - rtems_task_restart - RTEMS_INCORRECT_STATE
|
||||
TA1 - rtems_task_is_suspended - RTEMS_INVALID_ID
|
||||
TA1 - rtems_task_delete - RTEMS_INVALID_ID
|
||||
TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS
|
||||
TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER
|
||||
|
||||
@@ -119,7 +119,7 @@ void test_errors(void)
|
||||
* task variable add error status codes
|
||||
*/
|
||||
puts( "task variable add - NULL pointer - RTEMS_INVALID_ADDRESS" );
|
||||
sc = rtems_task_variable_get(RTEMS_SELF, NULL, NULL );
|
||||
sc = rtems_task_variable_add(RTEMS_SELF, NULL, NULL );
|
||||
fatal_directive_status( sc, RTEMS_INVALID_ADDRESS, "add NULL pointer" );
|
||||
|
||||
/*
|
||||
|
||||
@@ -50,6 +50,7 @@ rtems_task Init(
|
||||
rtems_status_code sc;
|
||||
void *segment_address_1;
|
||||
intptr_t old_size;
|
||||
size_t size;
|
||||
|
||||
puts( "\n\n*** TEST 62 ***" );
|
||||
|
||||
@@ -104,10 +105,34 @@ rtems_task Init(
|
||||
|
||||
if ( case_hit ) {
|
||||
puts( "Init - successfully resized and unblocked a task" );
|
||||
puts( "*** END OF TEST 62 ***" );
|
||||
} else
|
||||
} else {
|
||||
puts( "Init - failed to resize and unblock a task" );
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now resize and take all of memory so there is no need to
|
||||
* process any blocked tasks waiting for memory.
|
||||
*/
|
||||
|
||||
size = sizeof(Region_Memory);
|
||||
while (1) {
|
||||
sc = rtems_region_resize_segment(
|
||||
Region, segment_address_1, size, &old_size);
|
||||
if ( sc == RTEMS_UNSATISFIED ) {
|
||||
size --;
|
||||
if ( size )
|
||||
continue;
|
||||
}
|
||||
directive_failed( sc, "rtems_region_resize_segment" );
|
||||
if ( sc == RTEMS_SUCCESSFUL )
|
||||
break;
|
||||
|
||||
}
|
||||
if ( sc == RTEMS_SUCCESSFUL && size != 0 )
|
||||
puts( "Init - resized to all of available memory" );
|
||||
|
||||
puts( "*** END OF TEST 62 ***" );
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,4 +8,5 @@ Blocker - rtems_region_get_segment - OK
|
||||
Init - sleep 1 second for Blocker to run again - OK
|
||||
Blocker - Got memory after resize
|
||||
Init - successfully resized and unblocked a task
|
||||
Init - resized to all of available memory
|
||||
*** END OF TEST 62 ***
|
||||
|
||||
@@ -144,7 +144,7 @@ rtems_task Init(
|
||||
assert( info.Free.number == start.Free.number );
|
||||
#endif
|
||||
|
||||
puts( "*** END OF TEST 63 ***" );
|
||||
puts( "*** END OF TEST 64 ***" );
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@ Allocate one region -- so second auto extends
|
||||
Init - rtems_workspace_get_information - OK
|
||||
Init - rtems_region_create - auto-extend - RTEMS_UNSATISFIED
|
||||
Init - rtems_region_delete - OK
|
||||
*** END OF TEST 63 ***
|
||||
*** END OF TEST 64 ***
|
||||
|
||||
Reference in New Issue
Block a user