source: rtems/testsuites/sptests/sp09/screen14.c @ 88d594a

4.104.114.84.95
Last change on this file since 88d594a was 88d594a, checked in by Joel Sherrill <joel.sherrill@…>, on 05/24/95 at 21:39:42

Fully tested on all in-house targets

  • Property mode set to 100644
File size: 4.1 KB
Line 
1/*  Screen14
2 *
3 *  This routine generates error screen 14 for test 9.
4 *
5 *  Input parameters:  NONE
6 *
7 *  Output parameters:  NONE
8 *
9 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
10 *  On-Line Applications Research Corporation (OAR).
11 *  All rights assigned to U.S. Government, 1994.
12 *
13 *  This material may be reproduced by or for the U.S. Government pursuant
14 *  to the copyright license under the clause at DFARS 252.227-7013.  This
15 *  notice must appear in all copies of this file and its derivatives.
16 *
17 *  $Id$
18 */
19
20#include "system.h"
21
22void Screen14()
23{
24  rtems_status_code  status;
25  rtems_time_of_day  time;
26
27  status = rtems_timer_create( 0, &Junk_id );
28  fatal_directive_status(
29    status,
30    RTEMS_INVALID_NAME,
31    "rtems_timer_create with illegal name"
32  );
33  puts( "TA1 - rtems_timer_create - RTEMS_INVALID_NAME" );
34
35  status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
36  directive_failed( status, "rtems_timer_create" );
37  puts( "TA1 - rtems_timer_create - 1 - RTEMS_SUCCESSFUL" );
38
39  status = rtems_timer_create( 2, &Junk_id );
40  fatal_directive_status(
41    status,
42    RTEMS_TOO_MANY,
43    "rtems_timer_create for too many"
44  );
45  puts( "TA1 - rtems_timer_create - 2 - RTEMS_TOO_MANY" );
46
47  status = rtems_timer_delete( 100 );
48  fatal_directive_status(
49    status,
50    RTEMS_INVALID_ID,
51    "rtems_timer_delete with illegal id"
52  );
53  puts( "TA1 - rtems_timer_delete - local RTEMS_INVALID_ID" );
54
55  status = rtems_timer_delete( 0x010100 );
56  fatal_directive_status(
57    status,
58    RTEMS_INVALID_ID,
59    "rtems_timer_delete with illegal id"
60  );
61  puts( "TA1 - rtems_timer_delete - global RTEMS_INVALID_ID" );
62
63  status = rtems_timer_ident( 0, &Junk_id );
64  fatal_directive_status(
65    status,
66    RTEMS_INVALID_NAME,
67    "rtems_timer_ident with illegal name"
68  );
69  puts( "TA1 - rtems_timer_ident - RTEMS_INVALID_NAME" );
70
71  status = rtems_timer_cancel( 0x010100 );
72  fatal_directive_status(
73    status,
74    RTEMS_INVALID_ID,
75    "rtems_timer_cancel with illegal id"
76  );
77  puts( "TA1 - rtems_timer_cancel - RTEMS_INVALID_ID" );
78
79  status = rtems_timer_reset( 0x010100 );
80  fatal_directive_status(
81    status,
82    RTEMS_INVALID_ID,
83    "rtems_timer_reset with illegal id"
84  );
85  puts( "TA1 - rtems_timer_reset - RTEMS_INVALID_ID" );
86
87  status = rtems_timer_reset( Timer_id[ 1 ] );
88  fatal_directive_status(
89    status,
90    RTEMS_NOT_DEFINED,
91    "rtems_timer_reset before initiated"
92  );
93  puts( "TA1 - rtems_timer_reset - RTEMS_NOT_DEFINED" );
94
95  status = rtems_timer_fire_after(
96    0x010100,
97    5 * TICKS_PER_SECOND,
98    Delayed_routine,
99    NULL
100  );
101  fatal_directive_status(
102    status,
103    RTEMS_INVALID_ID,
104    "rtems_timer_fire_after illegal id"
105  );
106  puts( "TA1 - rtems_timer_fire_after - RTEMS_INVALID_ID" );
107
108  build_time( &time, 12, 31, 1994, 9, 0, 0, 0 );
109  status = rtems_timer_fire_when( 0x010100, &time, Delayed_routine, NULL );
110  fatal_directive_status(
111    status,
112    RTEMS_INVALID_ID,
113    "rtems_timer_fire_when with illegal id"
114  );
115  puts( "TA1 - rtems_timer_fire_when - RTEMS_INVALID_ID" );
116
117  status = rtems_timer_fire_after( Timer_id[ 1 ], 0, Delayed_routine, NULL );
118  fatal_directive_status(
119    status,
120    RTEMS_INVALID_NUMBER,
121    "rtems_timer_fire_after with 0 ticks"
122  );
123  puts( "TA1 - rtems_timer_fire_after - RTEMS_INVALID_NUMBER" );
124
125  build_time( &time, 2, 5, 1987, 8, 30, 45, 0 );
126  status = rtems_timer_fire_when( Timer_id[ 1 ], &time, Delayed_routine, NULL );
127  fatal_directive_status(
128    status,
129    RTEMS_INVALID_CLOCK,
130    "rtems_timer_fire_when with illegal time"
131  );
132  print_time(
133    "TA1 - rtems_timer_fire_when - ",
134    &time,
135    " - RTEMS_INVALID_CLOCK\n"
136  );
137
138  status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
139  directive_failed( status, "rtems_clock_set" );
140  print_time( "TA1 - rtems_clock_get       - ", &time, "\n" );
141
142  build_time( &time, 2, 5, 1990, 8, 30, 45, 0 );
143  status = rtems_timer_fire_when( Timer_id[ 1 ], &time, Delayed_routine, NULL );
144  fatal_directive_status(
145    status,
146    RTEMS_INVALID_CLOCK,
147    "rtems_timer_fire_when before current time"
148  );
149  print_time(
150    "TA1 - rtems_timer_fire_when - ",
151    &time,
152    " - before RTEMS_INVALID_CLOCK\n"
153  );
154}
Note: See TracBrowser for help on using the repository browser.