diff --git a/bin/tests/tasks/t_tasks.c b/bin/tests/tasks/t_tasks.c index ca6503f916..cf0d86b46e 100644 --- a/bin/tests/tasks/t_tasks.c +++ b/bin/tests/tasks/t_tasks.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: t_tasks.c,v 1.24 2001/04/12 21:31:36 tale Exp $ */ +/* $Id: t_tasks.c,v 1.25 2001/04/12 22:56:00 tale Exp $ */ #include @@ -460,6 +460,10 @@ t2_callback(isc_task_t *task, isc_event_t *event) { static int t_tasks2(void) { +#if ! ISC_PLATFORM_USETHREADS + t_info("This test requires threads\n"); + return (T_UNTESTED); +#else int ntasks; int result; char *p; @@ -467,10 +471,6 @@ t_tasks2(void) { unsigned int workers; isc_result_t isc_result; -#if ! ISC_PLATFORM_USETHREADS - t_info("This test requires threads\n"); - return (T_UNTESTED); -#else T2_manager = NULL; T2_done = 0; T2_nprobs = 0; @@ -647,6 +647,10 @@ t3_event2(isc_task_t *task, isc_event_t *event) { static int t_tasks3(void) { +#if ! ISC_PLATFORM_USETHREADS + t_info("This test requires threads\n"); + return (T_UNTESTED); +#else int cnt; int result; char *p; @@ -659,10 +663,6 @@ t_tasks3(void) { void *sender; isc_eventtype_t event_type; -#if ! ISC_PLATFORM_USETHREADS - t_info("This test requires threads\n"); - return (T_UNTESTED); -#else T3_flag = 0; T3_nevents = 0; T3_nsdevents = 0; @@ -874,6 +874,10 @@ t4_sde(isc_task_t *task, isc_event_t *event) { static int t_tasks4(void) { +#if ! ISC_PLATFORM_USETHREADS + t_info("This test requires threads\n"); + return (T_UNTESTED); +#else int result; char *p; isc_mem_t *mctx; @@ -885,10 +889,6 @@ t_tasks4(void) { isc_eventtype_t event_type; isc_event_t *event; -#if ! ISC_PLATFORM_USETHREADS - t_info("This test requires threads\n"); - return (T_UNTESTED); -#else T4_nprobs = 0; T4_nfails = 0; T4_flag = 0; @@ -1076,6 +1076,10 @@ t7_sde(isc_task_t *task, isc_event_t *event) { static int t_tasks7(void) { +#if ! ISC_PLATFORM_USETHREADS + t_info("This test requires threads\n"); + return (T_UNTESTED); +#else int result; char *p; isc_mem_t *mctx; @@ -1089,10 +1093,6 @@ t_tasks7(void) { isc_time_t now; isc_interval_t interval; -#if ! ISC_PLATFORM_USETHREADS - t_info("This test requires threads\n"); - return (T_UNTESTED); -#else T7_nprobs = 0; T7_nfails = 0; T7_sdflag = 0; @@ -1656,12 +1656,12 @@ t_taskpurge_x(int sender, int type, int tag, int purge_sender, static int t_tasks10(void) { - int result; - #if ! ISC_PLATFORM_USETHREADS t_info("This test requires threads\n"); return (T_UNTESTED); #else + int result; + T10_nprobs = 0; T10_nfails = 0; @@ -1807,6 +1807,10 @@ t11_sde(isc_task_t *task, isc_event_t *event) { static int t_tasks11(int purgable) { +#if ! ISC_PLATFORM_USETHREADS + t_info("This test requires threads\n"); + return (T_UNTESTED); +#else char *p; isc_mem_t *mctx; isc_taskmgr_t *tmgr; @@ -1820,10 +1824,6 @@ t_tasks11(int purgable) { isc_interval_t interval; int result; -#if ! ISC_PLATFORM_USETHREADS - t_info("This test requires threads\n"); - return (T_UNTESTED); -#else T11_startflag = 0; T11_shutdownflag = 0; T11_eventcnt = 0; @@ -2036,12 +2036,12 @@ static const char *a13 = static int t_tasks13(void) { - int result; - #if ! ISC_PLATFORM_USETHREADS t_info("This test requires threads\n"); return (T_UNTESTED); #else + int result; + T13_nfails = 0; T13_nprobs = 0; diff --git a/bin/tests/timers/t_timers.c b/bin/tests/timers/t_timers.c index d62303651f..91011e41e4 100644 --- a/bin/tests/timers/t_timers.c +++ b/bin/tests/timers/t_timers.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: t_timers.c,v 1.19 2001/04/12 21:31:38 tale Exp $ */ +/* $Id: t_timers.c,v 1.20 2001/04/12 22:56:02 tale Exp $ */ #include @@ -350,15 +350,15 @@ static const char *a1 = static void t1(void) { - int result; - isc_time_t expires; - isc_interval_t interval; - #if ! ISC_PLATFORM_USETHREADS t_info("This test requires threads\n"); t_result(T_UNTESTED); return; #else + int result; + isc_time_t expires; + isc_interval_t interval; + t_assert("isc_timer_create", 1, T_REQUIRED, a1); Tx_nfails = 0; @@ -393,16 +393,16 @@ static const char *a2 = static void t2(void) { - int result; - int isc_result; - isc_time_t expires; - isc_interval_t interval; - #if ! ISC_PLATFORM_USETHREADS t_info("This test requires threads\n"); t_result(T_UNTESTED); return; #else + int result; + int isc_result; + isc_time_t expires; + isc_interval_t interval; + t_assert("isc_timer_create", 2, T_REQUIRED, a2); Tx_nfails = 0; @@ -521,16 +521,16 @@ static const char *a3 = static void t3(void) { - int result; - int isc_result; - isc_time_t expires; - isc_interval_t interval; - #if ! ISC_PLATFORM_USETHREADS t_info("This test requires threads\n"); t_result(T_UNTESTED); return; #else + int result; + int isc_result; + isc_time_t expires; + isc_interval_t interval; + t_assert("isc_timer_create", 3, T_REQUIRED, a3); Tx_nfails = 0; @@ -687,15 +687,15 @@ static const char *a4 = static void t4(void) { - int result; - isc_time_t expires; - isc_interval_t interval; - #if ! ISC_PLATFORM_USETHREADS t_info("This test requires threads\n"); t_result(T_UNTESTED); return; #else + int result; + isc_time_t expires; + isc_interval_t interval; + Tx_nfails = 0; Tx_nprobs = 0; Tx_nevents = 3; @@ -874,7 +874,10 @@ t5_shutdown_event(isc_task_t *task, isc_event_t *event) { static int t_timers5(void) { - +#if ! ISC_PLATFORM_USETHREADS + t_info("This test requires threads\n"); + return (T_UNTESTED); +#else char *p; int result; isc_mem_t *mctx; @@ -886,10 +889,6 @@ t_timers5(void) { isc_time_t expires; isc_interval_t interval; -#if ! ISC_PLATFORM_USETHREADS - t_info("This test requires threads\n"); - return (T_UNTESTED); -#else T5_startflag = 0; T5_shutdownflag = 0; T5_eventcnt = 0;