ATF_TC_BODY(max_iterations, tc) { isc_result_t result; UNUSED(tc); result = dns_test_begin(NULL, ISC_FALSE); ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); iteration_test("testdata/nsec3/1024.db", 150); iteration_test("testdata/nsec3/2048.db", 500); iteration_test("testdata/nsec3/4096.db", 2500); iteration_test("testdata/nsec3/min-1024.db", 150); iteration_test("testdata/nsec3/min-2048.db", 500); dns_test_end(); }
int main(int argc, char **argv) { bool long_run = false; int opt; unsigned int seed = time(NULL); while ((opt = getopt(argc, argv, "ls:v")) != -1) { if (opt == 'l') long_run = true; else if (opt == 's') seed = strtoul(optarg, NULL, 0); else if (opt == 'v') test_verbose++; } printf("random seed %u\n", seed); srand(seed); printf("running tests\n"); rcu_register_thread(); radix_tree_init(); xarray_tests(); regression1_test(); regression2_test(); regression3_test(); regression4_test(); iteration_test(0, 10 + 90 * long_run); iteration_test(7, 10 + 90 * long_run); single_thread_tests(long_run); /* Free any remaining preallocated nodes */ radix_tree_cpu_dead(0); benchmark(); rcu_barrier(); printv(2, "after rcu_barrier: %d allocated, preempt %d\n", nr_allocated, preempt_count); rcu_unregister_thread(); printf("tests completed\n"); exit(0); }