source: rtems/testsuites/libtests/devnullfatal01/testcase.h @ 55b967a

Last change on this file since 55b967a was 55b967a, checked in by Joel Sherrill <joel@…>, on Apr 25, 2017 at 4:22:25 PM

devnullfatal01/testcase.h: Avoid redefinition of TESTS_USE_PRINTK

  • Property mode set to 100644
File size: 886 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2010, 2017.
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#ifndef TESTS_USE_PRINTK
16#define TESTS_USE_PRINTK
17#endif
18
19#include <rtems/devnull.h>
20#include "tmacros.h"
21
22void force_error()
23{
24  int status;
25
26  status = rtems_io_register_name( "/dev/null", 0, 0 );
27  directive_failed( status, "io register" );
28
29  status = null_initialize( 0, 0, NULL );
30
31  /* A fatal error would be raised in previous call */
32  /* we will not run this far */
33}
Note: See TracBrowser for help on using the repository browser.