diff --git a/tests/sys/aio/aio_kqueue_test.c b/tests/sys/aio/aio_kqueue_test.c --- a/tests/sys/aio/aio_kqueue_test.c +++ b/tests/sys/aio/aio_kqueue_test.c @@ -211,8 +211,15 @@ printf("PASS: run %d, left %d\n", run, pending - 1); + if (j < max_queue_per_proc) { + iocb[j] = NULL; + } else { + printf("FAIL: run %d, result %d; kq_iocb" + " %p not found (should never happen)\n", + run, result, kq_iocb); + failed++; + } free(kq_iocb); - iocb[j] = NULL; pending--; i++; }