diff options
Diffstat (limited to 'testsuites/psxtests/psxsem01/init.c')
-rw-r--r-- | testsuites/psxtests/psxsem01/init.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/testsuites/psxtests/psxsem01/init.c b/testsuites/psxtests/psxsem01/init.c index 5f067bb16f..247fdebea3 100644 --- a/testsuites/psxtests/psxsem01/init.c +++ b/testsuites/psxtests/psxsem01/init.c @@ -171,8 +171,8 @@ void *POSIX_Init( puts( "Init: sem_open - UNSUCCESSFUL (ENAMETOOLONG)" ); n_sem1 = sem_open(Get_Too_Long_Name(), O_CREAT, 0777, 1 ); - fatal_posix_service_status( - (int) n_sem1, (int) SEM_FAILED, "sem_open error return status"); + fatal_posix_service_pointer_minus_one( + n_sem1, "sem_open error return status"); fatal_posix_service_status( errno, ENAMETOOLONG, "sem_open errorno ENAMETOOLONG" ); @@ -187,14 +187,14 @@ void *POSIX_Init( puts( "Init: sem_open - Create an Existing sem (EEXIST)" ); n_sem2 = sem_open("sem1", O_CREAT | O_EXCL, 0777, 1); - fatal_posix_service_status( - (int) n_sem2, (int) SEM_FAILED, "sem_open error return status" ); + fatal_posix_service_pointer_minus_one( + n_sem2, "sem_open error return status" ); fatal_posix_service_status( errno, EEXIST, "sem_open errno EEXIST"); puts( "Init: sem_open - Open new sem without create flag (ENOENT)" ); n_sem2 = sem_open("sem3", O_EXCL, 0777, 1); - fatal_posix_service_status( - (int) n_sem2, (int) SEM_FAILED, "sem_open error return status" ); + fatal_posix_service_pointer_minus_one( + n_sem2, "sem_open error return status" ); fatal_posix_service_status( errno, ENOENT, "sem_open errno EEXIST"); /* @@ -218,8 +218,7 @@ void *POSIX_Init( puts( "Init: sem_open - Open an existing sem ( same id )" ); n_sem2 = sem_open("sem1", 0 ); - fatal_posix_service_status( - (int) n_sem2, (int) n_sem1, "sem_open error return status" ); + assert( n_sem2 == n_sem1 ); /* * Unlink the semaphore, then verify an open of the same name produces a @@ -243,7 +242,6 @@ void *POSIX_Init( status = sem_close( n_sem1 ); fatal_posix_service_status( status, 0, "sem_close semaphore"); - /* * Validate it n_sem2 (the last open for sem1 name can be * correctly closed and unlinked. |