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
RevLine 
[8e8775db]1/*
[55b967a]2 *  COPYRIGHT (c) 1989-2010, 2017.
[8e8775db]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
[c499856]7 *  http://www.rtems.org/license/LICENSE.
[8e8775db]8 */
9
[ecd8c8ad]10#define FATAL_ERROR_TEST_NAME            "/DEV/NULL 1"
[8e8775db]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
[55b967a]15#ifndef TESTS_USE_PRINTK
[24d0ee57]16#define TESTS_USE_PRINTK
[55b967a]17#endif
[24d0ee57]18
[8e8775db]19#include <rtems/devnull.h>
[6f27ba8]20#include "tmacros.h"
[8e8775db]21
22void force_error()
23{
24  int status;
25
26  status = rtems_io_register_name( "/dev/null", 0, 0 );
[6f27ba8]27  directive_failed( status, "io register" );
[8e8775db]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.