#include <config.h>
#include <isc/buffer.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isc/task.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <dns/result.h>
#include <dns/zone.h>
Go to the source code of this file.
Defines | |
#define | CHECK(r) |
Functions | |
isc_result_t | dns_test_begin (FILE *logfile, isc_boolean_t create_managers) |
void | dns_test_end (void) |
isc_result_t | dns_test_makeview (const char *name, dns_view_t **viewp) |
isc_result_t | dns_test_makezone (const char *name, dns_zone_t **zonep, dns_view_t *view, isc_boolean_t keepview) |
isc_result_t | dns_test_setupzonemgr (void) |
isc_result_t | dns_test_managezone (dns_zone_t *zone) |
void | dns_test_releasezone (dns_zone_t *zone) |
void | dns_test_closezonemgr (void) |
void | dns_test_nap (isc_uint32_t usec) |
isc_result_t | dns_test_loaddb (dns_db_t **db, dns_dbtype_t dbtype, const char *origin, const char *testfile) |
Variables | |
isc_mem_t * | mctx |
isc_entropy_t * | ectx |
isc_log_t * | lctx |
isc_taskmgr_t * | taskmgr |
isc_task_t * | maintask |
isc_timermgr_t * | timermgr |
isc_socketmgr_t * | socketmgr |
dns_zonemgr_t * | zonemgr |
isc_boolean_t | app_running |
int | ncpus |
Definition in file dnstest.h.
#define CHECK | ( | r | ) |
Value:
do { \ result = (r); \ if (result != ISC_R_SUCCESS) \ goto cleanup; \ } while (0)
isc_result_t dns_test_begin | ( | FILE * | logfile, | |
isc_boolean_t | create_managers | |||
) |
Definition at line 111 of file dnstest.c.
References CHECK, cleanup(), create_managers(), dns_log_init(), dns_log_setcontext(), DNS_NAME_MAXWIRE, dns_result_register(), dns_test_end(), dst_active, dst_lib_init(), isc_logdestination::file, hash_active, isc_app_start(), ISC_ENTROPY_BLOCKING, isc_entropy_create(), isc_hash_create(), isc_log_create(), isc_log_createchannel(), ISC_LOG_DYNAMIC, isc_log_registercategories(), ISC_LOG_ROLLNEVER, isc_log_setcontext(), ISC_LOG_TOFILEDESC, isc_log_usechannel(), isc_mem_create(), isc_mem_debugging, ISC_MEM_DEBUGRECORD, ISC_R_FAILURE, ISC_R_SUCCESS, ISC_TRUE, isc_logfile::maximum_size, isc_logfile::name, isc_logfile::stream, and isc_logfile::versions.
Referenced by addrdataset(), allrdatasets(), ATF_TC_BODY(), attachversion(), closeversion(), deleterdataset(), dump(), find(), findrdataset(), getnsec3parameters(), resigned(), subtract(), test_create(), test_reverse(), test_seek(), test_seek_empty(), test_seek_nx(), and test_walk().
void dns_test_end | ( | void | ) |
Definition at line 168 of file dnstest.c.
References cleanup_managers(), dst_active, dst_lib_destroy(), hash_active, isc_entropy_detach(), ISC_FALSE, isc_hash_destroy(), isc_log_destroy(), and isc_mem_destroy().
Referenced by addrdataset(), allrdatasets(), ATF_TC_BODY(), attachversion(), closeversion(), deleterdataset(), dns_test_begin(), dump(), find(), findrdataset(), getnsec3parameters(), resigned(), subtract(), test_create(), test_reverse(), test_seek(), test_seek_empty(), test_seek_nx(), and test_walk().
isc_result_t dns_test_makeview | ( | const char * | name, | |
dns_view_t ** | viewp | |||
) |
Definition at line 192 of file dnstest.c.
References CHECK, cleanup(), dns_view_create(), dns_view_detach(), and ISC_R_SUCCESS.
isc_result_t dns_test_makezone | ( | const char * | name, | |
dns_zone_t ** | zonep, | |||
dns_view_t * | view, | |||
isc_boolean_t | keepview | |||
) |
Definition at line 218 of file dnstest.c.
References buffer, CHECK, cleanup(), dns_fixedname_init, dns_fixedname_name, dns_name_fromtext(), dns_rootname, dns_view_addzone(), dns_view_create(), dns_view_detach(), dns_zone_create(), dns_zone_detach(), dns_zone_master, dns_zone_setclass(), dns_zone_setorigin(), dns_zone_settype(), dns_zone_setview(), isc_buffer_add, isc_buffer_constinit, ISC_R_SUCCESS, ISC_TRUE, origin, dns_view::rdclass, and zone.
Referenced by ATF_TC_BODY().
isc_result_t dns_test_setupzonemgr | ( | void | ) |
Definition at line 263 of file dnstest.c.
References dns_zonemgr_create(), and REQUIRE.
Referenced by ATF_TC_BODY().
isc_result_t dns_test_managezone | ( | dns_zone_t * | zone | ) |
Definition at line 273 of file dnstest.c.
References dns_zonemgr_managezone(), dns_zonemgr_setsize(), ISC_R_SUCCESS, and REQUIRE.
Referenced by ATF_TC_BODY().
void dns_test_releasezone | ( | dns_zone_t * | zone | ) |
Definition at line 286 of file dnstest.c.
References dns_zonemgr_releasezone(), and REQUIRE.
Referenced by ATF_TC_BODY().
void dns_test_closezonemgr | ( | void | ) |
Definition at line 292 of file dnstest.c.
References dns_zonemgr_detach(), dns_zonemgr_shutdown(), and REQUIRE.
Referenced by ATF_TC_BODY().
void dns_test_nap | ( | isc_uint32_t | usec | ) |
isc_result_t dns_test_loaddb | ( | dns_db_t ** | db, | |
dns_dbtype_t | dbtype, | |||
const char * | origin, | |||
const char * | testfile | |||
) |
Definition at line 322 of file dnstest.c.
References dns_db_create(), dns_db_load(), dns_fixedname_init, dns_fixedname_name, dns_name_fromstring(), fixed, ISC_R_SUCCESS, and name.
Referenced by test_create(), test_reverse(), test_seek(), test_seek_empty(), test_seek_nx(), and test_walk().
Definition at line 41 of file isctest.c.
Referenced by dns_client_create(), dns_loadctx_detach(), dns_master_loadbuffer(), dns_master_loadbufferinc(), dns_master_loadfile5(), dns_master_loadfileinc5(), dns_master_loadlexer(), dns_master_loadlexerinc(), dns_master_loadstream(), dns_master_loadstreaminc(), ISC_LIST(), load_quantum(), loadctx_create(), and main().
Definition at line 44 of file isctest.c.
Referenced by ATF_TC_BODY(), ISC_LIST(), make_dispatchset(), and waitbody().
int ncpus |
Definition at line 46 of file isctest.c.
Referenced by create_managers(), isc_os_ncpus(), and isc_test_begin().