diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-11-21 17:33:58 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-11-23 13:47:00 +0300 |
commit | 67b1cdc29dfb1f260e0d31df3121e01d8ecad027 (patch) | |
tree | 2ad6484e11340ebc5619c5d6dd7ee87437884f2c /src/testcurl | |
parent | b05555f8372fd848698d87133d8ed194820ede1e (diff) | |
download | libmicrohttpd-67b1cdc29dfb1f260e0d31df3121e01d8ecad027.tar.gz libmicrohttpd-67b1cdc29dfb1f260e0d31df3121e01d8ecad027.zip |
Tests: added use of MHD_USE_NO_THREAD_SAFETY flag
Diffstat (limited to 'src/testcurl')
27 files changed, 49 insertions, 35 deletions
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c index 1939ccff..8ce55e2c 100644 --- a/src/testcurl/https/test_https_get_select.c +++ b/src/testcurl/https/test_https_get_select.c | |||
@@ -278,7 +278,9 @@ main (int argc, char *const *argv) | |||
278 | #ifdef EPOLL_SUPPORT | 278 | #ifdef EPOLL_SUPPORT |
279 | errorCount += testExternalGet (MHD_USE_EPOLL); | 279 | errorCount += testExternalGet (MHD_USE_EPOLL); |
280 | #endif | 280 | #endif |
281 | errorCount += testExternalGet (0); | 281 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) |
282 | errorCount += testExternalGet (MHD_NO_FLAG); | ||
283 | errorCount += testExternalGet (MHD_USE_NO_THREAD_SAFETY); | ||
282 | curl_global_cleanup (); | 284 | curl_global_cleanup (); |
283 | if (errorCount != 0) | 285 | if (errorCount != 0) |
284 | fprintf (stderr, "Failed test: %s, error: %u.\n", argv[0], errorCount); | 286 | fprintf (stderr, "Failed test: %s, error: %u.\n", argv[0], errorCount); |
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index 0a8af562..c9f400a3 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -458,7 +458,7 @@ testExternalGet (uint16_t port) | |||
458 | multi = NULL; | 458 | multi = NULL; |
459 | cbc.buf = buf; | 459 | cbc.buf = buf; |
460 | cbc.size = 2048; | 460 | cbc.size = 2048; |
461 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 461 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
462 | port, NULL, NULL, | 462 | port, NULL, NULL, |
463 | &ahc_echo, NULL, | 463 | &ahc_echo, NULL, |
464 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 464 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c index 4fd651b3..2539b5f5 100644 --- a/src/testcurl/test_add_conn.c +++ b/src/testcurl/test_add_conn.c | |||
@@ -739,8 +739,7 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
739 | 739 | ||
740 | if (testMhdThreadExternal == thrType) | 740 | if (testMhdThreadExternal == thrType) |
741 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) | 741 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) |
742 | | (thrType == testMhdThreadExternal ? | 742 | | MHD_USE_NO_THREAD_SAFETY |
743 | 0 : MHD_USE_ITC) | ||
744 | | (no_listen ? MHD_USE_NO_LISTEN_SOCKET : 0) | 743 | | (no_listen ? MHD_USE_NO_LISTEN_SOCKET : 0) |
745 | | MHD_USE_ERROR_LOG, | 744 | | MHD_USE_ERROR_LOG, |
746 | *pport, NULL, NULL, | 745 | *pport, NULL, NULL, |
diff --git a/src/testcurl/test_basicauth.c b/src/testcurl/test_basicauth.c index 963639c9..d6fe1427 100644 --- a/src/testcurl/test_basicauth.c +++ b/src/testcurl/test_basicauth.c | |||
@@ -647,7 +647,7 @@ testBasicAuth (void) | |||
647 | else | 647 | else |
648 | port = 4210; | 648 | port = 4210; |
649 | 649 | ||
650 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 650 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
651 | port, NULL, NULL, | 651 | port, NULL, NULL, |
652 | &ahc_echo, NULL, | 652 | &ahc_echo, NULL, |
653 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 653 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_callback.c b/src/testcurl/test_callback.c index 510043cc..3cc28c5f 100644 --- a/src/testcurl/test_callback.c +++ b/src/testcurl/test_callback.c | |||
@@ -141,7 +141,7 @@ main (int argc, char **argv) | |||
141 | else | 141 | else |
142 | port = 1140; | 142 | port = 1140; |
143 | 143 | ||
144 | d = MHD_start_daemon (0, | 144 | d = MHD_start_daemon (MHD_USE_NO_THREAD_SAFETY, |
145 | port, | 145 | port, |
146 | NULL, | 146 | NULL, |
147 | NULL, | 147 | NULL, |
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c index 681afe30..81fa9986 100644 --- a/src/testcurl/test_delete.c +++ b/src/testcurl/test_delete.c | |||
@@ -389,7 +389,7 @@ testExternalDelete (void) | |||
389 | cbc.buf = buf; | 389 | cbc.buf = buf; |
390 | cbc.size = 2048; | 390 | cbc.size = 2048; |
391 | cbc.pos = 0; | 391 | cbc.pos = 0; |
392 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 392 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
393 | port, | 393 | port, |
394 | NULL, NULL, &ahc_echo, &done_flag, | 394 | NULL, NULL, &ahc_echo, &done_flag, |
395 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 395 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_digestauth2.c b/src/testcurl/test_digestauth2.c index e94f7b63..2ec78e26 100644 --- a/src/testcurl/test_digestauth2.c +++ b/src/testcurl/test_digestauth2.c | |||
@@ -1366,7 +1366,7 @@ testDigestAuth (void) | |||
1366 | if (test_bind_uri) | 1366 | if (test_bind_uri) |
1367 | dauth_nonce_bind |= MHD_DAUTH_BIND_NONCE_URI_PARAMS; | 1367 | dauth_nonce_bind |= MHD_DAUTH_BIND_NONCE_URI_PARAMS; |
1368 | 1368 | ||
1369 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 1369 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
1370 | port, NULL, NULL, | 1370 | port, NULL, NULL, |
1371 | &ahc_echo, &rq_tr, | 1371 | &ahc_echo, &rq_tr, |
1372 | MHD_OPTION_DIGEST_AUTH_RANDOM_COPY, | 1372 | MHD_OPTION_DIGEST_AUTH_RANDOM_COPY, |
diff --git a/src/testcurl/test_digestauth_emu_ext.c b/src/testcurl/test_digestauth_emu_ext.c index 7a6e8e7b..8506a567 100644 --- a/src/testcurl/test_digestauth_emu_ext.c +++ b/src/testcurl/test_digestauth_emu_ext.c | |||
@@ -820,7 +820,7 @@ testDigestAuthEmu (void) | |||
820 | else | 820 | else |
821 | port = 4210; | 821 | port = 4210; |
822 | 822 | ||
823 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 823 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
824 | port, NULL, NULL, | 824 | port, NULL, NULL, |
825 | &ahc_echo, NULL, | 825 | &ahc_echo, NULL, |
826 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 826 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c index b44c8370..812aa840 100644 --- a/src/testcurl/test_get.c +++ b/src/testcurl/test_get.c | |||
@@ -394,7 +394,7 @@ testMultithreadedPoolGet (uint32_t poll_flag) | |||
394 | 394 | ||
395 | 395 | ||
396 | static unsigned int | 396 | static unsigned int |
397 | testExternalGet (void) | 397 | testExternalGet (int thread_unsafe) |
398 | { | 398 | { |
399 | struct MHD_Daemon *d; | 399 | struct MHD_Daemon *d; |
400 | CURL *c; | 400 | CURL *c; |
@@ -424,7 +424,8 @@ testExternalGet (void) | |||
424 | cbc.buf = buf; | 424 | cbc.buf = buf; |
425 | cbc.size = 2048; | 425 | cbc.size = 2048; |
426 | cbc.pos = 0; | 426 | cbc.pos = 0; |
427 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 427 | d = MHD_start_daemon (MHD_USE_ERROR_LOG |
428 | | (thread_unsafe ? MHD_USE_NO_THREAD_SAFETY : 0), | ||
428 | global_port, NULL, NULL, | 429 | global_port, NULL, NULL, |
429 | &ahc_echo, NULL, | 430 | &ahc_echo, NULL, |
430 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 431 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |
@@ -890,14 +891,20 @@ main (int argc, char *const *argv) | |||
890 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 891 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
891 | return 2; | 892 | return 2; |
892 | global_port = 0; | 893 | global_port = 0; |
893 | test_result = testExternalGet (); | 894 | test_result = testExternalGet (! 0); |
894 | if (test_result) | 895 | if (test_result) |
895 | fprintf (stderr, "FAILED: testExternalGet () - %u.\n", test_result); | 896 | fprintf (stderr, "FAILED: testExternalGet (!0) - %u.\n", test_result); |
896 | else if (verbose) | 897 | else if (verbose) |
897 | printf ("PASSED: testExternalGet ().\n"); | 898 | printf ("PASSED: testExternalGet ().\n"); |
898 | errorCount += test_result; | 899 | errorCount += test_result; |
899 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) | 900 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) |
900 | { | 901 | { |
902 | test_result += testExternalGet (0); | ||
903 | if (test_result) | ||
904 | fprintf (stderr, "FAILED: testExternalGet (0) - %u.\n", test_result); | ||
905 | else if (verbose) | ||
906 | printf ("PASSED: testExternalGet ().\n"); | ||
907 | errorCount += test_result; | ||
901 | test_result += testInternalGet (0); | 908 | test_result += testInternalGet (0); |
902 | if (test_result) | 909 | if (test_result) |
903 | fprintf (stderr, "FAILED: testInternalGet (0) - %u.\n", test_result); | 910 | fprintf (stderr, "FAILED: testInternalGet (0) - %u.\n", test_result); |
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c index 1b985ce2..9ffa8041 100644 --- a/src/testcurl/test_get_chunked.c +++ b/src/testcurl/test_get_chunked.c | |||
@@ -591,7 +591,7 @@ testExternalGet (void) | |||
591 | cbc.buf = buf; | 591 | cbc.buf = buf; |
592 | cbc.size = 2048; | 592 | cbc.size = 2048; |
593 | cbc.pos = 0; | 593 | cbc.pos = 0; |
594 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 594 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
595 | port, NULL, NULL, &ahc_echo, NULL, | 595 | port, NULL, NULL, &ahc_echo, NULL, |
596 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 596 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
597 | MHD_OPTION_END); | 597 | MHD_OPTION_END); |
diff --git a/src/testcurl/test_get_close_keep_alive.c b/src/testcurl/test_get_close_keep_alive.c index 5771bec9..b84e9640 100644 --- a/src/testcurl/test_get_close_keep_alive.c +++ b/src/testcurl/test_get_close_keep_alive.c | |||
@@ -958,7 +958,7 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
958 | 958 | ||
959 | if (testMhdThreadExternal == thrType) | 959 | if (testMhdThreadExternal == thrType) |
960 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) | 960 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) |
961 | | MHD_USE_ERROR_LOG, | 961 | | MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
962 | *pport, NULL, NULL, | 962 | *pport, NULL, NULL, |
963 | &ahc_echo, NULL, | 963 | &ahc_echo, NULL, |
964 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 964 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |
diff --git a/src/testcurl/test_get_iovec.c b/src/testcurl/test_get_iovec.c index 00e4fa3e..f1a83ece 100644 --- a/src/testcurl/test_get_iovec.c +++ b/src/testcurl/test_get_iovec.c | |||
@@ -481,7 +481,7 @@ testMultithreadedPoolGet (void) | |||
481 | 481 | ||
482 | 482 | ||
483 | static unsigned int | 483 | static unsigned int |
484 | testExternalGet (void) | 484 | testExternalGet (int thread_unsafe) |
485 | { | 485 | { |
486 | struct MHD_Daemon *d; | 486 | struct MHD_Daemon *d; |
487 | CURL *c; | 487 | CURL *c; |
@@ -516,7 +516,8 @@ testExternalGet (void) | |||
516 | cbc.buf = (char *) readbuf; | 516 | cbc.buf = (char *) readbuf; |
517 | cbc.size = sizeof(readbuf); | 517 | cbc.size = sizeof(readbuf); |
518 | cbc.pos = 0; | 518 | cbc.pos = 0; |
519 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 519 | d = MHD_start_daemon (MHD_USE_ERROR_LOG |
520 | | (thread_unsafe ? MHD_USE_NO_THREAD_SAFETY : 0), | ||
520 | port, NULL, NULL, &ahc_cont, NULL, | 521 | port, NULL, NULL, &ahc_cont, NULL, |
521 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 522 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
522 | MHD_OPTION_END); | 523 | MHD_OPTION_END); |
@@ -773,8 +774,9 @@ main (int argc, char *const *argv) | |||
773 | errorCount += testMultithreadedGet (); | 774 | errorCount += testMultithreadedGet (); |
774 | errorCount += testMultithreadedPoolGet (); | 775 | errorCount += testMultithreadedPoolGet (); |
775 | errorCount += testUnknownPortGet (); | 776 | errorCount += testUnknownPortGet (); |
777 | errorCount += testExternalGet (0); | ||
776 | } | 778 | } |
777 | errorCount += testExternalGet (); | 779 | errorCount += testExternalGet (! 0); |
778 | if (errorCount != 0) | 780 | if (errorCount != 0) |
779 | fprintf (stderr, "Error (code: %u)\n", errorCount); | 781 | fprintf (stderr, "Error (code: %u)\n", errorCount); |
780 | curl_global_cleanup (); | 782 | curl_global_cleanup (); |
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c index 698a7c2e..01be8122 100644 --- a/src/testcurl/test_get_sendfile.c +++ b/src/testcurl/test_get_sendfile.c | |||
@@ -337,7 +337,7 @@ testMultithreadedPoolGet (void) | |||
337 | 337 | ||
338 | 338 | ||
339 | static unsigned int | 339 | static unsigned int |
340 | testExternalGet (void) | 340 | testExternalGet (int thread_unsafe) |
341 | { | 341 | { |
342 | struct MHD_Daemon *d; | 342 | struct MHD_Daemon *d; |
343 | CURL *c; | 343 | CURL *c; |
@@ -373,7 +373,8 @@ testExternalGet (void) | |||
373 | cbc.buf = buf; | 373 | cbc.buf = buf; |
374 | cbc.size = 2048; | 374 | cbc.size = 2048; |
375 | cbc.pos = 0; | 375 | cbc.pos = 0; |
376 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 376 | d = MHD_start_daemon (MHD_USE_ERROR_LOG |
377 | | (thread_unsafe ? MHD_USE_NO_THREAD_SAFETY : 0), | ||
377 | port, NULL, NULL, &ahc_echo, NULL, | 378 | port, NULL, NULL, &ahc_echo, NULL, |
378 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 379 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
379 | MHD_OPTION_END); | 380 | MHD_OPTION_END); |
@@ -660,8 +661,9 @@ main (int argc, char *const *argv) | |||
660 | errorCount += testMultithreadedGet (); | 661 | errorCount += testMultithreadedGet (); |
661 | errorCount += testMultithreadedPoolGet (); | 662 | errorCount += testMultithreadedPoolGet (); |
662 | errorCount += testUnknownPortGet (); | 663 | errorCount += testUnknownPortGet (); |
664 | errorCount += testExternalGet (0); | ||
663 | } | 665 | } |
664 | errorCount += testExternalGet (); | 666 | errorCount += testExternalGet (! 0); |
665 | if (errorCount != 0) | 667 | if (errorCount != 0) |
666 | fprintf (stderr, "Error (code: %u)\n", errorCount); | 668 | fprintf (stderr, "Error (code: %u)\n", errorCount); |
667 | curl_global_cleanup (); | 669 | curl_global_cleanup (); |
diff --git a/src/testcurl/test_head.c b/src/testcurl/test_head.c index 4f820880..226663d3 100644 --- a/src/testcurl/test_head.c +++ b/src/testcurl/test_head.c | |||
@@ -756,7 +756,7 @@ testHead (void) | |||
756 | else | 756 | else |
757 | port = 4220 + oneone ? 0 : 1; | 757 | port = 4220 + oneone ? 0 : 1; |
758 | 758 | ||
759 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 759 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
760 | port, NULL, NULL, | 760 | port, NULL, NULL, |
761 | &ahcCheck, &ahc_param, | 761 | &ahcCheck, &ahc_param, |
762 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 762 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c index d2612fa8..64669a44 100644 --- a/src/testcurl/test_large_put.c +++ b/src/testcurl/test_large_put.c | |||
@@ -647,7 +647,7 @@ testPutExternal (void) | |||
647 | cbc.size = 2048; | 647 | cbc.size = 2048; |
648 | cbc.pos = 0; | 648 | cbc.pos = 0; |
649 | multi = NULL; | 649 | multi = NULL; |
650 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 650 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
651 | port, | 651 | port, |
652 | NULL, NULL, &ahc_echo, &done_flag, | 652 | NULL, NULL, &ahc_echo, &done_flag, |
653 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 653 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
diff --git a/src/testcurl/test_parse_cookies.c b/src/testcurl/test_parse_cookies.c index d81f0765..41c408a9 100644 --- a/src/testcurl/test_parse_cookies.c +++ b/src/testcurl/test_parse_cookies.c | |||
@@ -1646,7 +1646,7 @@ testExternalPolling (void) | |||
1646 | else | 1646 | else |
1647 | port = 1340 + oneone ? 0 : 6 + (uint16_t) (1 + discp_level); | 1647 | port = 1340 + oneone ? 0 : 6 + (uint16_t) (1 + discp_level); |
1648 | 1648 | ||
1649 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 1649 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
1650 | port, NULL, NULL, | 1650 | port, NULL, NULL, |
1651 | &ahcCheck, &ahc_param, | 1651 | &ahcCheck, &ahc_param, |
1652 | MHD_OPTION_CLIENT_DISCIPLINE_LVL, | 1652 | MHD_OPTION_CLIENT_DISCIPLINE_LVL, |
diff --git a/src/testcurl/test_patch.c b/src/testcurl/test_patch.c index e5f37901..c13712e0 100644 --- a/src/testcurl/test_patch.c +++ b/src/testcurl/test_patch.c | |||
@@ -374,7 +374,7 @@ testExternalPut (void) | |||
374 | cbc.buf = buf; | 374 | cbc.buf = buf; |
375 | cbc.size = 2048; | 375 | cbc.size = 2048; |
376 | cbc.pos = 0; | 376 | cbc.pos = 0; |
377 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 377 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
378 | port, | 378 | port, |
379 | NULL, NULL, &ahc_echo, &done_flag, | 379 | NULL, NULL, &ahc_echo, &done_flag, |
380 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 380 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index 3f64c0a4..58409cc1 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -433,7 +433,7 @@ testExternalPost (void) | |||
433 | cbc.buf = buf; | 433 | cbc.buf = buf; |
434 | cbc.size = 2048; | 434 | cbc.size = 2048; |
435 | cbc.pos = 0; | 435 | cbc.pos = 0; |
436 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 436 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
437 | port, NULL, NULL, &ahc_echo, NULL, | 437 | port, NULL, NULL, &ahc_echo, NULL, |
438 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 438 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
439 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 439 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index 7144abdd..5f2b7ad3 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -431,7 +431,7 @@ testExternalPost (void) | |||
431 | cbc.buf = buf; | 431 | cbc.buf = buf; |
432 | cbc.size = 2048; | 432 | cbc.size = 2048; |
433 | cbc.pos = 0; | 433 | cbc.pos = 0; |
434 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 434 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
435 | port, NULL, NULL, &ahc_echo, NULL, | 435 | port, NULL, NULL, &ahc_echo, NULL, |
436 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 436 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
437 | MHD_OPTION_END); | 437 | MHD_OPTION_END); |
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c index bbd0d137..32809fa9 100644 --- a/src/testcurl/test_postform.c +++ b/src/testcurl/test_postform.c | |||
@@ -557,7 +557,7 @@ testExternalPost (void) | |||
557 | cbc.buf = buf; | 557 | cbc.buf = buf; |
558 | cbc.size = 2048; | 558 | cbc.size = 2048; |
559 | cbc.pos = 0; | 559 | cbc.pos = 0; |
560 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 560 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
561 | port, NULL, NULL, &ahc_echo, NULL, | 561 | port, NULL, NULL, &ahc_echo, NULL, |
562 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 562 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
563 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 563 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_process_arguments.c b/src/testcurl/test_process_arguments.c index f9720b89..8f010057 100644 --- a/src/testcurl/test_process_arguments.c +++ b/src/testcurl/test_process_arguments.c | |||
@@ -149,7 +149,7 @@ testExternalGet (void) | |||
149 | cbc.buf = buf; | 149 | cbc.buf = buf; |
150 | cbc.size = 2048; | 150 | cbc.size = 2048; |
151 | cbc.pos = 0; | 151 | cbc.pos = 0; |
152 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 152 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
153 | port, NULL, NULL, &ahc_echo, NULL, | 153 | port, NULL, NULL, &ahc_echo, NULL, |
154 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 154 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
155 | MHD_OPTION_END); | 155 | MHD_OPTION_END); |
diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c index ce30b8a9..34f52d5a 100644 --- a/src/testcurl/test_process_headers.c +++ b/src/testcurl/test_process_headers.c | |||
@@ -406,7 +406,7 @@ testExternalGet (void) | |||
406 | cbc.buf = buf; | 406 | cbc.buf = buf; |
407 | cbc.size = 2048; | 407 | cbc.size = 2048; |
408 | cbc.pos = 0; | 408 | cbc.pos = 0; |
409 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 409 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
410 | port, NULL, NULL, &ahc_echo, NULL, | 410 | port, NULL, NULL, &ahc_echo, NULL, |
411 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 411 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
412 | MHD_OPTION_END); | 412 | MHD_OPTION_END); |
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c index 97ed8591..e321a0b4 100644 --- a/src/testcurl/test_put.c +++ b/src/testcurl/test_put.c | |||
@@ -398,7 +398,7 @@ testExternalPut (void) | |||
398 | cbc.buf = buf; | 398 | cbc.buf = buf; |
399 | cbc.size = 2048; | 399 | cbc.size = 2048; |
400 | cbc.pos = 0; | 400 | cbc.pos = 0; |
401 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 401 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
402 | port, | 402 | port, |
403 | NULL, NULL, &ahc_echo, &done_flag, | 403 | NULL, NULL, &ahc_echo, &done_flag, |
404 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 404 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_put_broken_len.c b/src/testcurl/test_put_broken_len.c index 65e8cd82..52a48c79 100644 --- a/src/testcurl/test_put_broken_len.c +++ b/src/testcurl/test_put_broken_len.c | |||
@@ -628,7 +628,7 @@ performTest (void) | |||
628 | else | 628 | else |
629 | port = 4220 + oneone ? 0 : 1; | 629 | port = 4220 + oneone ? 0 : 1; |
630 | 630 | ||
631 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 631 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
632 | port, NULL, NULL, | 632 | port, NULL, NULL, |
633 | &ahcCheck, &ahc_param, | 633 | &ahcCheck, &ahc_param, |
634 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, | 634 | MHD_OPTION_APP_FD_SETSIZE, (int) FD_SETSIZE, |
diff --git a/src/testcurl/test_put_header_fold.c b/src/testcurl/test_put_header_fold.c index 9b77ed99..ad9b7450 100644 --- a/src/testcurl/test_put_header_fold.c +++ b/src/testcurl/test_put_header_fold.c | |||
@@ -1147,7 +1147,7 @@ performCheck (void) | |||
1147 | mem_limit = (size_t) ((TEST_UPLOAD_DATA_SIZE * 4) / 3 + 2 | 1147 | mem_limit = (size_t) ((TEST_UPLOAD_DATA_SIZE * 4) / 3 + 2 |
1148 | + HEADERS_POINTERS_SIZE); | 1148 | + HEADERS_POINTERS_SIZE); |
1149 | 1149 | ||
1150 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 1150 | d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_NO_THREAD_SAFETY, |
1151 | port, NULL, NULL, | 1151 | port, NULL, NULL, |
1152 | &ahcCheck, &ahc_param, | 1152 | &ahcCheck, &ahc_param, |
1153 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, mem_limit, | 1153 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, mem_limit, |
diff --git a/src/testcurl/test_toolarge.c b/src/testcurl/test_toolarge.c index e5d519c3..414f5c4f 100644 --- a/src/testcurl/test_toolarge.c +++ b/src/testcurl/test_toolarge.c | |||
@@ -1453,7 +1453,8 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
1453 | 1453 | ||
1454 | if (testMhdThreadExternal == thrType) | 1454 | if (testMhdThreadExternal == thrType) |
1455 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) | 1455 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) |
1456 | | (verbose ? MHD_USE_ERROR_LOG : 0), | 1456 | | (verbose ? MHD_USE_ERROR_LOG : 0) |
1457 | | MHD_USE_NO_THREAD_SAFETY, | ||
1457 | *pport, NULL, NULL, | 1458 | *pport, NULL, NULL, |
1458 | &ahcCheck, *ahc_param, | 1459 | &ahcCheck, *ahc_param, |
1459 | MHD_OPTION_URI_LOG_CALLBACK, &check_uri_cb, | 1460 | MHD_OPTION_URI_LOG_CALLBACK, &check_uri_cb, |
diff --git a/src/testcurl/test_tricky.c b/src/testcurl/test_tricky.c index b3f52484..8cb53a80 100644 --- a/src/testcurl/test_tricky.c +++ b/src/testcurl/test_tricky.c | |||
@@ -964,7 +964,8 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
964 | 964 | ||
965 | if (testMhdThreadExternal == thrType) | 965 | if (testMhdThreadExternal == thrType) |
966 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) | 966 | d = MHD_start_daemon (((unsigned int) thrType) | ((unsigned int) pollType) |
967 | | (verbose ? MHD_USE_ERROR_LOG : 0), | 967 | | (verbose ? MHD_USE_ERROR_LOG : 0) |
968 | | MHD_USE_NO_THREAD_SAFETY, | ||
968 | *pport, NULL, NULL, | 969 | *pport, NULL, NULL, |
969 | &ahcCheck, *ahc_param, | 970 | &ahcCheck, *ahc_param, |
970 | MHD_OPTION_URI_LOG_CALLBACK, &check_uri_cb, | 971 | MHD_OPTION_URI_LOG_CALLBACK, &check_uri_cb, |