source: rtems/testsuites/sptests/sp09/screen09.c @ 8c3c1763

4.104.114.84.95
Last change on this file since 8c3c1763 was 8c3c1763, checked in by Joel Sherrill <joel.sherrill@…>, on 07/26/00 at 20:44:11

Added ifdef on C4x to avoid invalid address alignment checks since there
is no such thing on the C4x.

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