diff options
Diffstat (limited to 'testsuites/psxtests/psxfatal02/testcase.h')
-rw-r--r-- | testsuites/psxtests/psxfatal02/testcase.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxfatal02/testcase.h b/testsuites/psxtests/psxfatal02/testcase.h new file mode 100644 index 0000000000..09dd5b80f8 --- /dev/null +++ b/testsuites/psxtests/psxfatal02/testcase.h @@ -0,0 +1,36 @@ +/* + * Classic API Init task create failure + * + * $Id$ + */ + +#include <errno.h> + +/* + * Way too much stack space. Should generate a fatal error + * on the init task create. + */ +#define CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE +#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 +posix_initialization_threads_table POSIX_Initialization_threads[] = { + { POSIX_Init, + 12 * 1024 * 1024 /* too much stack */ + } +}; + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ + sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ + sizeof(posix_initialization_threads_table) + +#define FATAL_ERROR_DESCRIPTION \ + "POSIX API Init thread create failure -- no memory for stack" +#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_POSIX_API +#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE +#define FATAL_ERROR_EXPECTED_ERROR EAGAIN + +void force_error() +{ + /* we will not run this far */ +} |