summaryrefslogtreecommitdiff
path: root/src/test/test_dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-01 11:30:29 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-01 11:30:29 -0400
commit58e1c6dd868704520fcbd7d8d8bdd7f8dd6f5c58 (patch)
tree21a45db25727048e78eed67dd92e97423d1497c0 /src/test/test_dns.c
parent8500f0e4e179280ebb8d6c1f3342eff21a4fdac2 (diff)
parent0151e1d1586b2e96dffb667cf2825e4fe993b62e (diff)
downloadtor-58e1c6dd868704520fcbd7d8d8bdd7f8dd6f5c58.tar.gz
tor-58e1c6dd868704520fcbd7d8d8bdd7f8dd6f5c58.zip
Merge remote-tracking branch 'public/bug19769_19025_029' into maint-0.2.9
Diffstat (limited to 'src/test/test_dns.c')
-rw-r--r--src/test/test_dns.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/test/test_dns.c b/src/test/test_dns.c
index 8346c0a33f..6a8e92cb47 100644
--- a/src/test/test_dns.c
+++ b/src/test/test_dns.c
@@ -16,30 +16,11 @@ NS(test_main)(void *arg)
{
(void)arg;
- uint32_t ttl_mid = MIN_DNS_TTL / 2 + MAX_DNS_TTL / 2;
+ uint32_t ttl_mid = MIN_DNS_TTL_AT_EXIT / 2 + MAX_DNS_TTL_AT_EXIT / 2;
- tt_int_op(dns_clip_ttl(MIN_DNS_TTL - 1),==,MIN_DNS_TTL);
- tt_int_op(dns_clip_ttl(ttl_mid),==,ttl_mid);
- tt_int_op(dns_clip_ttl(MAX_DNS_TTL + 1),==,MAX_DNS_TTL);
-
- done:
- return;
-}
-
-#undef NS_SUBMODULE
-
-#define NS_SUBMODULE expiry_ttl
-
-static void
-NS(test_main)(void *arg)
-{
- (void)arg;
-
- uint32_t ttl_mid = MIN_DNS_TTL / 2 + MAX_DNS_ENTRY_AGE / 2;
-
- tt_int_op(dns_get_expiry_ttl(MIN_DNS_TTL - 1),==,MIN_DNS_TTL);
- tt_int_op(dns_get_expiry_ttl(ttl_mid),==,ttl_mid);
- tt_int_op(dns_get_expiry_ttl(MAX_DNS_ENTRY_AGE + 1),==,MAX_DNS_ENTRY_AGE);
+ tt_int_op(dns_clip_ttl(MIN_DNS_TTL_AT_EXIT - 1),==,MIN_DNS_TTL_AT_EXIT);
+ tt_int_op(dns_clip_ttl(ttl_mid),==,MAX_DNS_TTL_AT_EXIT);
+ tt_int_op(dns_clip_ttl(MAX_DNS_TTL_AT_EXIT + 1),==,MAX_DNS_TTL_AT_EXIT);
done:
return;
@@ -749,7 +730,6 @@ NS(test_main)(void *arg)
struct testcase_t dns_tests[] = {
TEST_CASE(clip_ttl),
- TEST_CASE(expiry_ttl),
TEST_CASE(resolve),
TEST_CASE_ASPECT(resolve_impl, addr_is_ip_no_need_to_resolve),
TEST_CASE_ASPECT(resolve_impl, non_exit),