source: rtems/testsuites/sptests/spinternalerror02/init.c @ a0b1b5ed

4.115
Last change on this file since a0b1b5ed was a0b1b5ed, checked in by Sebastian Huber <sebastian.huber@…>, on 12/15/14 at 13:19:43

Delete CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM

This define was superfluous, undocumented and used inconsistently.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 * Copyright (c) 2012-2014 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Donierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifdef HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include "tmacros.h"
20
21#include <rtems.h>
22
23const char rtems_test_name[] = "SPINTERNALERROR 2";
24
25static void test_internal_error_text(void)
26{
27  rtems_fatal_code error = 0;
28  const char *text = NULL;
29  const char *text_last;
30
31  do {
32    text_last = text;
33    text = rtems_internal_error_text( error );
34    ++error;
35    puts( text );
36  } while ( text != text_last );
37
38  rtems_test_assert( error - 3 == INTERNAL_ERROR_RESOURCE_IN_USE );
39}
40
41static void test_fatal_source_text(void)
42{
43  rtems_fatal_source source = 0;
44  const char *text = NULL;
45  const char *text_last;
46
47  do {
48    text_last = text;
49    text = rtems_fatal_source_text( source );
50    ++source;
51    puts( text );
52  } while ( text != text_last );
53
54  rtems_test_assert( source - 3 == RTEMS_FATAL_SOURCE_SMP );
55}
56
57static void test_status_text(void)
58{
59  rtems_status_code code = 0;
60  const char *text = NULL;
61  const char *text_last;
62
63  do {
64    text_last = text;
65    text = rtems_status_text( code );
66    ++code;
67    puts( text );
68  } while ( text != text_last );
69
70  rtems_test_assert( code - 3 == RTEMS_PROXY_BLOCKING );
71}
72
73static void Init(rtems_task_argument arg)
74{
75  TEST_BEGIN();
76
77  test_internal_error_text();
78  test_fatal_source_text();
79  test_status_text();
80
81  TEST_END();
82
83  rtems_test_exit(0);
84}
85
86#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
87#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
88
89#define CONFIGURE_MAXIMUM_TASKS 1
90
91#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
92
93#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
94
95#define CONFIGURE_INIT
96
97#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.