check that the result of dns_dbiterator_current is ISC_R_SUCCESS or DNS_R_NEWORIGIN
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user