mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
Merge branch 'nothreads-fix' into 'master'
Fix compiler warnings and test failures when building without threads See merge request isc-projects/bind9!119
This commit is contained in:
@@ -37,11 +37,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static isc_mutex_t lock;
|
static isc_mutex_t lock;
|
||||||
static isc_condition_t cv;
|
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
static int active[10];
|
static int active[10];
|
||||||
static isc_boolean_t done = ISC_FALSE;
|
static isc_boolean_t done = ISC_FALSE;
|
||||||
|
|
||||||
|
#ifdef ISC_PLATFORM_USETHREADS
|
||||||
|
static isc_condition_t cv;
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set(isc_task_t *task, isc_event_t *event) {
|
set(isc_task_t *task, isc_event_t *event) {
|
||||||
int *value = (int *) event->ev_arg;
|
int *value = (int *) event->ev_arg;
|
||||||
@@ -643,6 +646,10 @@ ATF_TC_BODY(task_exclusive, tc) {
|
|||||||
isc_test_end();
|
isc_test_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The remainder of these tests require threads
|
||||||
|
*/
|
||||||
|
#ifdef ISC_PLATFORM_USETHREADS
|
||||||
/*
|
/*
|
||||||
* Max tasks test:
|
* Max tasks test:
|
||||||
* The task system can create and execute many tasks. Tests with 10000.
|
* The task system can create and execute many tasks. Tests with 10000.
|
||||||
@@ -1440,6 +1447,7 @@ ATF_TC_HEAD(purgeevent_notpurge, tc) {
|
|||||||
ATF_TC_BODY(purgeevent_notpurge, tc) {
|
ATF_TC_BODY(purgeevent_notpurge, tc) {
|
||||||
try_purgeevent(ISC_FALSE);
|
try_purgeevent(ISC_FALSE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
|
@@ -29,6 +29,11 @@
|
|||||||
|
|
||||||
#include "isctest.h"
|
#include "isctest.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This entire test requires threads.
|
||||||
|
*/
|
||||||
|
#ifdef ISC_PLATFORM_USETHREADS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper functions
|
* Helper functions
|
||||||
*/
|
*/
|
||||||
@@ -559,6 +564,16 @@ ATF_TC_BODY(purge, tc) {
|
|||||||
|
|
||||||
isc_test_end();
|
isc_test_end();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
ATF_TC(untested);
|
||||||
|
ATF_TC_HEAD(untested, tc) {
|
||||||
|
atf_tc_set_md_var(tc, "descr", "skipping nsec3 test");
|
||||||
|
}
|
||||||
|
ATF_TC_BODY(untested, tc) {
|
||||||
|
UNUSED(tc);
|
||||||
|
atf_tc_skip("DNSSEC not available");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
@@ -570,6 +585,8 @@ ATF_TP_ADD_TCS(tp) {
|
|||||||
ATF_TP_ADD_TC(tp, once_idle);
|
ATF_TP_ADD_TC(tp, once_idle);
|
||||||
ATF_TP_ADD_TC(tp, reset);
|
ATF_TP_ADD_TC(tp, reset);
|
||||||
ATF_TP_ADD_TC(tp, purge);
|
ATF_TP_ADD_TC(tp, purge);
|
||||||
|
#else
|
||||||
|
ATF_TP_ADD_TC(tp, untested);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (atf_no_error());
|
return (atf_no_error());
|
||||||
|
Reference in New Issue
Block a user