From: Viktor Szakats Date: Mon, 23 Jun 2025 08:15:16 +0000 (+0200) Subject: tests: drop unused or redundant includes X-Git-Tag: curl-8_15_0~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2636828eee3ea87635a04b680e0fa5d0c6a94c71;p=thirdparty%2Fcurl.git tests: drop unused or redundant includes Closes #17717 --- diff --git a/tests/client/first.h b/tests/client/first.h index feeb52871a..3c13338297 100644 --- a/tests/client/first.h +++ b/tests/client/first.h @@ -38,9 +38,6 @@ extern const struct entry_s s_entries[]; #include "curlx.h" -#include /* for calloc(), free(), strtol() */ -#include /* for strchr(), strcmp() */ - #define ERR() \ do { \ curl_mfprintf(stderr, "something unexpected went wrong - bailing out!\n");\ diff --git a/tests/client/h2_pausing.c b/tests/client/h2_pausing.c index 5ee360c463..d2e90cd483 100644 --- a/tests/client/h2_pausing.c +++ b/tests/client/h2_pausing.c @@ -25,8 +25,6 @@ */ #include "first.h" -#include - static void usage_h2_pausing(const char *msg) { if(msg) diff --git a/tests/libtest/first.c b/tests/libtest/first.c index 00ff37558b..0ca736668b 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -24,12 +24,10 @@ #include "first.h" #ifdef HAVE_LOCALE_H -# include /* for setlocale() */ +#include /* for setlocale() */ #endif #include "memdebug.h" -#include "curlx/timediff.h" -#include "curlx/binmode.h" int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc, struct timeval *tv) diff --git a/tests/libtest/lib1485.c b/tests/libtest/lib1485.c index b5908ad335..50c851c640 100644 --- a/tests/libtest/lib1485.c +++ b/tests/libtest/lib1485.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" struct t1485_transfer_status { diff --git a/tests/libtest/lib1500.c b/tests/libtest/lib1500.c index a193870c37..418db89503 100644 --- a/tests/libtest/lib1500.c +++ b/tests/libtest/lib1500.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1500(char *URL) diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c index 7ad3c7c999..79f8353a61 100644 --- a/tests/libtest/lib1501.c +++ b/tests/libtest/lib1501.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - #include "memdebug.h" static CURLcode test_lib1501(char *URL) diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c index 51d33afa65..39a7387430 100644 --- a/tests/libtest/lib1502.c +++ b/tests/libtest/lib1502.c @@ -31,9 +31,6 @@ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1502(char *URL) diff --git a/tests/libtest/lib1506.c b/tests/libtest/lib1506.c index 161c81c818..764ca3fced 100644 --- a/tests/libtest/lib1506.c +++ b/tests/libtest/lib1506.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1506(char *URL) diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c index c18bd577ee..4588f2af48 100644 --- a/tests/libtest/lib1507.c +++ b/tests/libtest/lib1507.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "timediff.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib1508.c b/tests/libtest/lib1508.c index 1769b5327d..d07bb28d8e 100644 --- a/tests/libtest/lib1508.c +++ b/tests/libtest/lib1508.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1508(char *URL) diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c index 7039572563..1cc76845cb 100644 --- a/tests/libtest/lib1509.c +++ b/tests/libtest/lib1509.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" size_t WriteOutput(char *ptr, size_t size, size_t nmemb, void *stream); diff --git a/tests/libtest/lib1510.c b/tests/libtest/lib1510.c index 26cea287b7..13ee0b724e 100644 --- a/tests/libtest/lib1510.c +++ b/tests/libtest/lib1510.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1510(char *URL) diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c index e65c33975c..473c2e36bd 100644 --- a/tests/libtest/lib1515.c +++ b/tests/libtest/lib1515.c @@ -31,7 +31,6 @@ #include "first.h" #include "testtrace.h" -#include "testutil.h" #include "memdebug.h" #define DNS_TIMEOUT 1L diff --git a/tests/libtest/lib1522.c b/tests/libtest/lib1522.c index 750ecc9b0b..f714b9f555 100644 --- a/tests/libtest/lib1522.c +++ b/tests/libtest/lib1522.c @@ -26,7 +26,6 @@ /* test case and code based on https://github.com/curl/curl/issues/2847 */ #include "testtrace.h" -#include "testutil.h" #include "memdebug.h" static int sockopt_callback(void *clientp, curl_socket_t curlfd, diff --git a/tests/libtest/lib1523.c b/tests/libtest/lib1523.c index 728a4c94b7..13f3755326 100644 --- a/tests/libtest/lib1523.c +++ b/tests/libtest/lib1523.c @@ -25,7 +25,6 @@ /* test case and code based on https://github.com/curl/curl/issues/3927 */ -#include "testutil.h" #include "memdebug.h" static int dload_progress_cb(void *a, curl_off_t b, curl_off_t c, diff --git a/tests/libtest/lib1531.c b/tests/libtest/lib1531.c index 0a9266a645..38626222d9 100644 --- a/tests/libtest/lib1531.c +++ b/tests/libtest/lib1531.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" -#include "timediff.h" #include "memdebug.h" static CURLcode test_lib1531(char *URL) diff --git a/tests/libtest/lib1540.c b/tests/libtest/lib1540.c index 26af4771eb..b53a3e847d 100644 --- a/tests/libtest/lib1540.c +++ b/tests/libtest/lib1540.c @@ -24,7 +24,6 @@ #include "first.h" #include "testtrace.h" -#include "testutil.h" #include "memdebug.h" struct t1540_transfer_status { diff --git a/tests/libtest/lib1541.c b/tests/libtest/lib1541.c index a1f905649e..314be84792 100644 --- a/tests/libtest/lib1541.c +++ b/tests/libtest/lib1541.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" struct t1541_transfer_status { diff --git a/tests/libtest/lib1542.c b/tests/libtest/lib1542.c index e47f128c28..f78999e236 100644 --- a/tests/libtest/lib1542.c +++ b/tests/libtest/lib1542.c @@ -32,7 +32,6 @@ #include "first.h" -#include "testutil.h" #include "testtrace.h" #include "memdebug.h" diff --git a/tests/libtest/lib1552.c b/tests/libtest/lib1552.c index 602c59dd3f..7d55e2873f 100644 --- a/tests/libtest/lib1552.c +++ b/tests/libtest/lib1552.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1552(char *URL) diff --git a/tests/libtest/lib1553.c b/tests/libtest/lib1553.c index 57287885e1..5a31f48a09 100644 --- a/tests/libtest/lib1553.c +++ b/tests/libtest/lib1553.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "testtrace.h" #include "memdebug.h" diff --git a/tests/libtest/lib1556.c b/tests/libtest/lib1556.c index a5e5bde2b7..2bdb003615 100644 --- a/tests/libtest/lib1556.c +++ b/tests/libtest/lib1556.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" struct headerinfo { diff --git a/tests/libtest/lib1557.c b/tests/libtest/lib1557.c index f65fa9fad0..4aeba40853 100644 --- a/tests/libtest/lib1557.c +++ b/tests/libtest/lib1557.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1557(char *URL) diff --git a/tests/libtest/lib1558.c b/tests/libtest/lib1558.c index 51829e1d4e..a91e14ad07 100644 --- a/tests/libtest/lib1558.c +++ b/tests/libtest/lib1558.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1558(char *URL) diff --git a/tests/libtest/lib1559.c b/tests/libtest/lib1559.c index e933f925c3..f1ce42e35c 100644 --- a/tests/libtest/lib1559.c +++ b/tests/libtest/lib1559.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1559(char *URL) diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index b2294a112f..6f3512f293 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -35,7 +35,6 @@ #define USE_IDN #endif -#include "testutil.h" #include "memdebug.h" /* LAST include file */ static int checkparts(CURLU *u, const char *in, const char *wanted, diff --git a/tests/libtest/lib1565.c b/tests/libtest/lib1565.c index 03fd94014d..620cbbe592 100644 --- a/tests/libtest/lib1565.c +++ b/tests/libtest/lib1565.c @@ -23,12 +23,10 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" #ifdef HAVE_PTHREAD_H #include -#include #define CONN_NUM 3 #define TIME_BETWEEN_START_SECS 2 diff --git a/tests/libtest/lib1568.c b/tests/libtest/lib1568.c index e3d9053af6..7a402a0293 100644 --- a/tests/libtest/lib1568.c +++ b/tests/libtest/lib1568.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testtrace.h" #include "memdebug.h" static CURLcode test_lib1568(char *URL) diff --git a/tests/libtest/lib1569.c b/tests/libtest/lib1569.c index a1a1d40a85..a29ed65f68 100644 --- a/tests/libtest/lib1569.c +++ b/tests/libtest/lib1569.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testtrace.h" #include "memdebug.h" static CURLcode test_lib1569(char *URL) diff --git a/tests/libtest/lib1591.c b/tests/libtest/lib1591.c index 562a157616..13590c1e94 100644 --- a/tests/libtest/lib1591.c +++ b/tests/libtest/lib1591.c @@ -29,8 +29,6 @@ #include "first.h" -#include - #include "memdebug.h" static size_t consumed = 0; diff --git a/tests/libtest/lib1592.c b/tests/libtest/lib1592.c index 5a108a9f8a..a64dfb84c2 100644 --- a/tests/libtest/lib1592.c +++ b/tests/libtest/lib1592.c @@ -38,10 +38,6 @@ #include "first.h" -#include "testutil.h" - -#include - static CURLcode test_lib1592(char *URL) { int stillRunning; diff --git a/tests/libtest/lib1598.c b/tests/libtest/lib1598.c index baab3770c3..72b18d4c53 100644 --- a/tests/libtest/lib1598.c +++ b/tests/libtest/lib1598.c @@ -29,8 +29,6 @@ #include "first.h" -#include - #include "memdebug.h" /* diff --git a/tests/libtest/lib1599.c b/tests/libtest/lib1599.c index d7c7c49241..24617246b2 100644 --- a/tests/libtest/lib1599.c +++ b/tests/libtest/lib1599.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testtrace.h" - static CURLcode test_lib1599(char *URL) { CURL *curl; diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c index 622b20f245..a3932de5b8 100644 --- a/tests/libtest/lib1900.c +++ b/tests/libtest/lib1900.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1900(char *URL) diff --git a/tests/libtest/lib1901.c b/tests/libtest/lib1901.c index e3fdd2152d..d326a2172e 100644 --- a/tests/libtest/lib1901.c +++ b/tests/libtest/lib1901.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) diff --git a/tests/libtest/lib1903.c b/tests/libtest/lib1903.c index 79b9ffbd5c..3c99a99a47 100644 --- a/tests/libtest/lib1903.c +++ b/tests/libtest/lib1903.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" -#include "timediff.h" #include "memdebug.h" static CURLcode test_lib1903(char *URL) diff --git a/tests/libtest/lib1905.c b/tests/libtest/lib1905.c index b81ab440fb..abc7a52c71 100644 --- a/tests/libtest/lib1905.c +++ b/tests/libtest/lib1905.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" -#include "timediff.h" #include "memdebug.h" static CURLcode test_lib1905(char *URL) diff --git a/tests/libtest/lib1906.c b/tests/libtest/lib1906.c index 1f2415e36d..010434be1c 100644 --- a/tests/libtest/lib1906.c +++ b/tests/libtest/lib1906.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1906(char *URL) diff --git a/tests/libtest/lib1907.c b/tests/libtest/lib1907.c index aad70b9a9e..98d7f68c53 100644 --- a/tests/libtest/lib1907.c +++ b/tests/libtest/lib1907.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1907(char *URL) diff --git a/tests/libtest/lib1908.c b/tests/libtest/lib1908.c index 521b38c003..57982b9bd6 100644 --- a/tests/libtest/lib1908.c +++ b/tests/libtest/lib1908.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1908(char *URL) diff --git a/tests/libtest/lib1910.c b/tests/libtest/lib1910.c index b8779f6a0d..da83f66491 100644 --- a/tests/libtest/lib1910.c +++ b/tests/libtest/lib1910.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1910(char *URL) diff --git a/tests/libtest/lib1911.c b/tests/libtest/lib1911.c index 3d3787744e..b9d8c30f1e 100644 --- a/tests/libtest/lib1911.c +++ b/tests/libtest/lib1911.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* The maximum string length limit (CURL_MAX_INPUT_LENGTH) is an internal diff --git a/tests/libtest/lib1912.c b/tests/libtest/lib1912.c index 9eabe2f671..db6c3d1e68 100644 --- a/tests/libtest/lib1912.c +++ b/tests/libtest/lib1912.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" #define print_err(name, exp) \ diff --git a/tests/libtest/lib1913.c b/tests/libtest/lib1913.c index 76b01b6789..b33a5face8 100644 --- a/tests/libtest/lib1913.c +++ b/tests/libtest/lib1913.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1913(char *URL) diff --git a/tests/libtest/lib1915.c b/tests/libtest/lib1915.c index 24e79d4014..3c4d4bb34d 100644 --- a/tests/libtest/lib1915.c +++ b/tests/libtest/lib1915.c @@ -24,7 +24,6 @@ #include "first.h" #include "testtrace.h" -#include "testutil.h" #include "memdebug.h" struct state { diff --git a/tests/libtest/lib1918.c b/tests/libtest/lib1918.c index c70a07bb8c..1f40962cd5 100644 --- a/tests/libtest/lib1918.c +++ b/tests/libtest/lib1918.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1918(char *URL) diff --git a/tests/libtest/lib1919.c b/tests/libtest/lib1919.c index 5f718c08ac..e86e6d53c4 100644 --- a/tests/libtest/lib1919.c +++ b/tests/libtest/lib1919.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1919(char *URL) diff --git a/tests/libtest/lib1960.c b/tests/libtest/lib1960.c index 2df9f119ee..4fb7247073 100644 --- a/tests/libtest/lib1960.c +++ b/tests/libtest/lib1960.c @@ -28,9 +28,6 @@ #ifdef HAVE_NETINET_IN_H #include #endif -#ifndef _WIN32 -#include -#endif #ifdef HAVE_ARPA_INET_H #include #endif diff --git a/tests/libtest/lib1977.c b/tests/libtest/lib1977.c index b73db82354..a9294609ac 100644 --- a/tests/libtest/lib1977.c +++ b/tests/libtest/lib1977.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib1977(char *URL) diff --git a/tests/libtest/lib2032.c b/tests/libtest/lib2032.c index 936de92871..a998c72230 100644 --- a/tests/libtest/lib2032.c +++ b/tests/libtest/lib2032.c @@ -23,10 +23,6 @@ ***************************************************************************/ #include "first.h" -#include -#include - -#include "testutil.h" #include "memdebug.h" #define MAX_EASY_HANDLES 3 diff --git a/tests/libtest/lib2306.c b/tests/libtest/lib2306.c index 4f25c29116..5d37d74dd3 100644 --- a/tests/libtest/lib2306.c +++ b/tests/libtest/lib2306.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testtrace.h" - static CURLcode test_lib2306(char *URL) { /* first a fine GET response, then a bad one */ diff --git a/tests/libtest/lib2308.c b/tests/libtest/lib2308.c index 26fac9b7f1..a66dcb70ca 100644 --- a/tests/libtest/lib2308.c +++ b/tests/libtest/lib2308.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testtrace.h" - static size_t cb_curl(char *buffer, size_t size, size_t nmemb, void *userp) { (void)buffer; diff --git a/tests/libtest/lib2309.c b/tests/libtest/lib2309.c index 928b007f40..9145b63965 100644 --- a/tests/libtest/lib2309.c +++ b/tests/libtest/lib2309.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testtrace.h" - static size_t cb_ignore(char *buffer, size_t size, size_t nmemb, void *userp) { (void)buffer; diff --git a/tests/libtest/lib2402.c b/tests/libtest/lib2402.c index f633b469a9..db932aac82 100644 --- a/tests/libtest/lib2402.c +++ b/tests/libtest/lib2402.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib2402(char *URL) diff --git a/tests/libtest/lib2404.c b/tests/libtest/lib2404.c index 9f0f5aa20e..d4fec33b9b 100644 --- a/tests/libtest/lib2404.c +++ b/tests/libtest/lib2404.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib2404(char *URL) diff --git a/tests/libtest/lib2405.c b/tests/libtest/lib2405.c index 2302ae1fd3..d93dede691 100644 --- a/tests/libtest/lib2405.c +++ b/tests/libtest/lib2405.c @@ -39,7 +39,6 @@ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* ---------------------------------------------------------------- */ diff --git a/tests/libtest/lib2502.c b/tests/libtest/lib2502.c index 6eb0dd144f..fde4283972 100644 --- a/tests/libtest/lib2502.c +++ b/tests/libtest/lib2502.c @@ -24,7 +24,6 @@ #include "first.h" #include "testtrace.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib2502(char *URL) diff --git a/tests/libtest/lib3026.c b/tests/libtest/lib3026.c index a595deaa6c..fb50b97e53 100644 --- a/tests/libtest/lib3026.c +++ b/tests/libtest/lib3026.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" - #define NUM_THREADS 100 #ifdef _WIN32 @@ -101,7 +99,6 @@ cleanup: #elif defined(HAVE_PTHREAD_H) #include -#include static void *t3026_run_thread(void *ptr) { diff --git a/tests/libtest/lib3027.c b/tests/libtest/lib3027.c index 7f79a37bc6..7461e3f22a 100644 --- a/tests/libtest/lib3027.c +++ b/tests/libtest/lib3027.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib3027(char *URL) diff --git a/tests/libtest/lib3105.c b/tests/libtest/lib3105.c index cd9e7a7eab..962997a53e 100644 --- a/tests/libtest/lib3105.c +++ b/tests/libtest/lib3105.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib3105(char *URL) diff --git a/tests/libtest/lib3207.c b/tests/libtest/lib3207.c index d2e1806af7..e1c4f4b055 100644 --- a/tests/libtest/lib3207.c +++ b/tests/libtest/lib3207.c @@ -23,11 +23,8 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" -#include - #if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) #if defined(USE_THREADS_POSIX) #include diff --git a/tests/libtest/lib3208.c b/tests/libtest/lib3208.c index 55ea21d16e..6dbf9bcadf 100644 --- a/tests/libtest/lib3208.c +++ b/tests/libtest/lib3208.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib3208(char *URL) diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c index 0c6feb8c53..a18e6976b9 100644 --- a/tests/libtest/lib502.c +++ b/tests/libtest/lib502.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib503.c b/tests/libtest/lib503.c index 87e679e908..0598b1bcff 100644 --- a/tests/libtest/lib503.c +++ b/tests/libtest/lib503.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c index 49afc851e2..a795571cc1 100644 --- a/tests/libtest/lib504.c +++ b/tests/libtest/lib504.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c index fd56fe4624..3ed339fc5f 100644 --- a/tests/libtest/lib505.c +++ b/tests/libtest/lib505.c @@ -23,10 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_FCNTL_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c index 23c5b58c31..e6eacfd2ec 100644 --- a/tests/libtest/lib507.c +++ b/tests/libtest/lib507.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib507(char *URL) diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c index 37358c98dc..776e26184f 100644 --- a/tests/libtest/lib509.c +++ b/tests/libtest/lib509.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - /* * This test uses these funny custom memory callbacks for the only purpose * of verifying that curl_global_init_mem() functionality is present in diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index a992cb1b87..79ada45e54 100644 --- a/tests/libtest/lib518.c +++ b/tests/libtest/lib518.c @@ -23,10 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_FCNTL_H -#include -#endif - #include "testutil.h" #include "memdebug.h" @@ -481,7 +477,7 @@ static CURLcode test_lib518(char *URL) { (void)URL; curl_mprintf("system lacks necessary system function(s)"); - return 1; /* skip test */ + return TEST_ERR_MAJOR_BAD; /* skip test */ } #endif /* defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) */ diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c index 4c49f29fe2..0c60710870 100644 --- a/tests/libtest/lib525.c +++ b/tests/libtest/lib525.c @@ -23,9 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib525(char *URL) diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c index 85221652a4..de097e1b04 100644 --- a/tests/libtest/lib526.c +++ b/tests/libtest/lib526.c @@ -42,9 +42,6 @@ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib526(char *URL) diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c index 957efa2d4f..d971799da8 100644 --- a/tests/libtest/lib530.c +++ b/tests/libtest/lib530.c @@ -30,8 +30,6 @@ #include "first.h" -#include - #include "memdebug.h" diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c index 4dae47a85a..064ff9d7a3 100644 --- a/tests/libtest/lib533.c +++ b/tests/libtest/lib533.c @@ -25,9 +25,6 @@ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib533(char *URL) diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index c4964b82e0..ab3f01dd3d 100644 --- a/tests/libtest/lib537.c +++ b/tests/libtest/lib537.c @@ -23,10 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_FCNTL_H -#include -#endif - #include "testutil.h" #include "memdebug.h" @@ -195,7 +191,7 @@ static int t537_test_rlimit(int keep_open) * avoid a low memory condition once the file descriptors are * open. System conditions that could make the test fail should * be addressed in the precheck phase. This chunk of memory shall - * be always free()ed before exiting the test_rlimit() function so + * be always free()ed before exiting the t537_test_rlimit() function so * that it becomes available to the test. */ diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c index 9b6f118732..1914206972 100644 --- a/tests/libtest/lib540.c +++ b/tests/libtest/lib540.c @@ -32,9 +32,6 @@ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" #define PROXY libtest_arg2 diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c index 33411117f4..9ae605a183 100644 --- a/tests/libtest/lib541.c +++ b/tests/libtest/lib541.c @@ -23,10 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_FCNTL_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/lib542.c b/tests/libtest/lib542.c index 9e3a2aa898..cb065d722a 100644 --- a/tests/libtest/lib542.c +++ b/tests/libtest/lib542.c @@ -23,10 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_FCNTL_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c index 87706c2dff..f3e03d6dfd 100644 --- a/tests/libtest/lib555.c +++ b/tests/libtest/lib555.c @@ -32,7 +32,6 @@ #include "first.h" -#include "testutil.h" #include "memdebug.h" static const char uploadthis[] = "this is the blurb we want to upload\n"; diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c index df1eb69cbf..4d3dede6ca 100644 --- a/tests/libtest/lib557.c +++ b/tests/libtest/lib557.c @@ -29,8 +29,6 @@ #include "first.h" -#include - #ifdef HAVE_LOCALE_H # include /* for setlocale() */ #endif diff --git a/tests/libtest/lib559.c b/tests/libtest/lib559.c index 0b6eb308e6..987dc708ad 100644 --- a/tests/libtest/lib559.c +++ b/tests/libtest/lib559.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testtrace.h" #include "memdebug.h" static CURLcode test_lib559(char *URL) diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c index 712820dd52..f6a398e17f 100644 --- a/tests/libtest/lib560.c +++ b/tests/libtest/lib560.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib562.c b/tests/libtest/lib562.c index 5e010784ab..c6a391cf65 100644 --- a/tests/libtest/lib562.c +++ b/tests/libtest/lib562.c @@ -23,10 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_FCNTL_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/lib564.c b/tests/libtest/lib564.c index ed64a64fb9..9f5035b485 100644 --- a/tests/libtest/lib564.c +++ b/tests/libtest/lib564.c @@ -23,9 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib564(char *URL) diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c index e69ab97798..b0e8b610d2 100644 --- a/tests/libtest/lib568.c +++ b/tests/libtest/lib568.c @@ -23,13 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - #include "testutil.h" #include "memdebug.h" diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c index 865b158adf..4a8d805bf0 100644 --- a/tests/libtest/lib571.c +++ b/tests/libtest/lib571.c @@ -24,19 +24,13 @@ #include "first.h" #ifdef HAVE_NETINET_IN_H -# include +#include #endif #ifdef HAVE_NETDB_H -# include +#include #endif #ifdef HAVE_ARPA_INET_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef HAVE_FCNTL_H -# include +#include #endif #include "testutil.h" diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c index d03934c93b..cf5fa7c914 100644 --- a/tests/libtest/lib572.c +++ b/tests/libtest/lib572.c @@ -23,13 +23,6 @@ ***************************************************************************/ #include "first.h" -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - #include "testutil.h" #include "memdebug.h" diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c index fa49ae18ff..2cfecc09cc 100644 --- a/tests/libtest/lib573.c +++ b/tests/libtest/lib573.c @@ -24,7 +24,6 @@ #include "first.h" #include "testtrace.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib575.c b/tests/libtest/lib575.c index a4c1aedb75..e474721778 100644 --- a/tests/libtest/lib575.c +++ b/tests/libtest/lib575.c @@ -23,9 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" /* 3x download! diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c index e52c228aa2..5c58c0a560 100644 --- a/tests/libtest/lib576.c +++ b/tests/libtest/lib576.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" struct chunk_data { diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index 06216ff161..fbd329b64a 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - #include "memdebug.h" struct t582_Sockets { diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c index 691e142e35..a68105ea47 100644 --- a/tests/libtest/lib583.c +++ b/tests/libtest/lib583.c @@ -28,8 +28,6 @@ #include "first.h" -#include - #include "memdebug.h" static CURLcode test_lib583(char *URL) diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c index 6a9f03f849..82568babc3 100644 --- a/tests/libtest/lib591.c +++ b/tests/libtest/lib591.c @@ -21,15 +21,10 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "first.h" - /* lib591 is used for test cases 591, 592, 593 and 594 */ -#include - -#include +#include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib591(char *URL) diff --git a/tests/libtest/lib597.c b/tests/libtest/lib597.c index 5c11fc8809..0bbc9671d1 100644 --- a/tests/libtest/lib597.c +++ b/tests/libtest/lib597.c @@ -23,9 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib653.c b/tests/libtest/lib653.c index f2a00447be..e1cdb2b335 100644 --- a/tests/libtest/lib653.c +++ b/tests/libtest/lib653.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" -#include "warnless.h" #include "memdebug.h" static CURLcode test_lib653(char *URL) diff --git a/tests/libtest/lib658.c b/tests/libtest/lib658.c index d0eb222b37..410ab070e9 100644 --- a/tests/libtest/lib658.c +++ b/tests/libtest/lib658.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib659.c b/tests/libtest/lib659.c index 941ca7370c..d926c513bb 100644 --- a/tests/libtest/lib659.c +++ b/tests/libtest/lib659.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib670.c b/tests/libtest/lib670.c index c2f70d859b..eb3a6bac1c 100644 --- a/tests/libtest/lib670.c +++ b/tests/libtest/lib670.c @@ -23,8 +23,6 @@ ***************************************************************************/ #include "first.h" -#include - #include "memdebug.h" #define PAUSE_TIME 5 diff --git a/tests/libtest/lib674.c b/tests/libtest/lib674.c index 48938b5d01..0da7af317d 100644 --- a/tests/libtest/lib674.c +++ b/tests/libtest/lib674.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib677.c b/tests/libtest/lib677.c index aa58ccf234..1b54eb669a 100644 --- a/tests/libtest/lib677.c +++ b/tests/libtest/lib677.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static CURLcode test_lib677(char *URL) diff --git a/tests/libtest/lib678.c b/tests/libtest/lib678.c index cc2216e2a9..48a54b0527 100644 --- a/tests/libtest/lib678.c +++ b/tests/libtest/lib678.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" static int loadfile(const char *filename, void **filedata, size_t *filesize) diff --git a/tests/libtest/lib751.c b/tests/libtest/lib751.c index 5623a20b89..f9ebbf1fa8 100644 --- a/tests/libtest/lib751.c +++ b/tests/libtest/lib751.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "memdebug.h" /* diff --git a/tests/libtest/lib753.c b/tests/libtest/lib753.c index 27aec1d735..36b45e7648 100644 --- a/tests/libtest/lib753.c +++ b/tests/libtest/lib753.c @@ -23,7 +23,6 @@ ***************************************************************************/ #include "first.h" -#include "testutil.h" #include "testtrace.h" #include "memdebug.h" diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl index a3b3951760..95dbb456bf 100755 --- a/tests/libtest/mk-lib1521.pl +++ b/tests/libtest/mk-lib1521.pl @@ -205,7 +205,6 @@ print $fh <
/* This source code is generated by mk-lib1521.pl ! */ diff --git a/tests/libtest/test.h b/tests/libtest/test.h index 9d3935cc97..2c01794fe0 100644 --- a/tests/libtest/test.h +++ b/tests/libtest/test.h @@ -37,8 +37,6 @@ #ifdef HAVE_SYS_SELECT_H /* since so many tests use select(), we can just as well include it here */ #include -#elif defined(HAVE_UNISTD_H) -#include #endif #include "curl_printf.h" diff --git a/tests/libtest/testutil.h b/tests/libtest/testutil.h index dd2a5a9d3b..f7bedff407 100644 --- a/tests/libtest/testutil.h +++ b/tests/libtest/testutil.h @@ -29,11 +29,9 @@ char *tutil_suburl(const char *base, int i); #ifdef HAVE_SYS_RESOURCE_H -#include +#include /* for getrlimit() */ #endif -#include - #if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) void tutil_rlim2str(char *buf, size_t len, rlim_t val); #endif diff --git a/tests/tunit/tool1394.c b/tests/tunit/tool1394.c index b57ae1d375..8c874ef4e2 100644 --- a/tests/tunit/tool1394.c +++ b/tests/tunit/tool1394.c @@ -25,10 +25,6 @@ #include "tool_getparam.h" -#include -#include -#include - #include "memdebug.h" /* LAST include file */ static CURLcode test_tool1394(char *arg) diff --git a/tests/tunit/tool1604.c b/tests/tunit/tool1604.c index bd029c8d18..4d3101fd01 100644 --- a/tests/tunit/tool1604.c +++ b/tests/tunit/tool1604.c @@ -26,10 +26,6 @@ #include "tool_cfgable.h" #include "tool_doswin.h" -#include -#include -#include - #include "memdebug.h" /* LAST include file */ #if defined(_WIN32) || defined(MSDOS) diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c index a2bc7292ed..cf8090c304 100644 --- a/tests/unit/unit1305.c +++ b/tests/unit/unit1305.c @@ -24,13 +24,13 @@ #include "curlcheck.h" #ifdef HAVE_NETINET_IN_H -# include +#include #endif #ifdef HAVE_NETDB_H -# include +#include #endif #ifdef HAVE_ARPA_INET_H -# include +#include #endif #include