summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx08
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-07 22:00:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-07 22:00:57 +0000
commit42418a9d3c6c18fb16ae59e66f4541f8085e8077 (patch)
tree75c3a9052a1ab63e111016b49acaede0dc75ff5a /testsuites/psxtests/psx08
parentremoved if 0 for basic sporadic server case accidentally left in. (diff)
downloadrtems-42418a9d3c6c18fb16ae59e66f4541f8085e8077.tar.bz2
added test cases for ESRCH from pthread_join and pthread_detach
Diffstat (limited to 'testsuites/psxtests/psx08')
-rw-r--r--testsuites/psxtests/psx08/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx08/init.c b/testsuites/psxtests/psx08/init.c
index e2aa3d27d0..328adae9e1 100644
--- a/testsuites/psxtests/psx08/init.c
+++ b/testsuites/psxtests/psx08/init.c
@@ -32,6 +32,10 @@ void *POSIX_Init(
Init_id = pthread_self();
printf( "Init's ID is 0x%08x\n", Init_id );
+ puts( "Init: pthread_detach - ESRCH (invalid id)" );
+ status = pthread_detach( -1 );
+ assert( status == ESRCH );
+
/* detach this thread */
puts( "Init: pthread_detach self" );
@@ -47,8 +51,13 @@ void *POSIX_Init(
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
assert( !status );
+ puts( "Init: pthread_join - ESRCH (invalid id)" );
+ status = pthread_join( -1, &return_pointer );
+ assert( status == ESRCH );
+
puts( "Init: pthread_join - SUCCESSFUL" );
status = pthread_join( Task_id, &return_pointer );
+ /* assert is below comment */
/* switch to Task 1 */