summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxsem01/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-11 19:44:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-11 19:44:22 +0000
commite02db20c46ddd3d6cb66e9c3facbf40887fc5017 (patch)
treeca3713abc57bfa8b6667f5e87038245fed74bc1b /testsuites/psxtests/psxsem01/init.c
parent2007-05-11 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-e02db20c46ddd3d6cb66e9c3facbf40887fc5017.tar.bz2
2007-05-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* psxsem01/init.c, psxsem01/psxsem01.scn, psxtimer/psxtimer.c, psxtimer/psxtimer.scn: Add optional managers to Makefiles. Clean up test cases so last output line follows END OF pattern. Make sure test case all run. All tests appeared ok on sis.
Diffstat (limited to 'testsuites/psxtests/psxsem01/init.c')
-rw-r--r--testsuites/psxtests/psxsem01/init.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/testsuites/psxtests/psxsem01/init.c b/testsuites/psxtests/psxsem01/init.c
index 3d8b43f97a..ce64452926 100644
--- a/testsuites/psxtests/psxsem01/init.c
+++ b/testsuites/psxtests/psxsem01/init.c
@@ -114,12 +114,22 @@ void *POSIX_Init(
fatal_posix_service_status( status, -1, "sem_timedwait error return status");
fatal_posix_service_status( errno, ETIMEDOUT, "sem_timedwait errno ETIMEDOUT");
+
+ /*
+ * To do this case, we must be blocking when we want the semaphore.
+ * POSIX doesn't want you to check the error if you can get the resource.
+ */
+
+#if 1
+ puts( "Init: sem_timedwait - UNSUCCESSFUL (EINVAL) -- skipping" );
+#else
puts( "Init: sem_timedwait - UNSUCCESSFUL (EINVAL)" );
waittime.tv_sec = 0;
waittime.tv_nsec = 0x7FFFFFFF;
status = sem_timedwait(&sems[2], &waittime);
fatal_posix_service_status( status, -1, "sem_timedwait error return status");
fatal_posix_service_status( errno, EINVAL, "sem_init errno EINVAL");
+#endif
puts( "Init: sem_post - UNSUCCESSFUL (EINVAL)" );
status = sem_post(&sem2);
@@ -254,7 +264,7 @@ void *POSIX_Init(
/* Try adding in unlinking before closing... (can we still open?) */
- puts( "*** POSIX SEMAPHORE MANAGER TEST 1 COMPLETED ***" );
+ puts( "*** END OF POSIX SEMAPHORE MANAGER TEST 1 ***" );
rtems_test_exit(0);
return NULL; /* just so the compiler thinks we returned something */