source: rtems/testsuites/libtests/devnullfatal01/testcase.h @ 8e8775db

4.115
Last change on this file since 8e8775db was 8e8775db, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 27, 2010 at 1:57:17 PM

2010-07-27 Joel Sherrill <joel.sherrill@…>

PR 1632/testing

  • Makefile.am, configure.ac: Make dedicated fatal error test for /dev/null already registered. Using code from Bharath in new test framework.
  • devnullfatal01/.cvsignore, devnullfatal01/Makefile.am, devnullfatal01/devnullfatal01.doc, devnullfatal01/devnullfatal01.scn, devnullfatal01/testcase.h: New files.
  • Property mode set to 100644
File size: 823 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.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#define FATAL_ERROR_TEST_NAME            "/DEV/NULL FATAL 01"
13#define FATAL_ERROR_DESCRIPTION          "/dev/null already registered"
14#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
15#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
16#define FATAL_ERROR_EXPECTED_ERROR       RTEMS_TOO_MANY
17
18#include <rtems/devnull.h>
19
20void force_error()
21{
22  int status;
23
24  status = rtems_io_register_name( "/dev/null", 0, 0 );
25
26  status = null_initialize( 0, 0, NULL );
27
28  /* A fatal error would be raised in previous call */
29  /* we will not run this far */
30}
31
Note: See TracBrowser for help on using the repository browser.