dbiterator_test.c File Reference

#include <config.h>
#include <atf-c.h>
#include <unistd.h>
#include <stdlib.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/name.h>
#include "dnstest.h"

Go to the source code of this file.

Defines

#define BUFLEN   255
#define BIGBUFLEN   (64 * 1024)
#define TEST_ORIGIN   "test"

Functions

static isc_result_t make_name (const char *src, dns_name_t *name)
static void test_create (const atf_tc_t *tc)
 ATF_TC (create)
 ATF_TC_HEAD (create, tc)
 ATF_TC_BODY (create, tc)
 ATF_TC (create_nsec3)
 ATF_TC_HEAD (create_nsec3, tc)
 ATF_TC_BODY (create_nsec3, tc)
static void test_walk (const atf_tc_t *tc)
 ATF_TC (walk)
 ATF_TC_HEAD (walk, tc)
 ATF_TC_BODY (walk, tc)
 ATF_TC (walk_nsec3)
 ATF_TC_HEAD (walk_nsec3, tc)
 ATF_TC_BODY (walk_nsec3, tc)
static void test_reverse (const atf_tc_t *tc)
 ATF_TC (reverse)
 ATF_TC_HEAD (reverse, tc)
 ATF_TC_BODY (reverse, tc)
 ATF_TC (reverse_nsec3)
 ATF_TC_HEAD (reverse_nsec3, tc)
 ATF_TC_BODY (reverse_nsec3, tc)
static void test_seek (const atf_tc_t *tc)
 ATF_TC (seek)
 ATF_TC_HEAD (seek, tc)
 ATF_TC_BODY (seek, tc)
 ATF_TC (seek_nsec3)
 ATF_TC_HEAD (seek_nsec3, tc)
 ATF_TC_BODY (seek_nsec3, tc)
static void test_seek_empty (const atf_tc_t *tc)
 ATF_TC (seek_empty)
 ATF_TC_HEAD (seek_empty, tc)
 ATF_TC_BODY (seek_empty, tc)
 ATF_TC (seek_empty_nsec3)
 ATF_TC_HEAD (seek_empty_nsec3, tc)
 ATF_TC_BODY (seek_empty_nsec3, tc)
static void test_seek_nx (const atf_tc_t *tc)
 ATF_TC (seek_nx)
 ATF_TC_HEAD (seek_nx, tc)
 ATF_TC_BODY (seek_nx, tc)
 ATF_TC (seek_nx_nsec3)
 ATF_TC_HEAD (seek_nx_nsec3, tc)
 ATF_TC_BODY (seek_nx_nsec3, tc)
 ATF_TP_ADD_TCS (tp)


Detailed Description

Definition in file dbiterator_test.c.


Define Documentation

#define BUFLEN   255

Definition at line 38 of file dbiterator_test.c.

#define BIGBUFLEN   (64 * 1024)

Definition at line 39 of file dbiterator_test.c.

#define TEST_ORIGIN   "test"

Definition at line 40 of file dbiterator_test.c.


Function Documentation

static isc_result_t make_name ( const char *  src,
dns_name_t name 
) [static]

Definition at line 43 of file dbiterator_test.c.

References dns_name_fromtext(), dns_rootname, isc_buffer_add, and isc_buffer_constinit.

Referenced by test_seek(), test_seek_empty(), and test_seek_nx().

static void test_create ( const atf_tc_t *  tc  )  [static]

Definition at line 56 of file dbiterator_test.c.

References dns_db_createiterator(), dns_db_detach(), dns_dbiterator_destroy(), dns_dbtype_cache, dns_test_begin(), dns_test_end(), dns_test_loaddb(), ISC_FALSE, ISC_R_SUCCESS, and TEST_ORIGIN.

ATF_TC ( create   ) 

ATF_TC_HEAD ( create  ,
tc   
)

Definition at line 77 of file dbiterator_test.c.

ATF_TC_BODY ( create  ,
tc   
)

Definition at line 81 of file dbiterator_test.c.

References test_create().

ATF_TC ( create_nsec3   ) 

ATF_TC_HEAD ( create_nsec3  ,
tc   
)

Definition at line 86 of file dbiterator_test.c.

ATF_TC_BODY ( create_nsec3  ,
tc   
)

Definition at line 90 of file dbiterator_test.c.

References test_create().

static void test_walk ( const atf_tc_t *  tc  )  [static]

Definition at line 96 of file dbiterator_test.c.

References dns_db_createiterator(), dns_db_detach(), dns_db_detachnode(), dns_dbiterator_current(), dns_dbiterator_destroy(), dns_dbiterator_first(), dns_dbiterator_next(), dns_dbtype_cache, dns_fixedname_init, dns_fixedname_name, DNS_R_NEWORIGIN, dns_test_begin(), dns_test_end(), dns_test_loaddb(), ISC_FALSE, ISC_R_SUCCESS, name, TEST_ORIGIN, and UNUSED.

Referenced by ATF_TC_BODY().

ATF_TC ( walk   ) 

ATF_TC_HEAD ( walk  ,
tc   
)

Definition at line 139 of file dbiterator_test.c.

ATF_TC_BODY ( walk  ,
tc   
)

Definition at line 144 of file dbiterator_test.c.

References test_walk().

ATF_TC ( walk_nsec3   ) 

ATF_TC_HEAD ( walk_nsec3  ,
tc   
)

Definition at line 149 of file dbiterator_test.c.

ATF_TC_BODY ( walk_nsec3  ,
tc   
)

Definition at line 154 of file dbiterator_test.c.

References test_walk().

static void test_reverse ( const atf_tc_t *  tc  )  [static]

Definition at line 159 of file dbiterator_test.c.

References dns_db_createiterator(), dns_db_detach(), dns_db_detachnode(), dns_dbiterator_current(), dns_dbiterator_destroy(), dns_dbiterator_last(), dns_dbiterator_prev(), dns_dbtype_cache, dns_fixedname_init, dns_fixedname_name, DNS_R_NEWORIGIN, dns_test_begin(), dns_test_end(), dns_test_loaddb(), ISC_FALSE, ISC_R_SUCCESS, name, TEST_ORIGIN, and UNUSED.

Referenced by ATF_TC_BODY().

ATF_TC ( reverse   ) 

ATF_TC_HEAD ( reverse  ,
tc   
)

Definition at line 202 of file dbiterator_test.c.

ATF_TC_BODY ( reverse  ,
tc   
)

Definition at line 206 of file dbiterator_test.c.

References test_reverse().

ATF_TC ( reverse_nsec3   ) 

ATF_TC_HEAD ( reverse_nsec3  ,
tc   
)

Definition at line 211 of file dbiterator_test.c.

ATF_TC_BODY ( reverse_nsec3  ,
tc   
)

Definition at line 215 of file dbiterator_test.c.

References test_reverse().

static void test_seek ( const atf_tc_t *  tc  )  [static]

Definition at line 220 of file dbiterator_test.c.

References dns_db_createiterator(), dns_db_detach(), dns_db_detachnode(), dns_dbiterator_current(), dns_dbiterator_destroy(), dns_dbiterator_next(), dns_dbiterator_seek(), dns_dbtype_cache, dns_fixedname_init, dns_fixedname_name, DNS_R_NEWORIGIN, dns_test_begin(), dns_test_end(), dns_test_loaddb(), ISC_FALSE, ISC_R_SUCCESS, make_name(), name, TEST_ORIGIN, and UNUSED.

Referenced by ATF_TC_BODY().

ATF_TC ( seek   ) 

ATF_TC_HEAD ( seek  ,
tc   
)

Definition at line 270 of file dbiterator_test.c.

ATF_TC_BODY ( seek  ,
tc   
)

Definition at line 276 of file dbiterator_test.c.

References test_seek().

ATF_TC ( seek_nsec3   ) 

ATF_TC_HEAD ( seek_nsec3  ,
tc   
)

Definition at line 281 of file dbiterator_test.c.

ATF_TC_BODY ( seek_nsec3  ,
tc   
)

Definition at line 287 of file dbiterator_test.c.

References test_seek().

static void test_seek_empty ( const atf_tc_t *  tc  )  [static]

Definition at line 295 of file dbiterator_test.c.

References dns_db_createiterator(), dns_db_detach(), dns_dbiterator_destroy(), dns_dbiterator_seek(), dns_dbtype_cache, dns_fixedname_init, dns_fixedname_name, dns_test_begin(), dns_test_end(), dns_test_loaddb(), ISC_FALSE, ISC_R_NOTFOUND, ISC_R_SUCCESS, make_name(), TEST_ORIGIN, and UNUSED.

Referenced by ATF_TC_BODY().

ATF_TC ( seek_empty   ) 

ATF_TC_HEAD ( seek_empty  ,
tc   
)

Definition at line 329 of file dbiterator_test.c.

ATF_TC_BODY ( seek_empty  ,
tc   
)

Definition at line 334 of file dbiterator_test.c.

References test_seek_empty().

ATF_TC ( seek_empty_nsec3   ) 

ATF_TC_HEAD ( seek_empty_nsec3  ,
tc   
)

Definition at line 339 of file dbiterator_test.c.

ATF_TC_BODY ( seek_empty_nsec3  ,
tc   
)

Definition at line 344 of file dbiterator_test.c.

References test_seek_empty().

static void test_seek_nx ( const atf_tc_t *  tc  )  [static]

Definition at line 352 of file dbiterator_test.c.

References dns_db_createiterator(), dns_db_detach(), dns_dbiterator_destroy(), dns_dbiterator_seek(), dns_dbtype_cache, dns_fixedname_init, dns_fixedname_name, dns_test_begin(), dns_test_end(), dns_test_loaddb(), ISC_FALSE, ISC_R_NOTFOUND, ISC_R_SUCCESS, make_name(), TEST_ORIGIN, and UNUSED.

Referenced by ATF_TC_BODY().

ATF_TC ( seek_nx   ) 

ATF_TC_HEAD ( seek_nx  ,
tc   
)

Definition at line 386 of file dbiterator_test.c.

ATF_TC_BODY ( seek_nx  ,
tc   
)

Definition at line 391 of file dbiterator_test.c.

References test_seek_nx().

ATF_TC ( seek_nx_nsec3   ) 

ATF_TC_HEAD ( seek_nx_nsec3  ,
tc   
)

Definition at line 396 of file dbiterator_test.c.

ATF_TC_BODY ( seek_nx_nsec3  ,
tc   
)

Definition at line 401 of file dbiterator_test.c.

References test_seek_nx().

ATF_TP_ADD_TCS ( tp   ) 

Definition at line 408 of file dbiterator_test.c.


Generated on Tue Apr 28 17:41:13 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha