source: rtems/testsuites/psxtests/psxfatal02/testcase.h @ a9127a2e

4.115
Last change on this file since a9127a2e was a9127a2e, checked in by Sebastian Huber <sebastian.huber@…>, on 07/18/13 at 13:55:46

testsuites: Include missing header files

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * Classic API Init task create failure
3 */
4
5#include <errno.h>
6#include <limits.h>
7
8/*
9 *  Way too much stack space.  Should generate a fatal error
10 *  on the init task create.
11 */
12#define CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
13#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0
14posix_initialization_threads_table POSIX_Initialization_threads[] = {
15  { POSIX_Init,
16#if INT_MAX < (12 * 1024 * 1024)
17    INT_MAX
18#else
19    12 * 1024 * 1024 /* too much stack */
20#endif
21  }
22};
23
24#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
25
26#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
27  sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
28      sizeof(posix_initialization_threads_table)
29
30#define FATAL_ERROR_TEST_NAME            "2"
31#define FATAL_ERROR_DESCRIPTION \
32        "POSIX API Init thread create failure -- no memory for stack"
33#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_POSIX_API
34#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
35#define FATAL_ERROR_EXPECTED_ERROR       EAGAIN
36
37void force_error(void)
38{
39  /* we will not run this far */
40}
Note: See TracBrowser for help on using the repository browser.