summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-07 06:25:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-08 08:15:13 +0200
commitfd27bae5b949f1beee2ca2ba4cccecc7e89f40cb (patch)
tree4f2a002431ec9bf8b8f448289f332de78ddc75ff /testsuites
parenttests: Remove CONFIGURE_MAXIMUM_DRIVERS (diff)
downloadrtems-fd27bae5b949f1beee2ca2ba4cccecc7e89f40cb.tar.bz2
CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
Make CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE configurable by the user. Update #3434.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/psxconfig01/init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxconfig01/init.c b/testsuites/psxtests/psxconfig01/init.c
index 910932a997..70e489823b 100644
--- a/testsuites/psxtests/psxconfig01/init.c
+++ b/testsuites/psxtests/psxconfig01/init.c
@@ -25,6 +25,8 @@
#include "config.h"
#endif
+#define _GNU_SOURCE
+
#include <rtems/test.h>
#include <tmacros.h>
@@ -65,6 +67,8 @@ const char rtems_test_name[] = "PSXCONFIG 1";
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 41
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+#define CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE CPU_STACK_MINIMUM_SIZE
+
#define CONFIGURE_MAXIMUM_POSIX_THREADS 3
#define CONFIGURE_MAXIMUM_POSIX_TIMERS 47
@@ -462,8 +466,21 @@ static rtems_task Init(rtems_task_argument argument)
#ifdef CONFIGURE_MAXIMUM_POSIX_THREADS
for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_THREADS; ++i) {
pthread_t thread;
+ pthread_attr_t attr;
+ size_t stack_size;
+
eno = pthread_create(&thread, NULL, posix_thread, NULL);
rtems_test_assert(eno == 0);
+
+ eno = pthread_getattr_np(thread, &attr);
+ rtems_test_assert(eno == 0);
+
+ eno = pthread_attr_getstacksize(&attr, &stack_size);
+ rtems_test_assert(eno == 0);
+ rtems_test_assert(stack_size == CPU_STACK_MINIMUM_SIZE);
+
+ eno = pthread_attr_destroy(&attr);
+ rtems_test_assert(eno == 0);
}
rtems_resource_snapshot_take(&snapshot);
rtems_test_assert(