1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2012. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifdef HAVE_CONFIG_H |
---|
11 | #include "config.h" |
---|
12 | #endif |
---|
13 | |
---|
14 | #include <tmacros.h> |
---|
15 | #include "test_support.h" |
---|
16 | #include "rtems/error.h" |
---|
17 | #include <errno.h> |
---|
18 | |
---|
19 | /* forward declarations to avoid warnings */ |
---|
20 | rtems_task Init(rtems_task_argument argument); |
---|
21 | |
---|
22 | rtems_task Init( |
---|
23 | rtems_task_argument argument |
---|
24 | ) |
---|
25 | { |
---|
26 | puts( "\n\n*** TEST Tests for error reporting routines - 01 ***" ); |
---|
27 | |
---|
28 | errno = -1; |
---|
29 | rtems_error(RTEMS_ERROR_ERRNO, "Dummy: Resources unavailable"); |
---|
30 | |
---|
31 | errno = ENOMEM; |
---|
32 | rtems_error( |
---|
33 | RTEMS_NO_MEMORY | RTEMS_ERROR_ERRNO, |
---|
34 | "Dummy: Resources unavailable" |
---|
35 | ); |
---|
36 | |
---|
37 | puts( "Dummy: causing panic.. will print test end message, then..." ); |
---|
38 | puts( " print various error messages" ); |
---|
39 | rtems_error( |
---|
40 | RTEMS_NO_MEMORY | RTEMS_ERROR_PANIC, |
---|
41 | "Dummy: Resources unavailable\n" |
---|
42 | "*** END OF TEST Tests for error reporting routines - 01 ***\n" |
---|
43 | ); |
---|
44 | |
---|
45 | rtems_test_exit(0); |
---|
46 | } |
---|
47 | |
---|
48 | /* configuration information */ |
---|
49 | |
---|
50 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
51 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
52 | |
---|
53 | #define CONFIGURE_MAXIMUM_TASKS 1 |
---|
54 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
55 | |
---|
56 | #define CONFIGURE_INIT |
---|
57 | |
---|
58 | #include <rtems/confdefs.h> |
---|
59 | /* end of file */ |
---|