source: rtems/c/src/tests/sptests/sp09/screen09.c @ 98e4ebf5

4.104.114.84.95
Last change on this file since 98e4ebf5 was 98e4ebf5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54

Fixed typo in the pointer to the license terms.

  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*  Screen9
2 *
3 *  This routine generates error screen 9 for test 9.
4 *
5 *  Input parameters:  NONE
6 *
7 *  Output parameters:  NONE
8 *
9 *  COPYRIGHT (c) 1989-1997.
10 *  On-Line Applications Research Corporation (OAR).
11 *  Copyright assigned to U.S. Government, 1994.
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.OARcorp.com/rtems/license.html.
16 *
17 *  $Id$
18 */
19
20#include "system.h"
21
22void Screen9()
23{
24  void              *converted;
25  rtems_status_code status;
26  rtems_isr_entry   old_service_routine;
27
28  status = rtems_interrupt_catch(
29    Service_routine,
30    ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 10,
31    &old_service_routine
32  );
33  fatal_directive_status(
34    status,
35    RTEMS_INVALID_NUMBER,
36    "rtems_interrupt_catch with invalid vector"
37  );
38  puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" );
39
40  status = rtems_interrupt_catch( NULL, 3, &old_service_routine );
41  fatal_directive_status(
42    status,
43    RTEMS_INVALID_ADDRESS,
44    "rtems_interrupt_catch with invalid handler"
45  );
46  puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_ADDRESS" );
47
48  status = rtems_signal_send( 100, RTEMS_SIGNAL_1 );
49  fatal_directive_status(
50    status,
51    RTEMS_INVALID_ID,
52    "rtems_signal_send with illegal id"
53  );
54  puts( "TA1 - rtems_signal_send - RTEMS_INVALID_ID" );
55
56  status = rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_16 );
57  fatal_directive_status(
58    status,
59    RTEMS_NOT_DEFINED,
60    "rtems_signal_send with no handler"
61  );
62  puts( "TA1 - rtems_signal_send - RTEMS_NOT_DEFINED" );
63
64  status = rtems_port_create(
65     0,
66     Internal_port_area,
67     External_port_area,
68     sizeof( Internal_port_area ),
69     &Junk_id
70  );
71  fatal_directive_status(
72    status,
73    RTEMS_INVALID_NAME,
74    "rtems_port_create with illegal name"
75  );
76  puts( "TA1 - rtems_port_create - RTEMS_INVALID_NAME" );
77
78  status = rtems_port_create(
79     Port_name[ 1 ],
80     &((char *)Internal_port_area)[ 1 ],
81     External_port_area,
82     sizeof( Internal_port_area ),
83     &Junk_id
84  );
85  fatal_directive_status(
86    status,
87    RTEMS_INVALID_ADDRESS,
88    "rtems_port_create with illegal address"
89  );
90  puts( "TA1 - rtems_port_create - RTEMS_INVALID_ADDRESS" );
91
92  status = rtems_port_create(
93     Port_name[ 1 ],
94     Internal_port_area,
95     External_port_area,
96     sizeof( Internal_port_area ),
97     &Junk_id
98  );
99  fatal_directive_status(
100    status,
101    RTEMS_TOO_MANY,
102    "rtems_port_create of too many"
103  );
104  puts( "TA1 - rtems_port_create - RTEMS_TOO_MANY" );
105
106  status = rtems_port_delete( 0 );
107  fatal_directive_status(
108    status,
109    RTEMS_INVALID_ID,
110    "rtems_port_delete with illegal id"
111  );
112  puts( "TA1 - rtems_port_delete - RTEMS_INVALID_ID" );
113
114  status = rtems_port_ident( 0, &Junk_id );
115  fatal_directive_status(
116    status,
117    RTEMS_INVALID_NAME,
118    "rtems_port_ident with illegal name"
119  );
120  puts( "TA1 - rtems_port_ident - RTEMS_INVALID_NAME" );
121
122  status = rtems_port_external_to_internal(
123    100,
124    Internal_port_area,
125    &converted
126  );
127  fatal_directive_status(
128    status,
129    RTEMS_INVALID_ID,
130    "rtems_port_external_to_internal with illegal id"
131  );
132  puts( "TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ID" );
133  status = rtems_port_internal_to_external(
134    100,
135    Internal_port_area,
136    &converted
137  );
138  fatal_directive_status(
139    status,
140    RTEMS_INVALID_ID,
141    "rtems_port_internal_to_external with illegal id"
142  );
143  puts( "TA1 - rtems_port_internal_to_external - RTEMS_INVALID_ID" );
144}
Note: See TracBrowser for help on using the repository browser.