mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-25 10:59:35 -05:00
check that the result of dns_dbiterator_current is ISC_R_SUCCESS or DNS_R_NEWORIGIN
This commit is contained in:
parent
56effd2e3f
commit
d64e3b29bd
1 changed files with 10 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dbiterator_test.c,v 1.4 2011/08/23 23:54:00 tbox Exp $ */
|
||||
/* $Id: dbiterator_test.c,v 1.5 2011/08/29 23:44:07 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -161,6 +161,9 @@ test_walk(const atf_tc_t *tc) {
|
|||
result == ISC_R_SUCCESS;
|
||||
result = dns_dbiterator_next(iter)) {
|
||||
result = dns_dbiterator_current(iter, &node, name);
|
||||
if (result == DNS_R_NEWORIGIN)
|
||||
result = ISC_R_SUCCESS;
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
dns_db_detachnode(db, &node);
|
||||
i++;
|
||||
}
|
||||
|
|
@ -221,6 +224,9 @@ static void test_reverse(const atf_tc_t *tc) {
|
|||
result == ISC_R_SUCCESS;
|
||||
result = dns_dbiterator_prev(iter)) {
|
||||
result = dns_dbiterator_current(iter, &node, name);
|
||||
if (result == DNS_R_NEWORIGIN)
|
||||
result = ISC_R_SUCCESS;
|
||||
ATF_CHECK_EQ(result, ISC_R_SUCCESS);
|
||||
dns_db_detachnode(db, &node);
|
||||
i++;
|
||||
}
|
||||
|
|
@ -285,6 +291,9 @@ static void test_seek(const atf_tc_t *tc) {
|
|||
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
result = dns_dbiterator_current(iter, &node, name);
|
||||
if (result == DNS_R_NEWORIGIN)
|
||||
result = ISC_R_SUCCESS;
|
||||
ATF_CHECK_EQ(result, ISC_R_SUCCESS);
|
||||
dns_db_detachnode(db, &node);
|
||||
result = dns_dbiterator_next(iter);
|
||||
i++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue