summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal27
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2014-03-27 14:23:21 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-27 14:50:36 +0100
commit5c0c0cf2a6a9e3fdbcd1ada3f79399c453b1fbd1 (patch)
treedba573cb48c77127b711bdce1f94816025fdf942 /testsuites/sptests/spfatal27
parentprivateenv: Remove sharing of user environment between threads. (diff)
downloadrtems-5c0c0cf2a6a9e3fdbcd1ada3f79399c453b1fbd1.tar.bz2
privateenv: Use POSIX keys instead of task variables.
Diffstat (limited to 'testsuites/sptests/spfatal27')
-rw-r--r--testsuites/sptests/spfatal27/Makefile.am21
-rw-r--r--testsuites/sptests/spfatal27/spfatal27.doc23
-rw-r--r--testsuites/sptests/spfatal27/spfatal27.scn3
-rw-r--r--testsuites/sptests/spfatal27/testcase.h27
4 files changed, 74 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal27/Makefile.am b/testsuites/sptests/spfatal27/Makefile.am
new file mode 100644
index 0000000000..744cef7541
--- /dev/null
+++ b/testsuites/sptests/spfatal27/Makefile.am
@@ -0,0 +1,21 @@
+rtems_tests_PROGRAMS = spfatal27
+spfatal27_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal27.scn
+dist_rtems_tests_DATA += spfatal27.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spfatal27_OBJECTS)
+LINK_LIBS = $(spfatal27_LDLIBS)
+
+spfatal27$(EXEEXT): $(spfatal27_OBJECTS) $(spfatal27_DEPENDENCIES)
+ @rm -f spfatal27$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal27/spfatal27.doc b/testsuites/sptests/spfatal27/spfatal27.doc
new file mode 100644
index 0000000000..f8da1bfbc9
--- /dev/null
+++ b/testsuites/sptests/spfatal27/spfatal27.doc
@@ -0,0 +1,23 @@
+# Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+#
+# embedded brains GmbH
+# Dornierstrasse 4
+# 82178 Puchheim
+# Germany
+# <rtems@embedded-brains.de>
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.org/license/LICENSE.
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: spfatal27
+
+directives:
+
+ rtems_libio_init
+
+concepts:
+
++ Force the fatal error when no POSIX key is left.
diff --git a/testsuites/sptests/spfatal27/spfatal27.scn b/testsuites/sptests/spfatal27/spfatal27.scn
new file mode 100644
index 0000000000..41f6ae58bc
--- /dev/null
+++ b/testsuites/sptests/spfatal27/spfatal27.scn
@@ -0,0 +1,3 @@
+*** BEGIN OF TEST FATAL 27 ***
+Fatal error (libio init no posix key left) hit
+*** END OF TEST FATAL 27 ***
diff --git a/testsuites/sptests/spfatal27/testcase.h b/testsuites/sptests/spfatal27/testcase.h
new file mode 100644
index 0000000000..4dc4f9dd59
--- /dev/null
+++ b/testsuites/sptests/spfatal27/testcase.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstrasse 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#define FATAL_ERROR_TEST_NAME "FATAL 27"
+#define FATAL_ERROR_DESCRIPTION "libio init no posix key left"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR RTEMS_UNSATISFIED
+
+#define CONFIGURE_MAXIMUM_POSIX_KEYS (-1)
+#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS (0)
+
+void force_error()
+{
+ /* we should not reach this */
+}