diff --git a/tests/bsdtestharness.c b/tests/bsdtestharness.c index ca52d6e97..93ed8324b 100644 --- a/tests/bsdtestharness.c +++ b/tests/bsdtestharness.c @@ -72,13 +72,6 @@ main(int argc, char *argv[]) assert(res == 0); #endif - uint64_t to = 0; - char *tos = getenv("BSDTEST_TIMEOUT"); - if (tos) { - to = strtoul(tos, NULL, 0); - to *= NSEC_PER_SEC; - } - #ifdef __APPLE__ char *arch = getenv("BSDTEST_ARCH"); if (arch) { @@ -245,6 +238,13 @@ main(int argc, char *argv[]) }); dispatch_resume(tmp_ds); + uint64_t to = 0; + char *tos = getenv("BSDTEST_TIMEOUT"); + if (tos) { + to = strtoul(tos, NULL, 0); + to *= NSEC_PER_SEC; + } + if (!to) { #if TARGET_OS_EMBEDDED to = 180LL * NSEC_PER_SEC; diff --git a/tests/dispatch_apply.c b/tests/dispatch_apply.c index fa7fab53f..1f2dfb470 100644 --- a/tests/dispatch_apply.c +++ b/tests/dispatch_apply.c @@ -65,6 +65,7 @@ static void busythread(void *ignored) j += i; i += 1; } + (void)j; OSAtomicIncrement32(&busy_threads_finished); }