zt_test.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2011, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id$ */
/*! \file */
#include <config.h>
#include <atf-c.h>
#include <unistd.h>
#include "dnstest.h"
struct args {
void *arg1;
void *arg2;
};
/*
* Helper functions
*/
static isc_result_t
*nzones += 1;
return (ISC_R_SUCCESS);
}
static isc_result_t
/* We treat zt as a pointer to a boolean for testing purposes */
return (ISC_R_SUCCESS);
}
static isc_result_t
return (ISC_R_SUCCESS);
}
static void
}
static void
}
/*
* Individual unit tests
*/
}
int nzones = 0;
ATF_CHECK_EQ(0, nzones);
/* These steps are necessary so the zone can be detached properly */
/* The view was left attached in dns_test_makezone() */
dns_test_end();
}
}
int i = 0;
isc_app_run();
dns_test_nap(1000);
/* The zone should now be loaded; test it */
dns_db_detach(&db);
dns_test_end();
}
}
int i = 0;
/* This one will fail to load */
isc_app_run();
while (!done && i++ < 5000)
dns_test_nap(1000);
/* Both zones should now be loaded; test them */
dns_db_detach(&db);
dns_db_detach(&db);
dns_test_end();
}
/*
* Main
*/
ATF_TP_ADD_TCS(tp) {
return (atf_no_error());
}