source: rtems/testsuites/sptests/spfatal_support/system.h @ 24d0ee57

5
Last change on this file since 24d0ee57 was 24d0ee57, checked in by Chris Johns <chrisj@…>, on 05/20/16 at 08:39:50

cpukit, testsuite: Add rtems_printf and rtems_printer support.

This change adds rtems_printf and related functions and wraps the
RTEMS print plugin support into a user API. All references to the
plugin are removed and replaced with the rtems_printer interface.

Printk and related functions are made to return a valid number of
characters formatted and output.

The function attribute to check printf functions has been added
to rtems_printf and printk. No changes to remove warrnings are part
of this patch set.

The testsuite has been moved over to the rtems_printer. The testsuite
has a mix of rtems_printer access and direct print control via the
tmacros.h header file. The support for begink/endk has been removed
as it served no purpose and only confused the code base. The testsuite
has not been refactored to use rtems_printf. This is future work.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*  system.h
2 *
3 *  This include file contains information that is included in every
4 *  function in the test set.
5 *
6 *  COPYRIGHT (c) 1989-2009.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 */
13
14/*
15 *  Some of the fatal error cases require the ability to peek inside RTEMS
16 */
17
18#define TESTS_USE_PRINTK
19#include "tmacros.h"
20
21#include <rtems.h>
22
23/* functions */
24
25rtems_task Init(
26  rtems_task_argument argument
27);
28
29void Fatal_extension(
30  rtems_fatal_source source,
31  bool               is_internal,
32  rtems_fatal_code   error
33);
34
35void Put_Error(
36  uint32_t source,
37  uint32_t error
38);
39
40void Put_Source( rtems_fatal_source source );
41
42void force_error(void);
43
44/* need some prototypes for test cases */
45
46rtems_device_driver consume_semaphores_initialize(
47  rtems_device_major_number major RTEMS_UNUSED,
48  rtems_device_minor_number minor RTEMS_UNUSED,
49  void *pargp RTEMS_UNUSED
50);
51
52#define CONSUME_SEMAPHORE_DRIVERS \
53  { consume_semaphores_initialize, NULL, NULL, NULL, NULL, NULL }
54
55#include "testcase.h"
56
57/* configuration information */
58
59extern rtems_extensions_table initial_extensions;
60
61#define CONFIGURE_INITIAL_EXTENSIONS \
62  { \
63    NULL,                    /* create  */ \
64    NULL,                    /* start   */ \
65    NULL,                    /* restart */ \
66    NULL,                    /* delete  */ \
67    NULL,                    /* switch  */ \
68    NULL,                    /* begin   */ \
69    NULL,                    /* exitted */ \
70    Fatal_extension          /* fatal   */ \
71  }, \
72  RTEMS_TEST_INITIAL_EXTENSION
73
74/* extra parameters may be in testcase.h */
75#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
76#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
77
78/* always need an Init task, some cases need more tasks */
79#ifndef SPFATAL_TEST_CASE_EXTRA_TASKS
80#define SPFATAL_TEST_CASE_EXTRA_TASKS 0
81#endif
82#define CONFIGURE_MAXIMUM_TASKS \
83  (SPFATAL_TEST_CASE_EXTRA_TASKS + 1)
84
85#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
86
87#include <rtems/confdefs.h>
88
89/* global variables */
90
91/* end of include file */
Note: See TracBrowser for help on using the repository browser.