summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxfatal01/testcase.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-31 23:42:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-31 23:42:50 +0000
commit920343eed752a059396eab7a8663fcde246c0948 (patch)
treef7da5226808d719a554e0cabfb77917a5d400435 /testsuites/psxtests/psxfatal01/testcase.h
parent2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-920343eed752a059396eab7a8663fcde246c0948.tar.bz2
2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac: New tests. * psxfatal01/.cvsignore, psxfatal01/Makefile.am, psxfatal01/psxfatal01.scn, psxfatal01/testcase.h, psxfatal02/.cvsignore, psxfatal02/Makefile.am, psxfatal02/psxfatal02.scn, psxfatal02/testcase.h, psxfatal_support/init.c, psxfatal_support/system.h: New files.
Diffstat (limited to 'testsuites/psxtests/psxfatal01/testcase.h')
-rw-r--r--testsuites/psxtests/psxfatal01/testcase.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxfatal01/testcase.h b/testsuites/psxtests/psxfatal01/testcase.h
new file mode 100644
index 0000000000..01ab0b6836
--- /dev/null
+++ b/testsuites/psxtests/psxfatal01/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[] = {
+ { NULL, /* bad thread entry */
+ 0
+ }
+};
+
+#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 - NULL entry"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_POSIX_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
+#define FATAL_ERROR_EXPECTED_ERROR EFAULT
+
+void force_error()
+{
+ /* we will not run this far */
+}