diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-05-11 17:39:37 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-05-11 17:39:37 +0000 |
commit | ac7d5ef06a6d6e8d84abbd1f0b82162725f98326 (patch) | |
tree | 9304cf759a73f2a1c6fd3191948f00e870af3787 /c/src/tests/sptests/sp09/screen01.c | |
download | rtems-ac7d5ef06a6d6e8d84abbd1f0b82162725f98326.tar.bz2 |
Initial revision
Diffstat (limited to 'c/src/tests/sptests/sp09/screen01.c')
-rw-r--r-- | c/src/tests/sptests/sp09/screen01.c | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/c/src/tests/sptests/sp09/screen01.c b/c/src/tests/sptests/sp09/screen01.c new file mode 100644 index 0000000000..39012f5051 --- /dev/null +++ b/c/src/tests/sptests/sp09/screen01.c @@ -0,0 +1,168 @@ +/* Screen1 + * + * This routine generates error screen 1 for test 9. + * + * Input parameters: NONE + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +void Screen1() +{ + rtems_unsigned32 notepad_value; + rtems_id self_id; + rtems_task_priority previous_priority; + rtems_status_code status; + + status = rtems_task_delete( 100 ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_delete with illegal id" + ); + puts( "TA1 - rtems_task_delete - RTEMS_INVALID_ID" ); + + status = rtems_task_get_note( RTEMS_SELF, 100, ¬epad_value ); + fatal_directive_status( + status, + RTEMS_INVALID_NUMBER, + "rtems_task_get_note with illegal notepad" + ); + puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER" ); + + status = rtems_task_get_note( 100, RTEMS_NOTEPAD_LAST, ¬epad_value ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_get_note with illegal id" + ); + puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" ); + + status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &self_id ); + directive_failed( status, "rtems_task_ident of self" ); + + if ( self_id != Task_id[ 1 ] ) { + puts( "ERROR - rtems_task_ident - incorrect ID returned!" ); + } + puts( "TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL" ); + + status = rtems_task_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id ); + fatal_directive_status( + status, + RTEMS_INVALID_NAME, + "rtems_task_ident with illegal name (local)" + ); + puts( "TA1 - rtems_task_ident - global RTEMS_INVALID_NAME" ); + + status = rtems_task_ident( 100, 1, &Junk_id ); + fatal_directive_status( + status, + RTEMS_INVALID_NAME, + "rtems_task_ident with illegal name (global)" + ); + puts( "TA1 - rtems_task_ident - local RTEMS_INVALID_NAME" ); + + status = rtems_task_ident( 100, 2, &Junk_id ); + fatal_directive_status( + status, + RTEMS_INVALID_NODE, + "rtems_task_ident with illegal node" + ); + puts( "TA1 - rtems_task_ident - RTEMS_INVALID_NODE" ); + + status = rtems_task_restart( 100, 0 ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_restart with illegal id" + ); + puts( "TA1 - rtems_task_restart - RTEMS_INVALID_ID" ); + + status = rtems_task_resume( 100 ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_resume with illegal id" + ); + puts( "TA1 - rtems_task_resume - RTEMS_INVALID_ID" ); + + status = rtems_task_resume( RTEMS_SELF ); + fatal_directive_status( + status, + RTEMS_INCORRECT_STATE, + "rtems_task_resume of ready task" + ); + puts( "TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE" ); + + status = rtems_task_set_priority( RTEMS_SELF, 512, &previous_priority ); + fatal_directive_status( + status, + RTEMS_INVALID_PRIORITY, + "rtems_task_set_priority with illegal priority" + ); + puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY" ); + + status = rtems_task_set_priority( 100, 8, &previous_priority ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_set_priority with illegal id" + ); + puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_ID" ); + + status = rtems_task_set_note( + RTEMS_SELF, + RTEMS_NOTEPAD_LAST+10, + notepad_value + ); + fatal_directive_status( + status, + RTEMS_INVALID_NUMBER, + "rtems_task_set_note with illegal notepad" + ); + puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER" ); + + status = rtems_task_set_note( 100, RTEMS_NOTEPAD_LAST, notepad_value ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_set_note with illegal id" + ); + puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_ID" ); + + status = rtems_task_start( 100, Task_1, 0 ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_start with illegal id" + ); + puts( "TA1 - rtems_task_start - RTEMS_INVALID_ID" ); + + status = rtems_task_start( 0, Task_1, 0 ); + fatal_directive_status( + status, + RTEMS_INCORRECT_STATE, + "rtems_task_start of ready task" + ); + puts( "TA1 - rtems_task_start - RTEMS_INCORRECT_STATE" ); + + status = rtems_task_suspend( 100 ); + fatal_directive_status( + status, + RTEMS_INVALID_ID, + "rtems_task_suspend with illegal id" + ); + puts( "TA1 - rtems_task_suspend - RTEMS_INVALID_ID" ); +} |