aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-01-22 23:11:01 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-01-23 00:10:03 +0300
commit2618c8c42fc43a0772fe9bd68bccc2d5fcd8693a (patch)
treef7230163303aeb7714ccfdeb56e104a7197b5e89 /src
parent2ed00da9babc5608e8ed44e07f8d2067b4a4d8f5 (diff)
downloadlibmicrohttpd-2618c8c42fc43a0772fe9bd68bccc2d5fcd8693a.tar.gz
libmicrohttpd-2618c8c42fc43a0772fe9bd68bccc2d5fcd8693a.zip
test_large_put: added test with incremental read and limited buffer
Diffstat (limited to 'src')
-rw-r--r--src/testcurl/Makefile.am7
-rw-r--r--src/testcurl/test_large_put.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
index b033fc92..7d315d5b 100644
--- a/src/testcurl/Makefile.am
+++ b/src/testcurl/Makefile.am
@@ -32,6 +32,7 @@ check_PROGRAMS = \
32 test_get_sendfile11 \ 32 test_get_sendfile11 \
33 test_put11 \ 33 test_put11 \
34 test_large_put11 \ 34 test_large_put11 \
35 test_large_put_inc11 \
35 test_long_header \ 36 test_long_header \
36 test_long_header11 \ 37 test_long_header11 \
37 test_get_chunked \ 38 test_get_chunked \
@@ -284,6 +285,12 @@ test_large_put11_LDADD = \
284 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 285 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
285 @LIBCURL@ 286 @LIBCURL@
286 287
288test_large_put_inc11_SOURCES = \
289 test_large_put.c
290test_large_put_inc11_LDADD = \
291 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
292 @LIBCURL@
293
287test_long_header_SOURCES = \ 294test_long_header_SOURCES = \
288 test_long_header.c 295 test_long_header.c
289test_long_header_LDADD = \ 296test_long_header_LDADD = \
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c
index cf827a93..7a8be9d2 100644
--- a/src/testcurl/test_large_put.c
+++ b/src/testcurl/test_large_put.c
@@ -189,7 +189,7 @@ testPutInternalThread ()
189 d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, 189 d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
190 1080, 190 1080,
191 NULL, NULL, &ahc_echo, &done_flag, 191 NULL, NULL, &ahc_echo, &done_flag,
192 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (1024*1024), 192 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t)(incr_read ? 1024 : (PUT_SIZE * 4)),
193 MHD_OPTION_END); 193 MHD_OPTION_END);
194 if (d == NULL) 194 if (d == NULL)
195 return 1; 195 return 1;
@@ -247,7 +247,7 @@ testPutThreadPerConn ()
247 d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, 247 d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
248 1081, 248 1081,
249 NULL, NULL, &ahc_echo, &done_flag, 249 NULL, NULL, &ahc_echo, &done_flag,
250 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (1024*1024), 250 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t)(incr_read ? 1024 : (PUT_SIZE * 4)),
251 MHD_OPTION_END); 251 MHD_OPTION_END);
252 if (d == NULL) 252 if (d == NULL)
253 return 16; 253 return 16;
@@ -309,7 +309,7 @@ testPutThreadPool ()
309 1081, 309 1081,
310 NULL, NULL, &ahc_echo, &done_flag, 310 NULL, NULL, &ahc_echo, &done_flag,
311 MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 311 MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
312 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (1024*1024), 312 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t)(incr_read ? 1024 : (PUT_SIZE * 4)),
313 MHD_OPTION_END); 313 MHD_OPTION_END);
314 if (d == NULL) 314 if (d == NULL)
315 return 16; 315 return 16;
@@ -385,8 +385,8 @@ testPutExternal ()
385 d = MHD_start_daemon (MHD_USE_ERROR_LOG, 385 d = MHD_start_daemon (MHD_USE_ERROR_LOG,
386 1082, 386 1082,
387 NULL, NULL, &ahc_echo, &done_flag, 387 NULL, NULL, &ahc_echo, &done_flag,
388 MHD_OPTION_CONNECTION_MEMORY_LIMIT, 388 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t)(incr_read ? 1024 : (PUT_SIZE * 4)),
389 (size_t) (PUT_SIZE * 4), MHD_OPTION_END); 389 MHD_OPTION_END);
390 if (d == NULL) 390 if (d == NULL)
391 return 256; 391 return 256;
392 c = curl_easy_init (); 392 c = curl_easy_init ();