summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spprivenv01
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/spprivenv01
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/spprivenv01')
-rw-r--r--testsuites/sptests/spprivenv01/init.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/testsuites/sptests/spprivenv01/init.c b/testsuites/sptests/spprivenv01/init.c
index a670085f80..4f0660d7b5 100644
--- a/testsuites/sptests/spprivenv01/init.c
+++ b/testsuites/sptests/spprivenv01/init.c
@@ -63,14 +63,19 @@ rtems_task Init(
puts( "Init - allocating most of workspace memory" );
opaque = rtems_workspace_greedy_allocate( NULL, 0 );
-
- puts( "Init - attempt to reset env - expect RTEMS_TOO_MANY" );
+
+ puts( "Init - attempt to reset env - expect RTEMS_SUCCESSFUL" );
sc = rtems_libio_set_private_env();
- rtems_test_assert( sc == RTEMS_TOO_MANY );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+ rtems_test_assert( rtems_current_user_env != &rtems_global_user_env );
puts( "Init - freeing the workspace memory" );
rtems_workspace_greedy_free( opaque );
+ puts( "Init - Reset to global environment" );
+ rtems_libio_use_global_env();
+ rtems_test_assert( rtems_current_user_env == &rtems_global_user_env );
+
puts( "Init - Attempt to get a private environment" );
sc = rtems_libio_set_private_env();
rtems_test_assert( sc == RTEMS_SUCCESSFUL );
@@ -118,6 +123,9 @@ rtems_task Init(
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_MAXIMUM_POSIX_KEYS 1
+#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS 2
+
#define CONFIGURE_INIT
#include <rtems/confdefs.h>