test1515: add tracing and more debug info
Test failed on some Windows CI and log files did not really tell why. Add more output. Closes #15140
This commit is contained in:
parent
28230bec1f
commit
e1f93beffe
@ -402,7 +402,7 @@ lib1513_LDADD = $(TESTUTIL_LIBS)
|
||||
lib1514_SOURCES = lib1514.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
|
||||
lib1514_LDADD = $(TESTUTIL_LIBS)
|
||||
|
||||
lib1515_SOURCES = lib1515.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
|
||||
lib1515_SOURCES = lib1515.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(WARNLESS)
|
||||
lib1515_LDADD = $(TESTUTIL_LIBS)
|
||||
|
||||
lib1517_SOURCES = lib1517.c $(SUPPORTFILES)
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "testtrace.h"
|
||||
#include "testutil.h"
|
||||
#include "warnless.h"
|
||||
#include "memdebug.h"
|
||||
@ -37,18 +38,6 @@
|
||||
|
||||
#define DNS_TIMEOUT 1
|
||||
|
||||
static int debug_callback(CURL *curl, curl_infotype info, char *msg,
|
||||
size_t len, void *ptr)
|
||||
{
|
||||
(void)curl;
|
||||
(void)ptr;
|
||||
|
||||
if(info == CURLINFO_TEXT)
|
||||
fprintf(stderr, "debug: %.*s", (int) len, msg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CURLcode do_one_request(CURLM *m, char *URL, char *resolve)
|
||||
{
|
||||
CURL *curls;
|
||||
@ -64,10 +53,14 @@ static CURLcode do_one_request(CURLM *m, char *URL, char *resolve)
|
||||
|
||||
easy_setopt(curls, CURLOPT_URL, URL);
|
||||
easy_setopt(curls, CURLOPT_RESOLVE, resolve_list);
|
||||
easy_setopt(curls, CURLOPT_DEBUGFUNCTION, debug_callback);
|
||||
easy_setopt(curls, CURLOPT_VERBOSE, 1);
|
||||
easy_setopt(curls, CURLOPT_DNS_CACHE_TIMEOUT, DNS_TIMEOUT);
|
||||
|
||||
libtest_debug_config.nohex = 1;
|
||||
libtest_debug_config.tracetime = 1;
|
||||
easy_setopt(curls, CURLOPT_DEBUGDATA, &libtest_debug_config);
|
||||
easy_setopt(curls, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
|
||||
easy_setopt(curls, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
multi_add_handle(m, curls);
|
||||
multi_perform(m, &still_running);
|
||||
|
||||
@ -127,6 +120,7 @@ CURLcode test(char *URL)
|
||||
start_test_timing();
|
||||
|
||||
global_init(CURL_GLOBAL_ALL);
|
||||
curl_global_trace("all");
|
||||
multi_init(multi);
|
||||
|
||||
for(i = 1; i <= count; i++) {
|
||||
@ -137,6 +131,7 @@ CURLcode test(char *URL)
|
||||
/* second request must succeed like the first one */
|
||||
res = do_one_request(multi, target_url, dns_entry);
|
||||
if(res != CURLE_OK) {
|
||||
fprintf(stderr, "request %s failed with %d\n", target_url, res);
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user