diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c index 8d1a405718ddc0a1eb5b56658ed0c2a289b159b1..01a382e8236c57c923cc6b66d6e0dc8f292fafd2 100644 --- a/tests/libtest/lib1501.c +++ b/tests/libtest/lib1501.c @@ -98,13 +98,13 @@ int test(char *URL) abort_on_test_timeout(); fprintf(stderr, "ping\n"); - gettimeofday(&before, 0); + before = tutil_tvnow(); multi_perform(mhandle, &still_running); abort_on_test_timeout(); - gettimeofday(&after, 0); + after = tutil_tvnow(); e = elapsed(&before, &after); fprintf(stderr, "pong = %d\n", e); diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index 641b9b6df9fe454a2d88442c2a904ccbb5cbe1dd..952efb4ed90d91bfe651c5748c8f24ed59c2a4e3 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -133,7 +133,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp) (void)multi; /* unused */ if (timeout_ms != -1) { - gettimeofday(timeout, 0); + *timeout = tutil_tvnow(); timeout->tv_usec += timeout_ms * 1000; } else { @@ -173,8 +173,7 @@ static int getMicroSecondTimeout(struct timeval* timeout) { struct timeval now; ssize_t result; - - gettimeofday(&now, 0); + now = tutil_tvnow(); result = (timeout->tv_sec - now.tv_sec) * 1000000 + timeout->tv_usec - now.tv_usec; if (result < 0) diff --git a/tests/libtest/libauthretry.c b/tests/libtest/libauthretry.c index 78b2775f99fa3a28b032c687c03d731bf59e32ba..b7d36fe1a5e62e4de1626ecdb717031822b075c9 100644 --- a/tests/libtest/libauthretry.c +++ b/tests/libtest/libauthretry.c @@ -25,7 +25,7 @@ */ #include "test.h" - +#include "strequal.h" #include "memdebug.h" static int send_request(CURL *curl, const char *url, int seq, @@ -72,11 +72,11 @@ static long parse_auth_name(const char *arg) { if (!arg) return CURLAUTH_NONE; - if (strcasecmp(arg, "basic") == 0) + if (strequal(arg, "basic") == 0) return CURLAUTH_BASIC; - if (strcasecmp(arg, "digest") == 0) + if (strequal(arg, "digest") == 0) return CURLAUTH_DIGEST; - if (strcasecmp(arg, "ntlm") == 0) + if (strequal(arg, "ntlm") == 0) return CURLAUTH_NTLM; return CURLAUTH_NONE; } diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c index 64602e065f3796d7bc7b6cd8ec90e7f4e9adac2d..c977d2105360ba853b7fe5a46573abf497db9a43 100644 --- a/tests/libtest/testtrace.c +++ b/tests/libtest/testtrace.c @@ -22,6 +22,9 @@ #include "test.h" +#define _MPRINTF_REPLACE /* use our functions only */ +#include + #include "testutil.h" #include "testtrace.h" #include "memdebug.h"