Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions testing/ostest/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static void *sender_thread(void *arg)
g_send_mqfd = mq_open("mqueue", O_WRONLY | O_CREAT, 0666, &attr);
if (g_send_mqfd == (mqd_t)-1)
{
printf("sender_thread: ERROR mq_open failed\n");
printf("sender_thread: ERROR mq_open failed, errno=%d\n", errno);
ASSERT(false);
pthread_exit((pthread_addr_t)1);
}
Expand All @@ -113,8 +113,9 @@ static void *sender_thread(void *arg)
status = mq_send(g_send_mqfd, msg_buffer, TEST_MSGLEN, 42);
if (status < 0)
{
printf("sender_thread: ERROR mq_send failure=%d on msg %d\n",
status, i);
printf("sender_thread: ERROR mq_send failure=%d on msg %d, "
"errno=%d\n",
status, i, errno);
ASSERT(false);
nerrors++;
}
Expand All @@ -128,7 +129,7 @@ static void *sender_thread(void *arg)

if (mq_close(g_send_mqfd) < 0)
{
printf("sender_thread: ERROR mq_close failed\n");
printf("sender_thread: ERROR mq_close failed, errno=%d\n", errno);
ASSERT(false);
}
else
Expand Down Expand Up @@ -170,7 +171,7 @@ static void *receiver_thread(void *arg)
g_recv_mqfd = mq_open("mqueue", O_RDONLY | O_CREAT, 0666, &attr);
if (g_recv_mqfd == (mqd_t)-1)
{
printf("receiver_thread: ERROR mq_open failed\n");
printf("receiver_thread: ERROR mq_open failed, errno=%d\n", errno);
ASSERT(false);
pthread_exit((pthread_addr_t)1);
}
Expand Down