tests/server: remove TEST use, include <memdebug.h>

- The TEST define is never set
- memdebug.h is not in the local dir, using angle bracket include

Closes #17323
This commit is contained in:
Daniel Stenberg 2025-05-12 12:13:15 +02:00
parent 144706342f
commit 1ef5bef055
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 9 additions and 43 deletions

View file

@ -57,7 +57,7 @@
#include "server_sockaddr.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
static int dnsd_wrotepidfile = 0;
static int dnsd_wroteportfile = 0;

View file

@ -25,19 +25,11 @@
#include "getpart.h"
#ifdef TEST
#include "curl/curl.h"
#include "warnless.h"
#else
#include <curlx.h> /* from the private lib dir */
#endif
#include "curl_memory.h"
#ifndef TEST
/* include memdebug.h last */
#include "memdebug.h"
#endif
#include <memdebug.h>
#define EAT_SPACE(p) while(*(p) && ISSPACE(*(p))) (p)++
@ -491,29 +483,3 @@ int getpart(char **outbuf, size_t *outlen,
return error;
}
#ifdef TEST
#include "../../lib/base64.c"
#include "../../lib/warnless.c"
/* Build with:
* $ gcc getpart.c -DTEST -I../../include -I../../lib -DHAVE_CONFIG_H
*/
int main(int argc, char **argv)
{
if(argc < 3) {
printf("./getpart main sub\n");
}
else {
char *part;
size_t partlen;
int rc = getpart(&part, &partlen, argv[1], argv[2], stdin);
size_t i;
if(rc)
return rc;
for(i = 0; i < partlen; i++)
printf("%c", part[i]);
free(part);
}
return 0;
}
#endif

View file

@ -60,7 +60,7 @@
#include "tool_binmode.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
#define MQTT_MSG_CONNECT 0x10
#define MQTT_MSG_CONNACK 0x20

View file

@ -47,7 +47,7 @@
#include "util.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
int main(int argc, char *argv[])
{

View file

@ -54,7 +54,7 @@
#include "server_sockaddr.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
#undef REQBUFSIZ
#define REQBUFSIZ 150000

View file

@ -110,7 +110,7 @@
#include "tool_binmode.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
/* buffer is this excessively large only to be able to support things like
test 1003 which tests exceedingly large server response lines */

View file

@ -80,7 +80,7 @@
#include "tool_binmode.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
static const char *backendaddr = "127.0.0.1";
static unsigned short backendport = 0; /* default is use client's */

View file

@ -56,7 +56,7 @@
#include "server_sockaddr.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
static bool use_gopher = FALSE;
static bool is_proxy = FALSE;

View file

@ -90,7 +90,7 @@
#include "tftp.h"
/* include memdebug.h last */
#include "memdebug.h"
#include <memdebug.h>
/*****************************************************************************
* STRUCT DECLARATIONS AND DEFINES *