summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx01
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2014-03-18 16:25:33 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-19 08:34:27 +0100
commit6592cabade83930ae03f086afd416a9bcd029197 (patch)
treee289b022f1f8375d0c4a4c64f2c5bbf6912a2c68 /testsuites/psxtests/psx01
parentscore: Add _Assert_Not_reached() (diff)
downloadrtems-6592cabade83930ae03f086afd416a9bcd029197.tar.bz2
psxtests: move pthread_once tests into an extra test.
Diffstat (limited to 'testsuites/psxtests/psx01')
-rw-r--r--testsuites/psxtests/psx01/init.c17
-rw-r--r--testsuites/psxtests/psx01/psx01.doc3
-rw-r--r--testsuites/psxtests/psx01/psx01.scn5
-rw-r--r--testsuites/psxtests/psx01/task.c19
4 files changed, 0 insertions, 44 deletions
diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c
index 1d1a9e8e63..59605b49af 100644
--- a/testsuites/psxtests/psx01/init.c
+++ b/testsuites/psxtests/psx01/init.c
@@ -20,18 +20,6 @@
#include <rtems/score/todimpl.h>
-pthread_once_t nesting_once = PTHREAD_ONCE_INIT;
-
-void Test_init_routine_nesting( void );
-
-void Test_init_routine_nesting( void )
-{
- int status;
- puts( "Test_init_routine_nesting: invoked" );
- status = pthread_once( &nesting_once, Test_init_routine_nesting );
- rtems_test_assert( status == EINVAL );
-}
-
void *POSIX_Init(
void *argument
)
@@ -107,11 +95,6 @@ void *POSIX_Init(
);
rtems_test_assert( !status );
- /* once nesting */
- puts( "Init: pthread_once - SUCCESSFUL (init_routine_nesting executes)" );
- status = pthread_once( &nesting_once, Test_init_routine_nesting );
- rtems_test_assert( !status );
-
/* create a thread */
puts( "Init: pthread_create - SUCCESSFUL" );
diff --git a/testsuites/psxtests/psx01/psx01.doc b/testsuites/psxtests/psx01/psx01.doc
index 60cff7cf0a..7766de3bef 100644
--- a/testsuites/psxtests/psx01/psx01.doc
+++ b/testsuites/psxtests/psx01/psx01.doc
@@ -14,7 +14,6 @@ test set name: psx01
directives:
pthread_create
pthread_equal
- pthread_once
sched_get_priority_min
sched_get_priority_max
sched_rr_get_interval
@@ -32,5 +31,3 @@ concepts:
+ Verify that thread yielding is operational
+ Verify that pthread_equal works as expected for different combinations of
legitimate and illegitimate thread id’s
-+ Verify that pthread_once works as expected for different combinations of
- legitimate and illegitimate thread initiations
diff --git a/testsuites/psxtests/psx01/psx01.scn b/testsuites/psxtests/psx01/psx01.scn
index b187dc95c4..5811744f54 100644
--- a/testsuites/psxtests/psx01/psx01.scn
+++ b/testsuites/psxtests/psx01/psx01.scn
@@ -27,9 +27,4 @@ Task_1: pthread_equal - match case passed
Task_1: pthread_equal - different case passed
Task_1: pthread_equal - first id bad
Task_1: pthread_equal - second id bad
-Task_1: pthread_once - EINVAL (NULL once_control)
-Task_1: pthread_once - EINVAL (NULL init_routine)
-Task_1: pthread_once - SUCCESSFUL (init_routine executes)
-Test_init_routine: invoked
-Task_1: pthread_once - SUCCESSFUL (init_routine does not execute)
*** END OF POSIX TEST 1 ***
diff --git a/testsuites/psxtests/psx01/task.c b/testsuites/psxtests/psx01/task.c
index f7abd5cc82..e97b039fdc 100644
--- a/testsuites/psxtests/psx01/task.c
+++ b/testsuites/psxtests/psx01/task.c
@@ -35,7 +35,6 @@ void *Task_1_through_3(
)
{
int status;
- pthread_once_t once = PTHREAD_ONCE_INIT;
puts( "Task_1: sched_yield to Init" );
status = sched_yield();
@@ -72,24 +71,6 @@ void *Task_1_through_3(
status = pthread_equal( Init_id, (pthread_t) -1 );
rtems_test_assert( !status );
- /* exercise pthread_once */
-
- puts( "Task_1: pthread_once - EINVAL (NULL once_control)" );
- status = pthread_once( NULL, Test_init_routine );
- rtems_test_assert( status == EINVAL );
-
- puts( "Task_1: pthread_once - EINVAL (NULL init_routine)" );
- status = pthread_once( &once, NULL );
- rtems_test_assert( status == EINVAL );
-
- puts( "Task_1: pthread_once - SUCCESSFUL (init_routine executes)" );
- status = pthread_once( &once, Test_init_routine );
- rtems_test_assert( !status );
-
- puts( "Task_1: pthread_once - SUCCESSFUL (init_routine does not execute)" );
- status = pthread_once( &once, Test_init_routine );
- rtems_test_assert( !status );
-
puts( "*** END OF POSIX TEST 1 ***" );
rtems_test_exit( 0 );