summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-11-19 16:07:04 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-11-26 11:10:22 +0100
commit657e30c135f22c4448cfd13f8113b23e72776dad (patch)
tree3673a8df391a0fb170d4cbffb8e1d05821771aa2 /testsuites/sptests
parentAvoid INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL (diff)
downloadrtems-657e30c135f22c4448cfd13f8113b23e72776dad.tar.bz2
config: CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE
In order to better support applications which use the new rtems_task_construct() directive add the CONFIGURE_INIT_TASK_CONSTURCT_STORAGE_SIZE configuration option. If this option is specified, then the Classic API initialization task is constructed with rtems_task_construct(). Update #4181.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/spfatal34/init.c52
-rw-r--r--testsuites/sptests/spfatal34/spfatal34.doc11
-rw-r--r--testsuites/sptests/spfatal34/spfatal34.scn8
-rw-r--r--testsuites/sptests/spinternalerror02/init.c2
4 files changed, 72 insertions, 1 deletions
diff --git a/testsuites/sptests/spfatal34/init.c b/testsuites/sptests/spfatal34/init.c
new file mode 100644
index 0000000000..5c2ab0e735
--- /dev/null
+++ b/testsuites/sptests/spfatal34/init.c
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../spfatal_support/spfatal.h"
+
+#define FATAL_ERROR_TEST_NAME "34"
+
+#define FATAL_ERROR_DESCRIPTION "Classic API Init task construct failure"
+
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+
+#define FATAL_ERROR_EXPECTED_ERROR \
+ INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED
+
+#define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#define CONFIGURE_INIT_TASK_PRIORITY 0
+
+static void force_error( void )
+{
+ RTEMS_UNREACHABLE();
+}
+
+#include "../spfatal_support/spfatalimpl.h"
diff --git a/testsuites/sptests/spfatal34/spfatal34.doc b/testsuites/sptests/spfatal34/spfatal34.doc
new file mode 100644
index 0000000000..d2640ab8f0
--- /dev/null
+++ b/testsuites/sptests/spfatal34/spfatal34.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: spfatal34
+
+directives:
+
+ - _RTEMS_tasks_Construct_user_task()
+
+concepts:
+
+ - Provoke a Classic API initialization task construct failure.
diff --git a/testsuites/sptests/spfatal34/spfatal34.scn b/testsuites/sptests/spfatal34/spfatal34.scn
new file mode 100644
index 0000000000..0ad19816a0
--- /dev/null
+++ b/testsuites/sptests/spfatal34/spfatal34.scn
@@ -0,0 +1,8 @@
+*** BEGIN OF TEST SPFATAL 34 ***
+*** TEST VERSION: 6.0.0.be2dc00ae7b5db5381da49a3ec42f2088fa66bc9
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD:
+*** TEST TOOLS: 10.2.1 20200918 (RTEMS 6, RSB 3ce72f014292bbb4e6b3bab9ede9e0b4a71ef5a8, Newlib 749cbcc)
+Fatal error (Classic API Init task construct failure) hit
+
+*** END OF TEST SPFATAL 34 ***
diff --git a/testsuites/sptests/spinternalerror02/init.c b/testsuites/sptests/spinternalerror02/init.c
index 1b7d0b4388..1564061956 100644
--- a/testsuites/sptests/spinternalerror02/init.c
+++ b/testsuites/sptests/spinternalerror02/init.c
@@ -36,7 +36,7 @@ static void test_internal_error_text(void)
} while ( text != text_last );
rtems_test_assert(
- error - 3 == INTERNAL_ERROR_TOO_LARGE_TLS_SIZE
+ error - 3 == INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED
);
}