tests: drop unused or redundant includes

Closes #17717
This commit is contained in:
Viktor Szakats 2025-06-23 10:15:16 +02:00
parent 36a3cd5374
commit 2636828eee
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
108 changed files with 11 additions and 215 deletions

View file

@ -38,9 +38,6 @@ extern const struct entry_s s_entries[];
#include "curlx.h"
#include <stdlib.h> /* for calloc(), free(), strtol() */
#include <string.h> /* for strchr(), strcmp() */
#define ERR() \
do { \
curl_mfprintf(stderr, "something unexpected went wrong - bailing out!\n");\

View file

@ -25,8 +25,6 @@
*/
#include "first.h"
#include <assert.h>
static void usage_h2_pausing(const char *msg)
{
if(msg)

View file

@ -24,12 +24,10 @@
#include "first.h"
#ifdef HAVE_LOCALE_H
# include <locale.h> /* for setlocale() */
#include <locale.h> /* 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)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
struct t1485_transfer_status {

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1500(char *URL)

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include <fcntl.h>
#include "memdebug.h"
static CURLcode test_lib1501(char *URL)

View file

@ -31,9 +31,6 @@
#include "first.h"
#include <limits.h>
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1502(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1506(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "timediff.h"
#include "memdebug.h"
/*

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1508(char *URL)

View file

@ -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);

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1510(char *URL)

View file

@ -31,7 +31,6 @@
#include "first.h"
#include "testtrace.h"
#include "testutil.h"
#include "memdebug.h"
#define DNS_TIMEOUT 1L

View file

@ -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,

View file

@ -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,

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "timediff.h"
#include "memdebug.h"
static CURLcode test_lib1531(char *URL)

View file

@ -24,7 +24,6 @@
#include "first.h"
#include "testtrace.h"
#include "testutil.h"
#include "memdebug.h"
struct t1540_transfer_status {

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
struct t1541_transfer_status {

View file

@ -32,7 +32,6 @@
#include "first.h"
#include "testutil.h"
#include "testtrace.h"
#include "memdebug.h"

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1552(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "testtrace.h"
#include "memdebug.h"

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
struct headerinfo {

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1557(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1558(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1559(char *URL)

View file

@ -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,

View file

@ -23,12 +23,10 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#include <unistd.h>
#define CONN_NUM 3
#define TIME_BETWEEN_START_SECS 2

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testtrace.h"
#include "memdebug.h"
static CURLcode test_lib1568(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testtrace.h"
#include "memdebug.h"
static CURLcode test_lib1569(char *URL)

View file

@ -29,8 +29,6 @@
#include "first.h"
#include <stdio.h>
#include "memdebug.h"
static size_t consumed = 0;

View file

@ -38,10 +38,6 @@
#include "first.h"
#include "testutil.h"
#include <sys/stat.h>
static CURLcode test_lib1592(char *URL)
{
int stillRunning;

View file

@ -29,8 +29,6 @@
#include "first.h"
#include <stdio.h>
#include "memdebug.h"
/*

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testtrace.h"
static CURLcode test_lib1599(char *URL)
{
CURL *curl;

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1900(char *URL)

View file

@ -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)

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "timediff.h"
#include "memdebug.h"
static CURLcode test_lib1903(char *URL)

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "timediff.h"
#include "memdebug.h"
static CURLcode test_lib1905(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1906(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1907(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1908(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1910(char *URL)

View file

@ -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

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
#define print_err(name, exp) \

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1913(char *URL)

View file

@ -24,7 +24,6 @@
#include "first.h"
#include "testtrace.h"
#include "testutil.h"
#include "memdebug.h"
struct state {

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1918(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1919(char *URL)

View file

@ -28,9 +28,6 @@
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifndef _WIN32
#include <sys/socket.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib1977(char *URL)

View file

@ -23,10 +23,6 @@
***************************************************************************/
#include "first.h"
#include <limits.h>
#include <assert.h>
#include "testutil.h"
#include "memdebug.h"
#define MAX_EASY_HANDLES 3

View file

@ -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 */

View file

@ -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;

View file

@ -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;

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib2402(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib2404(char *URL)

View file

@ -39,7 +39,6 @@
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/* ---------------------------------------------------------------- */

View file

@ -24,7 +24,6 @@
#include "first.h"
#include "testtrace.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib2502(char *URL)

View file

@ -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 <pthread.h>
#include <unistd.h>
static void *t3026_run_thread(void *ptr)
{

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib3027(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib3105(char *URL)

View file

@ -23,11 +23,8 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
#include <stdio.h>
#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
#if defined(USE_THREADS_POSIX)
#include <pthread.h>

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib3208(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,10 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "memdebug.h"
/*

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib507(char *URL)

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include <string.h>
/*
* This test uses these funny custom memory callbacks for the only purpose
* of verifying that curl_global_init_mem() functionality is present in

View file

@ -23,10 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#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) */

View file

@ -23,9 +23,6 @@
***************************************************************************/
#include "first.h"
#include <fcntl.h>
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib525(char *URL)

View file

@ -42,9 +42,6 @@
#include "first.h"
#include <fcntl.h>
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib526(char *URL)

View file

@ -30,8 +30,6 @@
#include "first.h"
#include <fcntl.h>
#include "memdebug.h"

View file

@ -25,9 +25,6 @@
#include "first.h"
#include <fcntl.h>
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib533(char *URL)

View file

@ -23,10 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#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.
*/

View file

@ -32,9 +32,6 @@
#include "first.h"
#include <limits.h>
#include "testutil.h"
#include "memdebug.h"
#define PROXY libtest_arg2

View file

@ -23,10 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "memdebug.h"
/*

View file

@ -23,10 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "memdebug.h"
/*

View file

@ -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";

View file

@ -29,8 +29,6 @@
#include "first.h"
#include <limits.h>
#ifdef HAVE_LOCALE_H
# include <locale.h> /* for setlocale() */
#endif

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testtrace.h"
#include "memdebug.h"
static CURLcode test_lib559(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,10 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "memdebug.h"
/*

View file

@ -23,9 +23,6 @@
***************************************************************************/
#include "first.h"
#include <fcntl.h>
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib564(char *URL)

View file

@ -23,13 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "testutil.h"
#include "memdebug.h"

View file

@ -24,19 +24,13 @@
#include "first.h"
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#include <netinet/in.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
#include <netdb.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#include <arpa/inet.h>
#endif
#include "testutil.h"

View file

@ -23,13 +23,6 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "testutil.h"
#include "memdebug.h"

View file

@ -24,7 +24,6 @@
#include "first.h"
#include "testtrace.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,9 +23,6 @@
***************************************************************************/
#include "first.h"
#include <fcntl.h>
#include "testutil.h"
#include "memdebug.h"
/* 3x download!

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
struct chunk_data {

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include <fcntl.h>
#include "memdebug.h"
struct t582_Sockets {

View file

@ -28,8 +28,6 @@
#include "first.h"
#include <sys/stat.h>
#include "memdebug.h"
static CURLcode test_lib583(char *URL)

View file

@ -21,15 +21,10 @@
* SPDX-License-Identifier: curl
*
***************************************************************************/
#include "first.h"
/* lib591 is used for test cases 591, 592, 593 and 594 */
#include <limits.h>
#include "first.h"
#include <fcntl.h>
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib591(char *URL)

View file

@ -23,9 +23,6 @@
***************************************************************************/
#include "first.h"
#include <limits.h>
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
static CURLcode test_lib653(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,8 +23,6 @@
***************************************************************************/
#include "first.h"
#include <time.h>
#include "memdebug.h"
#define PAUSE_TIME 5

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
/*

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static CURLcode test_lib677(char *URL)

View file

@ -23,7 +23,6 @@
***************************************************************************/
#include "first.h"
#include "testutil.h"
#include "memdebug.h"
static int loadfile(const char *filename, void **filedata, size_t *filesize)

Some files were not shown because too many files have changed in this diff Show more