Skip to content

Commit 3070225

Browse files
committed
Add diagnostics and test PASS print in pthread_cond_wait/2-3.c
1 parent 8dc2512 commit 3070225

File tree

1 file changed

+5
-1
lines changed
  • conformance/interfaces/pthread_cond_wait

1 file changed

+5
-1
lines changed

conformance/interfaces/pthread_cond_wait/2-3.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,10 @@ int main(int argc, char * argv[])
350350
/** Join the thread */
351351
ret = pthread_join(th, &rc);
352352
if (ret != 0) { UNRESOLVED(ret, "Unable to join the thread"); }
353-
if (rc != PTHREAD_CANCELED) { FAILED("thread was not canceled"); }
353+
if (rc != PTHREAD_CANCELED) {
354+
output("thread was not canceled, return code was %d!=%d", rc, PTHREAD_CANCELED);
355+
FAILED("thread was not canceled");
356+
}
354357

355358
#if VERBOSE > 1
356359
output("Test passed for %s\n\n", scenar[i].descr);
@@ -376,6 +379,7 @@ int main(int argc, char * argv[])
376379
ret = sem_destroy(&(data.semB));
377380
if (ret != 0) { UNRESOLVED(errno, "Sem destroy failed"); }
378381

382+
printf("Test PASS\n");
379383
PASSED;
380384
}
381385

0 commit comments

Comments
 (0)