source: rtems/testsuites/libtests/devnullfatal01/testcase.h @ b261dec

5
Last change on this file since b261dec was b6606e8, checked in by Sebastian Huber <sebastian.huber@…>, on 12/08/16 at 15:41:30

score: Remove fatal is internal indicator

The fatal is internal indicator is redundant since the fatal source and
error code uniquely identify a fatal error. Keep the fatal user
extension is internal parameter for backward compatibility and set it to
false always.

Update #2825.

  • Property mode set to 100644
File size: 848 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2010.
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.org/license/LICENSE.
8 */
9
10#define FATAL_ERROR_TEST_NAME            "/DEV/NULL 1"
11#define FATAL_ERROR_DESCRIPTION          "/dev/null already registered"
12#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
13#define FATAL_ERROR_EXPECTED_ERROR       RTEMS_TOO_MANY
14
15#define TESTS_USE_PRINTK
16
17#include <rtems/devnull.h>
18#include "tmacros.h"
19
20void force_error()
21{
22  int status;
23
24  status = rtems_io_register_name( "/dev/null", 0, 0 );
25  directive_failed( status, "io register" );
26
27  status = null_initialize( 0, 0, NULL );
28
29  /* A fatal error would be raised in previous call */
30  /* we will not run this far */
31}
Note: See TracBrowser for help on using the repository browser.