From 4165e874de3e0cd606de1237484828d870518630 Mon Sep 17 00:00:00 2001 From: Sara Dickinson Date: Fri, 18 Dec 2015 16:11:35 +0000 Subject: [PATCH] Fix tests --- src/stub.c | 2 ++ src/test/tests_stub_async.c | 3 --- src/test/tests_transports.sh | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/stub.c b/src/stub.c index 375efe24..eea83cc1 100644 --- a/src/stub.c +++ b/src/stub.c @@ -1391,6 +1391,8 @@ upstream_read_cb(void *userarg) /* More to read/write for syncronous lookups? */ if (netreq->event.read_cb) upstream_reschedule_netreq_events(upstream, netreq); + + _getdns_check_dns_req_complete(netreq->owner); } } diff --git a/src/test/tests_stub_async.c b/src/test/tests_stub_async.c index ceaa54d6..a5b3c995 100644 --- a/src/test/tests_stub_async.c +++ b/src/test/tests_stub_async.c @@ -47,7 +47,6 @@ #define TRANSPORT_PIPELINE "pipeline" #define TRANSPORT_TLS_KEEPOPEN "tls" #define TRANSPORT_TLS_TCP_KEEPOPEN "dns-over-tls" -#define TRANSPORT_STARTTLS_TCP_KEEPOPEN "starttls" #define RESOLUTION_STUB "stub" #define RESOLUTION_REC "rec" @@ -111,8 +110,6 @@ main(int argc, char** argv) getdns_context_set_dns_transport(this_context, GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN); else if (strncmp(transport, TRANSPORT_TLS_TCP_KEEPOPEN, 12) == 0) getdns_context_set_dns_transport(this_context, GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN); - else if (strncmp(transport, TRANSPORT_STARTTLS_TCP_KEEPOPEN, 8) == 0) - getdns_context_set_dns_transport(this_context, GETDNS_TRANSPORT_STARTTLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN); else if (strncmp(transport, TRANSPORT_UDP_TCP, 3) != 0) { fprintf(stderr, "Invalid transport %s, must be one of udp, udp_tcp, tcp or pipeline\n", transport); exit(EXIT_FAILURE); diff --git a/src/test/tests_transports.sh b/src/test/tests_transports.sh index 9912edab..9cf7f79d 100755 --- a/src/test/tests_transports.sh +++ b/src/test/tests_transports.sh @@ -49,7 +49,7 @@ usage () { echo "it can be used to check the basic functionality for now. It is recommended that" echo "local or known test servers are used, but it should work with the default servers:" echo " - Google Open DNS for TCP and UDP only " - echo "- the getdnsapi.net test server Open Resolver for TLS, STARTTLS, TCP and UDP" + echo "- the getdnsapi.net test server Open Resolver for TLS, TCP and UDP" echo "NOTE: By default this script assumes it is located in the same directory" echo "as the getdns_query binary. If it is not, then the location of the binary" echo "can be specified via the command line option." @@ -57,7 +57,7 @@ usage () { echo "usage: test_transport.sh" echo " -p path to getdns_query binary" echo " -s server configured for only TCP and UDP" - echo " -t server configured for TLS, STARTTLS, TCP and UDP" + echo " -t server configured for TLS, TCP and UDP" echo " (This must include the hostname e.g. 185.49.141.38~getdnsapi.net)" } @@ -79,7 +79,6 @@ GOOD_QUERIES=( "-s -A -q getdnsapi.net -l T @${SERVER_IP} " "-s -A -q getdnsapi.net -l L @${TLS_SERVER_IP_NO_NAME}" "-s -A -q getdnsapi.net -l L -m @${TLS_SERVER_IP}") -#"-s -A -q getdnsapi.net -l S @${TLS_SERVER_IP_NO_NAME}") GOOD_FALLBACK_QUERIES=( "-s -A -q getdnsapi.net -l LT @${SERVER_IP}" @@ -91,7 +90,6 @@ GOOD_FALLBACK_QUERIES=( NOT_AVAILABLE_QUERIES=( "-s -A -q getdnsapi.net -l L @${SERVER_IP} " -#"-s -A -q getdnsapi.net -l S @${SERVER_IP} " "-s -A -q getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} " "-s -G -q DNSKEY getdnsapi.net -l U @${SERVER_IP} -b 512 -D")