#include <config.h>
#include <time.h>
#include <unistd.h>
#include <isc/app.h>
#include <isc/buffer.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/mem.h>
#include <isc/os.h>
#include <isc/string.h>
#include <isc/socket.h>
#include <isc/task.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <dns/db.h>
#include <dns/fixedname.h>
#include <dns/log.h>
#include <dns/name.h>
#include <dns/result.h>
#include <dns/view.h>
#include <dns/zone.h>
#include "dnstest.h"
Go to the source code of this file.
Definition in file dnstest.c.
static void cleanup_managers | ( | void | ) | [static] |
Definition at line 77 of file dnstest.c.
References app_running, isc_app_finish(), isc_socketmgr_destroy(), isc_task_destroy(), isc_taskmgr_destroy(), and isc_timermgr_destroy().
static isc_result_t create_managers | ( | void | ) | [static] |
Definition at line 91 of file dnstest.c.
References CHECK, cleanup(), cleanup_managers(), isc_os_ncpus(), ISC_R_SUCCESS, isc_socketmgr_create(), isc_task_create(), isc_taskmgr_create(), isc_timermgr_create(), and ncpus.
isc_result_t dns_test_begin | ( | FILE * | logfile, | |
isc_boolean_t | start_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().
isc_entropy_t* ectx = NULL |
isc_taskmgr_t* taskmgr = NULL |
isc_task_t* maintask = NULL |
isc_timermgr_t* timermgr = NULL |
isc_socketmgr_t* socketmgr = NULL |
dns_zonemgr_t* zonemgr = NULL |
isc_boolean_t app_running = ISC_FALSE |
isc_boolean_t hash_active = ISC_FALSE [static] |
isc_boolean_t dst_active = ISC_FALSE [static] |
isc_logcategory_t categories[] [static] |