summaryrefslogtreecommitdiff
path: root/tests/semaphore1.c
diff options
context:
space:
mode:
authorrpj <rpj>2005-05-08 16:55:02 +0000
committerrpj <rpj>2005-05-08 16:55:02 +0000
commitac8e3d247fa03af61b5411f92508481e7c3f49f8 (patch)
treef5d9c2a8bc58a2e6135e8aa2b207daab23de14a7 /tests/semaphore1.c
parent7523c7c4d75652f67cd31cb123e1268790394c8b (diff)
''
Diffstat (limited to 'tests/semaphore1.c')
-rw-r--r--tests/semaphore1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/semaphore1.c b/tests/semaphore1.c
index 4327e73..f89a430 100644
--- a/tests/semaphore1.c
+++ b/tests/semaphore1.c
@@ -86,7 +86,8 @@ thr(void * arg)
if ( result == -1 )
{
int err = errno;
- perror("thread: sem_trywait 1: expect an EAGAIN error"); // No error
+ printf("thread: sem_trywait 1: expecting error %s: got %s\n",
+ error_string[EAGAIN], error_string[err]); fflush(stdout);
assert(err == EAGAIN);
}
else
@@ -131,7 +132,8 @@ main()
if ( result == -1 )
{
int err = errno;
- perror("main: sem_trywait 1: expect an EAGAIN error"); // No error
+ printf("main: sem_trywait 1: expecting error %s: got %s\n",
+ error_string[EAGAIN], error_string[err]); fflush(stdout);
assert(err == EAGAIN);
}
else