aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd')
-rw-r--r--src/microhttpd/test_upgrade.c19
-rw-r--r--src/microhttpd/test_upgrade_ssl.c20
2 files changed, 31 insertions, 8 deletions
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 8de4c832..8a7a9c02 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -279,7 +279,8 @@ ahc_upgrade (void *cls,
279 279
280 280
281static int 281static int
282test_upgrade_internal (int flags) 282test_upgrade_internal (int flags,
283 unsigned int pool)
283{ 284{
284 struct MHD_Daemon *d; 285 struct MHD_Daemon *d;
285 MHD_socket sock; 286 MHD_socket sock;
@@ -289,6 +290,7 @@ test_upgrade_internal (int flags)
289 1080, 290 1080,
290 NULL, NULL, 291 NULL, NULL,
291 &ahc_upgrade, NULL, 292 &ahc_upgrade, NULL,
293 MHD_OPTION_THREAD_POOL_SIZE, pool,
292 MHD_OPTION_END); 294 MHD_OPTION_END);
293 if (NULL == d) 295 if (NULL == d)
294 return 2; 296 return 2;
@@ -323,12 +325,21 @@ main (int argc,
323{ 325{
324 int error_count = 0; 326 int error_count = 0;
325 327
326 error_count += test_upgrade_internal (MHD_USE_SELECT_INTERNALLY); 328 error_count += test_upgrade_internal (MHD_USE_SELECT_INTERNALLY,
329 1);
330 error_count += test_upgrade_internal (MHD_USE_SELECT_INTERNALLY,
331 2);
327#ifdef HAVE_POLL 332#ifdef HAVE_POLL
328 error_count += test_upgrade_internal (MHD_USE_POLL_INTERNALLY); 333 error_count += test_upgrade_internal (MHD_USE_POLL_INTERNALLY,
334 1);
335 error_count += test_upgrade_internal (MHD_USE_POLL_INTERNALLY,
336 2);
329#endif 337#endif
330#ifdef EPOLL_SUPPORT 338#ifdef EPOLL_SUPPORT
331 error_count += test_upgrade_internal (MHD_USE_EPOLL_INTERNALLY); 339 error_count += test_upgrade_internal (MHD_USE_EPOLL_INTERNALLY,
340 1);
341 error_count += test_upgrade_internal (MHD_USE_EPOLL_INTERNALLY,
342 2);
332#endif 343#endif
333 if (error_count != 0) 344 if (error_count != 0)
334 fprintf (stderr, 345 fprintf (stderr,
diff --git a/src/microhttpd/test_upgrade_ssl.c b/src/microhttpd/test_upgrade_ssl.c
index dd70a01d..229af8f5 100644
--- a/src/microhttpd/test_upgrade_ssl.c
+++ b/src/microhttpd/test_upgrade_ssl.c
@@ -393,7 +393,8 @@ ahc_upgrade (void *cls,
393 393
394 394
395static int 395static int
396test_upgrade_internal (int flags) 396test_upgrade_internal (int flags,
397 unsigned int pool)
397{ 398{
398 struct MHD_Daemon *d; 399 struct MHD_Daemon *d;
399 MHD_socket sock; 400 MHD_socket sock;
@@ -405,6 +406,7 @@ test_upgrade_internal (int flags)
405 &ahc_upgrade, NULL, 406 &ahc_upgrade, NULL,
406 MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem, 407 MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem,
407 MHD_OPTION_HTTPS_MEM_CERT, srv_signed_cert_pem, 408 MHD_OPTION_HTTPS_MEM_CERT, srv_signed_cert_pem,
409 MHD_OPTION_THREAD_POOL_SIZE, pool,
408 MHD_OPTION_END); 410 MHD_OPTION_END);
409 if (NULL == d) 411 if (NULL == d)
410 return 2; 412 return 2;
@@ -440,13 +442,23 @@ main (int argc,
440 442
441 if (0 != system ("openssl version 1> /dev/null")) 443 if (0 != system ("openssl version 1> /dev/null"))
442 return 77; /* openssl not available, can't run the test */ 444 return 77; /* openssl not available, can't run the test */
443 error_count += test_upgrade_internal (MHD_USE_SELECT_INTERNALLY); 445 error_count += test_upgrade_internal (MHD_USE_SELECT_INTERNALLY,
446 1);
447 error_count += test_upgrade_internal (MHD_USE_SELECT_INTERNALLY,
448 2);
444#ifdef HAVE_POLL 449#ifdef HAVE_POLL
445 error_count += test_upgrade_internal (MHD_USE_POLL_INTERNALLY); 450 error_count += test_upgrade_internal (MHD_USE_POLL_INTERNALLY,
451 1);
452 error_count += test_upgrade_internal (MHD_USE_POLL_INTERNALLY,
453 2);
446#endif 454#endif
447#ifdef EPOLL_SUPPORT 455#ifdef EPOLL_SUPPORT
448 error_count += test_upgrade_internal (MHD_USE_EPOLL_INTERNALLY | 456 error_count += test_upgrade_internal (MHD_USE_EPOLL_INTERNALLY |
449 MHD_USE_TLS_EPOLL_UPGRADE); 457 MHD_USE_TLS_EPOLL_UPGRADE,
458 1);
459 error_count += test_upgrade_internal (MHD_USE_EPOLL_INTERNALLY |
460 MHD_USE_TLS_EPOLL_UPGRADE,
461 2);
450#endif 462#endif
451 if (error_count != 0) 463 if (error_count != 0)
452 fprintf (stderr, 464 fprintf (stderr,