/*
* Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id$ */
/*! \file */
#include <config.h>
#include <atf-c.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <dns/fixedname.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include "dnstest.h"
static void
const char *cond)
{
atf_tc_pass();
exit(0);
}
static void
setup_db() {
}
static void
close_db() {
}
dns_db_detach(&db1);
}
}
dns_db_detach(&db2);
}
}
/*
* Individual unit tests
*/
static void
dns_dbversion_t *v = NULL;
setup_db();
atf_tc_fail("dns_db_attachversion did not assert");
ATF_REQUIRE_EQ(v, v1);
ATF_REQUIRE_EQ(v, NULL);
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
atf_tc_fail("dns_db_closeversion did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
dns_rdatatype_soa, 0, 0, NULL,
atf_tc_fail("dns_db_find did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
&iterator);
atf_tc_fail("dns_db_allrdatasets did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
atf_tc_fail("dns_db_findrdataset did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
dns_rdatatype_soa, 0);
atf_tc_fail("dns_db_deleterdataset did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
atf_tc_fail("dns_db_dns_db_subtractrdataset did not assert");
/*
* 9.6 does support caching of a rdataset with no records so we get
* ISC_R_FAILURE rather then DNS_R_UNCHANGED.
*/
close_db();
dns_test_end();
}
}
}
atf_tc_set_md_var(tc, "descr", "check dns_db_subtractrdataset aborts with mis-matching db/version");
}
}
static void
setup_db();
fclose(f);
atf_tc_fail("dns_db_dump did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
0, NULL);
atf_tc_fail("dns_db_adddataset did not assert");
/*
* 9.6 does support caching of a rdataset with no record so we get
* ISC_R_FAILURE rather then ISC_R_SUCCESS.
*/
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
&salt_length);
atf_tc_fail("dns_db_dump did not assert");
close_db();
dns_test_end();
}
}
}
atf_tc_set_md_var(tc, "descr", "check dns_db_getnsec3parameters aborts with mis-matching db/version");
}
}
static void
isc_buffer_t b;
setup_db();
/*
* Create a dummy RRSIG record and set a resigning time.
*/
rrsig.originalttl = 0;
rrsig.timesigned = 0;
dns_rdatatype_rrsig, &rrsig, &b);
atf_tc_fail("dns_db_resigned did not assert");
close_db();
dns_test_end();
}
}
}
}
}
/*
* Main
*/
return (atf_no_error());
}