test dnsd: implement delayed responses

Add "Delay-A: ms", "Delay-AAAA: ms" and "Delay-HTTPS: ms" to the test
dnsd config and implement delayed response handling.

Add test_21_09 and test_21_10 to check that delayed responses connect
using the undelayed address family.

Closes #21299
This commit is contained in:
Stefan Eissing 2026-04-13 16:11:37 +02:00 committed by Daniel Stenberg
parent bcd94e2750
commit 86f1e5b3f6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 277 additions and 50 deletions

View file

@ -855,16 +855,17 @@ CURLcode config2setopts(struct OperationConfig *config,
if(result)
return result;
#ifndef DEBUGBUILD
/* On most modern OSes, exiting works thoroughly,
we clean everything up via exit(), so do not bother with slow
cleanups. Crappy ones might need to skip this.
Note: avoid having this setopt added to the --libcurl source
output. */
result = curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
if(result)
return result;
if(TRUE
#ifdef DEBUGBUILD
&& getenv("CURL_QUICK_EXIT")
#endif
) {
/* QUICK_EXIT allows for running threads to be detached and not
* joined. Preferably in non-debug runs. */
result = curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
if(result)
return result;
}
gen_trace_setopts(config, curl);

View file

@ -1917,9 +1917,15 @@ static CURLcode parallel_transfers(CURLSH *share)
if(!s->multi)
return CURLE_OUT_OF_MEMORY;
#ifndef DEBUGBUILD
(void)curl_multi_setopt(s->multi, CURLMOPT_QUICK_EXIT, 1L);
if(TRUE
#ifdef DEBUGBUILD
&& getenv("CURL_QUICK_EXIT")
#endif
) {
/* QUICK_EXIT allows for running threads to be detached and not
* joined. Preferably in non-debug runs. */
(void)curl_multi_setopt(s->multi, CURLMOPT_QUICK_EXIT, 1L);
}
(void)curl_multi_setopt(s->multi, CURLMOPT_NOTIFYFUNCTION, mnotify);
(void)curl_multi_setopt(s->multi, CURLMOPT_NOTIFYDATA, s);
(void)curl_multi_setopt(s->multi, CURLMOPT_MAX_HOST_CONNECTIONS, (long)