aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-06-14 14:30:31 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-06-14 14:30:31 +0300
commit846ecb5db3301d9811007f4b835d77e1a7b4c915 (patch)
tree7dd030ffebb52a71367d3266d6746ad5a6fcbe0a /src
parent7c06bcaef662c39633cbc2dacb5061c6fc9bfbdf (diff)
downloadlibmicrohttpd-846ecb5db3301d9811007f4b835d77e1a7b4c915.tar.gz
libmicrohttpd-846ecb5db3301d9811007f4b835d77e1a7b4c915.zip
test_upgrade{,_large}: fixed compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/microhttpd/test_upgrade.c56
-rw-r--r--src/microhttpd/test_upgrade_large.c62
2 files changed, 63 insertions, 55 deletions
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 2cdc880b..5c95a10c 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -596,7 +596,7 @@ static pthread_t pt_client;
596static volatile bool done; 596static volatile bool done;
597 597
598 598
599const char * 599static const char *
600term_reason_str (enum MHD_RequestTerminationCode term_code) 600term_reason_str (enum MHD_RequestTerminationCode term_code)
601{ 601{
602 switch ((int) term_code) 602 switch ((int) term_code)
@@ -776,7 +776,7 @@ send_all (struct wr_socket *sock,
776 size_t off; 776 size_t off;
777 777
778 make_blocking (wr_fd (sock)); 778 make_blocking (wr_fd (sock));
779 for (off = 0; off < len; off += ret) 779 for (off = 0; off < len; off += (size_t) ret)
780 { 780 {
781 ret = wr_send (sock, 781 ret = wr_send (sock,
782 &text[off], 782 &text[off],
@@ -856,7 +856,7 @@ recv_all (struct wr_socket *sock,
856 size_t off; 856 size_t off;
857 857
858 make_blocking (wr_fd (sock)); 858 make_blocking (wr_fd (sock));
859 for (off = 0; off < len; off += ret) 859 for (off = 0; off < len; off += (size_t) ret)
860 { 860 {
861 ret = wr_recv (sock, 861 ret = wr_recv (sock,
862 &buf[off], 862 &buf[off],
@@ -1117,8 +1117,12 @@ run_mhd_select_loop (struct MHD_Daemon *daemon)
1117 &to64); 1117 &to64);
1118 if (1000 < to64) 1118 if (1000 < to64)
1119 to64 = 1000; 1119 to64 = 1000;
1120 tv.tv_sec = to64 / 1000; 1120#if ! defined(_WIN32) || defined(__CYGWIN__)
1121 tv.tv_usec = 1000 * (to64 % 1000); 1121 tv.tv_sec = (time_t) (to64 / 1000);
1122#else /* Native W32 */
1123 tv.tv_sec = (long) (to64 / 1000);
1124#endif /* Native W32 */
1125 tv.tv_usec = (long) (1000 * (to64 % 1000));
1122 if (0 > MHD_SYS_select_ (max_fd + 1, 1126 if (0 > MHD_SYS_select_ (max_fd + 1,
1123 &rs, 1127 &rs,
1124 &ws, 1128 &ws,
@@ -1132,7 +1136,7 @@ run_mhd_select_loop (struct MHD_Daemon *daemon)
1132 if ((WSAEINVAL != WSAGetLastError ()) || 1136 if ((WSAEINVAL != WSAGetLastError ()) ||
1133 (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) ) 1137 (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) )
1134 externalErrorExitDesc ("Unexpected select() error"); 1138 externalErrorExitDesc ("Unexpected select() error");
1135 Sleep (tv.tv_sec * 1000 + tv.tv_usec / 1000); 1139 Sleep ((DWORD) (tv.tv_sec * 1000 + tv.tv_usec / 1000));
1136#endif 1140#endif
1137 } 1141 }
1138 MHD_run_from_select (daemon, 1142 MHD_run_from_select (daemon,
@@ -1250,8 +1254,8 @@ static bool test_tls;
1250 * @param flags which event loop style should be tested 1254 * @param flags which event loop style should be tested
1251 * @param pool size of the thread pool, 0 to disable 1255 * @param pool size of the thread pool, 0 to disable
1252 */ 1256 */
1253static int 1257static unsigned int
1254test_upgrade (int flags, 1258test_upgrade (unsigned int flags,
1255 unsigned int pool) 1259 unsigned int pool)
1256{ 1260{
1257 struct MHD_Daemon *d = NULL; 1261 struct MHD_Daemon *d = NULL;
@@ -1368,8 +1372,8 @@ int
1368main (int argc, 1372main (int argc,
1369 char *const *argv) 1373 char *const *argv)
1370{ 1374{
1371 int error_count = 0; 1375 unsigned int error_count = 0;
1372 int res; 1376 unsigned int res;
1373 1377
1374 use_tls_tool = TLS_CLI_NO_TOOL; 1378 use_tls_tool = TLS_CLI_NO_TOOL;
1375 test_tls = has_in_name (argv[0], "_tls"); 1379 test_tls = has_in_name (argv[0], "_tls");
@@ -1381,6 +1385,7 @@ main (int argc,
1381 1385
1382 if (test_tls) 1386 if (test_tls)
1383 { 1387 {
1388 use_tls_tool = TLS_LIB_GNUTLS; /* Should be always available as MHD uses it. */
1384#ifdef HTTPS_SUPPORT 1389#ifdef HTTPS_SUPPORT
1385 if (has_param (argc, argv, "--use-gnutls-cli")) 1390 if (has_param (argc, argv, "--use-gnutls-cli"))
1386 use_tls_tool = TLS_CLI_GNUTLS; 1391 use_tls_tool = TLS_CLI_GNUTLS;
@@ -1394,8 +1399,6 @@ main (int argc,
1394 else if (0 == system ("openssl version 1> /dev/null 2> /dev/null")) 1399 else if (0 == system ("openssl version 1> /dev/null 2> /dev/null"))
1395 use_tls_tool = TLS_CLI_OPENSSL; 1400 use_tls_tool = TLS_CLI_OPENSSL;
1396#endif /* HAVE_FORK && HAVE_WAITPID */ 1401#endif /* HAVE_FORK && HAVE_WAITPID */
1397 else
1398 use_tls_tool = TLS_LIB_GNUTLS; /* Should be available as MHD use it. */
1399 if (verbose) 1402 if (verbose)
1400 { 1403 {
1401 switch (use_tls_tool) 1404 switch (use_tls_tool)
@@ -1409,6 +1412,7 @@ main (int argc,
1409 case TLS_LIB_GNUTLS: 1412 case TLS_LIB_GNUTLS:
1410 printf ("GnuTLS library will be used for testing.\n"); 1413 printf ("GnuTLS library will be used for testing.\n");
1411 break; 1414 break;
1415 case TLS_CLI_NO_TOOL:
1412 default: 1416 default:
1413 externalErrorExitDesc ("Wrong 'use_tls_tool' value"); 1417 externalErrorExitDesc ("Wrong 'use_tls_tool' value");
1414 } 1418 }
@@ -1437,7 +1441,7 @@ main (int argc,
1437 error_count += res; 1441 error_count += res;
1438 if (res) 1442 if (res)
1439 fprintf (stderr, 1443 fprintf (stderr,
1440 "FAILED: Upgrade with external select, return code %d.\n", 1444 "FAILED: Upgrade with external select, return code %u.\n",
1441 res); 1445 res);
1442 else if (verbose) 1446 else if (verbose)
1443 printf ("PASSED: Upgrade with external select.\n"); 1447 printf ("PASSED: Upgrade with external select.\n");
@@ -1449,7 +1453,7 @@ main (int argc,
1449 error_count += res; 1453 error_count += res;
1450 if (res) 1454 if (res)
1451 fprintf (stderr, 1455 fprintf (stderr,
1452 "FAILED: Upgrade with external 'auto', return code %d.\n", 1456 "FAILED: Upgrade with external 'auto', return code %u.\n",
1453 res); 1457 res);
1454 else if (verbose) 1458 else if (verbose)
1455 printf ("PASSED: Upgrade with external 'auto'.\n"); 1459 printf ("PASSED: Upgrade with external 'auto'.\n");
@@ -1461,7 +1465,7 @@ main (int argc,
1461 error_count += res; 1465 error_count += res;
1462 if (res) 1466 if (res)
1463 fprintf (stderr, 1467 fprintf (stderr,
1464 "FAILED: Upgrade with external select with EPOLL, return code %d.\n", 1468 "FAILED: Upgrade with external select with EPOLL, return code %u.\n",
1465 res); 1469 res);
1466 else if (verbose) 1470 else if (verbose)
1467 printf ("PASSED: Upgrade with external select with EPOLL.\n"); 1471 printf ("PASSED: Upgrade with external select with EPOLL.\n");
@@ -1475,7 +1479,7 @@ main (int argc,
1475 error_count += res; 1479 error_count += res;
1476 if (res) 1480 if (res)
1477 fprintf (stderr, 1481 fprintf (stderr,
1478 "FAILED: Upgrade with thread per connection, return code %d.\n", 1482 "FAILED: Upgrade with thread per connection, return code %u.\n",
1479 res); 1483 res);
1480 else if (verbose) 1484 else if (verbose)
1481 printf ("PASSED: Upgrade with thread per connection.\n"); 1485 printf ("PASSED: Upgrade with thread per connection.\n");
@@ -1487,7 +1491,7 @@ main (int argc,
1487 error_count += res; 1491 error_count += res;
1488 if (res) 1492 if (res)
1489 fprintf (stderr, 1493 fprintf (stderr,
1490 "FAILED: Upgrade with thread per connection and 'auto', return code %d.\n", 1494 "FAILED: Upgrade with thread per connection and 'auto', return code %u.\n",
1491 res); 1495 res);
1492 else if (verbose) 1496 else if (verbose)
1493 printf ("PASSED: Upgrade with thread per connection and 'auto'.\n"); 1497 printf ("PASSED: Upgrade with thread per connection and 'auto'.\n");
@@ -1499,7 +1503,7 @@ main (int argc,
1499 error_count += res; 1503 error_count += res;
1500 if (res) 1504 if (res)
1501 fprintf (stderr, 1505 fprintf (stderr,
1502 "FAILED: Upgrade with thread per connection and poll, return code %d.\n", 1506 "FAILED: Upgrade with thread per connection and poll, return code %u.\n",
1503 res); 1507 res);
1504 else if (verbose) 1508 else if (verbose)
1505 printf ("PASSED: Upgrade with thread per connection and poll.\n"); 1509 printf ("PASSED: Upgrade with thread per connection and poll.\n");
@@ -1512,7 +1516,7 @@ main (int argc,
1512 error_count += res; 1516 error_count += res;
1513 if (res) 1517 if (res)
1514 fprintf (stderr, 1518 fprintf (stderr,
1515 "FAILED: Upgrade with internal select, return code %d.\n", 1519 "FAILED: Upgrade with internal select, return code %u.\n",
1516 res); 1520 res);
1517 else if (verbose) 1521 else if (verbose)
1518 printf ("PASSED: Upgrade with internal select.\n"); 1522 printf ("PASSED: Upgrade with internal select.\n");
@@ -1522,7 +1526,7 @@ main (int argc,
1522 error_count += res; 1526 error_count += res;
1523 if (res) 1527 if (res)
1524 fprintf (stderr, 1528 fprintf (stderr,
1525 "FAILED: Upgrade with internal select with thread pool, return code %d.\n", 1529 "FAILED: Upgrade with internal select with thread pool, return code %u.\n",
1526 res); 1530 res);
1527 else if (verbose) 1531 else if (verbose)
1528 printf ("PASSED: Upgrade with internal select with thread pool.\n"); 1532 printf ("PASSED: Upgrade with internal select with thread pool.\n");
@@ -1532,7 +1536,7 @@ main (int argc,
1532 error_count += res; 1536 error_count += res;
1533 if (res) 1537 if (res)
1534 fprintf (stderr, 1538 fprintf (stderr,
1535 "FAILED: Upgrade with internal 'auto' return code %d.\n", 1539 "FAILED: Upgrade with internal 'auto' return code %u.\n",
1536 res); 1540 res);
1537 else if (verbose) 1541 else if (verbose)
1538 printf ("PASSED: Upgrade with internal 'auto'.\n"); 1542 printf ("PASSED: Upgrade with internal 'auto'.\n");
@@ -1542,7 +1546,7 @@ main (int argc,
1542 error_count += res; 1546 error_count += res;
1543 if (res) 1547 if (res)
1544 fprintf (stderr, 1548 fprintf (stderr,
1545 "FAILED: Upgrade with internal 'auto' with thread pool, return code %d.\n", 1549 "FAILED: Upgrade with internal 'auto' with thread pool, return code %u.\n",
1546 res); 1550 res);
1547 else if (verbose) 1551 else if (verbose)
1548 printf ("PASSED: Upgrade with internal 'auto' with thread pool.\n"); 1552 printf ("PASSED: Upgrade with internal 'auto' with thread pool.\n");
@@ -1553,7 +1557,7 @@ main (int argc,
1553 error_count += res; 1557 error_count += res;
1554 if (res) 1558 if (res)
1555 fprintf (stderr, 1559 fprintf (stderr,
1556 "FAILED: Upgrade with internal poll, return code %d.\n", 1560 "FAILED: Upgrade with internal poll, return code %u.\n",
1557 res); 1561 res);
1558 else if (verbose) 1562 else if (verbose)
1559 printf ("PASSED: Upgrade with internal poll.\n"); 1563 printf ("PASSED: Upgrade with internal poll.\n");
@@ -1562,7 +1566,7 @@ main (int argc,
1562 fflush_allstd (); 1566 fflush_allstd ();
1563 if (res) 1567 if (res)
1564 fprintf (stderr, 1568 fprintf (stderr,
1565 "FAILED: Upgrade with internal poll with thread pool, return code %d.\n", 1569 "FAILED: Upgrade with internal poll with thread pool, return code %u.\n",
1566 res); 1570 res);
1567 else if (verbose) 1571 else if (verbose)
1568 printf ("PASSED: Upgrade with internal poll with thread pool.\n"); 1572 printf ("PASSED: Upgrade with internal poll with thread pool.\n");
@@ -1573,7 +1577,7 @@ main (int argc,
1573 fflush_allstd (); 1577 fflush_allstd ();
1574 if (res) 1578 if (res)
1575 fprintf (stderr, 1579 fprintf (stderr,
1576 "FAILED: Upgrade with internal epoll, return code %d.\n", 1580 "FAILED: Upgrade with internal epoll, return code %u.\n",
1577 res); 1581 res);
1578 else if (verbose) 1582 else if (verbose)
1579 printf ("PASSED: Upgrade with internal epoll.\n"); 1583 printf ("PASSED: Upgrade with internal epoll.\n");
@@ -1582,7 +1586,7 @@ main (int argc,
1582 fflush_allstd (); 1586 fflush_allstd ();
1583 if (res) 1587 if (res)
1584 fprintf (stderr, 1588 fprintf (stderr,
1585 "FAILED: Upgrade with internal epoll, return code %d.\n", 1589 "FAILED: Upgrade with internal epoll, return code %u.\n",
1586 res); 1590 res);
1587 else if (verbose) 1591 else if (verbose)
1588 printf ("PASSED: Upgrade with internal epoll.\n"); 1592 printf ("PASSED: Upgrade with internal epoll.\n");
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c
index 2979325b..e6c9b01b 100644
--- a/src/microhttpd/test_upgrade_large.c
+++ b/src/microhttpd/test_upgrade_large.c
@@ -764,7 +764,7 @@ static pthread_t pt_client;
764static volatile bool done; 764static volatile bool done;
765 765
766 766
767const char * 767static const char *
768term_reason_str (enum MHD_RequestTerminationCode term_code) 768term_reason_str (enum MHD_RequestTerminationCode term_code)
769{ 769{
770 switch ((int) term_code) 770 switch ((int) term_code)
@@ -935,7 +935,7 @@ make_blocking (MHD_socket fd)
935 935
936 936
937static void 937static void
938kick_select () 938kick_select (void)
939{ 939{
940 if (MHD_ITC_IS_VALID_ (kicker)) 940 if (MHD_ITC_IS_VALID_ (kicker))
941 { 941 {
@@ -953,7 +953,7 @@ send_all (struct wr_socket *sock,
953 size_t off; 953 size_t off;
954 954
955 make_blocking (wr_fd (sock)); 955 make_blocking (wr_fd (sock));
956 for (off = 0; off < len; off += ret) 956 for (off = 0; off < len; off += (size_t) ret)
957 { 957 {
958 ret = wr_send (sock, 958 ret = wr_send (sock,
959 &text[off], 959 &text[off],
@@ -1033,7 +1033,7 @@ recv_all (struct wr_socket *sock,
1033 size_t off; 1033 size_t off;
1034 1034
1035 make_blocking (wr_fd (sock)); 1035 make_blocking (wr_fd (sock));
1036 for (off = 0; off < len; off += ret) 1036 for (off = 0; off < len; off += (size_t) ret)
1037 { 1037 {
1038 ret = wr_recv (sock, 1038 ret = wr_recv (sock,
1039 &buf[off], 1039 &buf[off],
@@ -1050,10 +1050,10 @@ recv_all (struct wr_socket *sock,
1050 } 1050 }
1051 if (0 == ret) 1051 if (0 == ret)
1052 mhdErrorExitDesc ("The server unexpectedly closed connection"); 1052 mhdErrorExitDesc ("The server unexpectedly closed connection");
1053 if (0 != strncmp (text, buf, off + ret)) 1053 if (0 != strncmp (text, buf, off + (size_t) ret))
1054 { 1054 {
1055 fprintf (stderr, "Wrong received text. Expected: '%s' ." 1055 fprintf (stderr, "Wrong received text. Expected: '%s' ."
1056 "Got: '%.*s'. ", text, (int) (off + ret), buf); 1056 "Got: '%.*s'. ", text, (int) (off + (size_t) ret), buf);
1057 mhdErrorExit (); 1057 mhdErrorExit ();
1058 } 1058 }
1059 } 1059 }
@@ -1301,8 +1301,12 @@ run_mhd_select_loop (struct MHD_Daemon *daemon)
1301 &to64); 1301 &to64);
1302 if (1000 < to64) 1302 if (1000 < to64)
1303 to64 = 1000; 1303 to64 = 1000;
1304 tv.tv_sec = to64 / 1000; 1304#if ! defined(_WIN32) || defined(__CYGWIN__)
1305 tv.tv_usec = 1000 * (to64 % 1000); 1305 tv.tv_sec = (time_t) (to64 / 1000);
1306#else /* Native W32 */
1307 tv.tv_sec = (long) (to64 / 1000);
1308#endif /* Native W32 */
1309 tv.tv_usec = (long) (1000 * (to64 % 1000));
1306 if (0 > MHD_SYS_select_ (max_fd + 1, 1310 if (0 > MHD_SYS_select_ (max_fd + 1,
1307 &rs, 1311 &rs,
1308 &ws, 1312 &ws,
@@ -1316,7 +1320,7 @@ run_mhd_select_loop (struct MHD_Daemon *daemon)
1316 if ((WSAEINVAL != WSAGetLastError ()) || 1320 if ((WSAEINVAL != WSAGetLastError ()) ||
1317 (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) ) 1321 (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) )
1318 externalErrorExitDesc ("Unexpected select() error"); 1322 externalErrorExitDesc ("Unexpected select() error");
1319 Sleep (tv.tv_sec * 1000 + tv.tv_usec / 1000); 1323 Sleep ((DWORD) (tv.tv_sec * 1000 + tv.tv_usec / 1000));
1320#endif 1324#endif
1321 } 1325 }
1322 if (FD_ISSET (MHD_itc_r_fd_ (kicker), &rs)) 1326 if (FD_ISSET (MHD_itc_r_fd_ (kicker), &rs))
@@ -1438,8 +1442,8 @@ static bool test_tls;
1438 * @param flags which event loop style should be tested 1442 * @param flags which event loop style should be tested
1439 * @param pool size of the thread pool, 0 to disable 1443 * @param pool size of the thread pool, 0 to disable
1440 */ 1444 */
1441static int 1445static unsigned int
1442test_upgrade (int flags, 1446test_upgrade (unsigned int flags,
1443 unsigned int pool) 1447 unsigned int pool)
1444{ 1448{
1445 struct MHD_Daemon *d = NULL; 1449 struct MHD_Daemon *d = NULL;
@@ -1569,8 +1573,8 @@ int
1569main (int argc, 1573main (int argc,
1570 char *const *argv) 1574 char *const *argv)
1571{ 1575{
1572 int error_count = 0; 1576 unsigned int error_count = 0;
1573 int res; 1577 unsigned int res;
1574 1578
1575 use_tls_tool = TLS_CLI_NO_TOOL; 1579 use_tls_tool = TLS_CLI_NO_TOOL;
1576 test_tls = has_in_name (argv[0], "_tls"); 1580 test_tls = has_in_name (argv[0], "_tls");
@@ -1582,6 +1586,7 @@ main (int argc,
1582 if (test_tls) 1586 if (test_tls)
1583 { 1587 {
1584#ifdef HTTPS_SUPPORT 1588#ifdef HTTPS_SUPPORT
1589 use_tls_tool = TLS_LIB_GNUTLS; /* Should be always available as MHD uses it. */
1585 if (has_param (argc, argv, "--use-gnutls-cli")) 1590 if (has_param (argc, argv, "--use-gnutls-cli"))
1586 use_tls_tool = TLS_CLI_GNUTLS; 1591 use_tls_tool = TLS_CLI_GNUTLS;
1587 else if (has_param (argc, argv, "--use-openssl")) 1592 else if (has_param (argc, argv, "--use-openssl"))
@@ -1594,8 +1599,6 @@ main (int argc,
1594 else if (0 == system ("openssl version 1> /dev/null 2> /dev/null")) 1599 else if (0 == system ("openssl version 1> /dev/null 2> /dev/null"))
1595 use_tls_tool = TLS_CLI_OPENSSL; 1600 use_tls_tool = TLS_CLI_OPENSSL;
1596#endif /* HAVE_FORK && HAVE_WAITPID */ 1601#endif /* HAVE_FORK && HAVE_WAITPID */
1597 else
1598 use_tls_tool = TLS_LIB_GNUTLS; /* Should be available as MHD use it. */
1599 if (verbose) 1602 if (verbose)
1600 { 1603 {
1601 switch (use_tls_tool) 1604 switch (use_tls_tool)
@@ -1609,6 +1612,7 @@ main (int argc,
1609 case TLS_LIB_GNUTLS: 1612 case TLS_LIB_GNUTLS:
1610 printf ("GnuTLS library will be used for testing.\n"); 1613 printf ("GnuTLS library will be used for testing.\n");
1611 break; 1614 break;
1615 case TLS_CLI_NO_TOOL:
1612 default: 1616 default:
1613 externalErrorExitDesc ("Wrong 'use_tls_tool' value"); 1617 externalErrorExitDesc ("Wrong 'use_tls_tool' value");
1614 } 1618 }
@@ -1637,7 +1641,7 @@ main (int argc,
1637 error_count += res; 1641 error_count += res;
1638 if (res) 1642 if (res)
1639 fprintf (stderr, 1643 fprintf (stderr,
1640 "FAILED: Upgrade with external select, return code %d.\n", 1644 "FAILED: Upgrade with external select, return code %u.\n",
1641 res); 1645 res);
1642 else if (verbose) 1646 else if (verbose)
1643 printf ("PASSED: Upgrade with external select.\n"); 1647 printf ("PASSED: Upgrade with external select.\n");
@@ -1649,7 +1653,7 @@ main (int argc,
1649 error_count += res; 1653 error_count += res;
1650 if (res) 1654 if (res)
1651 fprintf (stderr, 1655 fprintf (stderr,
1652 "FAILED: Upgrade with external 'auto', return code %d.\n", 1656 "FAILED: Upgrade with external 'auto', return code %u.\n",
1653 res); 1657 res);
1654 else if (verbose) 1658 else if (verbose)
1655 printf ("PASSED: Upgrade with external 'auto'.\n"); 1659 printf ("PASSED: Upgrade with external 'auto'.\n");
@@ -1661,7 +1665,7 @@ main (int argc,
1661 error_count += res; 1665 error_count += res;
1662 if (res) 1666 if (res)
1663 fprintf (stderr, 1667 fprintf (stderr,
1664 "FAILED: Upgrade with external select with EPOLL, return code %d.\n", 1668 "FAILED: Upgrade with external select with EPOLL, return code %u.\n",
1665 res); 1669 res);
1666 else if (verbose) 1670 else if (verbose)
1667 printf ("PASSED: Upgrade with external select with EPOLL.\n"); 1671 printf ("PASSED: Upgrade with external select with EPOLL.\n");
@@ -1675,7 +1679,7 @@ main (int argc,
1675 error_count += res; 1679 error_count += res;
1676 if (res) 1680 if (res)
1677 fprintf (stderr, 1681 fprintf (stderr,
1678 "FAILED: Upgrade with thread per connection, return code %d.\n", 1682 "FAILED: Upgrade with thread per connection, return code %u.\n",
1679 res); 1683 res);
1680 else if (verbose) 1684 else if (verbose)
1681 printf ("PASSED: Upgrade with thread per connection.\n"); 1685 printf ("PASSED: Upgrade with thread per connection.\n");
@@ -1687,7 +1691,7 @@ main (int argc,
1687 error_count += res; 1691 error_count += res;
1688 if (res) 1692 if (res)
1689 fprintf (stderr, 1693 fprintf (stderr,
1690 "FAILED: Upgrade with thread per connection and 'auto', return code %d.\n", 1694 "FAILED: Upgrade with thread per connection and 'auto', return code %u.\n",
1691 res); 1695 res);
1692 else if (verbose) 1696 else if (verbose)
1693 printf ("PASSED: Upgrade with thread per connection and 'auto'.\n"); 1697 printf ("PASSED: Upgrade with thread per connection and 'auto'.\n");
@@ -1699,7 +1703,7 @@ main (int argc,
1699 error_count += res; 1703 error_count += res;
1700 if (res) 1704 if (res)
1701 fprintf (stderr, 1705 fprintf (stderr,
1702 "FAILED: Upgrade with thread per connection and poll, return code %d.\n", 1706 "FAILED: Upgrade with thread per connection and poll, return code %u.\n",
1703 res); 1707 res);
1704 else if (verbose) 1708 else if (verbose)
1705 printf ("PASSED: Upgrade with thread per connection and poll.\n"); 1709 printf ("PASSED: Upgrade with thread per connection and poll.\n");
@@ -1712,7 +1716,7 @@ main (int argc,
1712 error_count += res; 1716 error_count += res;
1713 if (res) 1717 if (res)
1714 fprintf (stderr, 1718 fprintf (stderr,
1715 "FAILED: Upgrade with internal select, return code %d.\n", 1719 "FAILED: Upgrade with internal select, return code %u.\n",
1716 res); 1720 res);
1717 else if (verbose) 1721 else if (verbose)
1718 printf ("PASSED: Upgrade with internal select.\n"); 1722 printf ("PASSED: Upgrade with internal select.\n");
@@ -1722,7 +1726,7 @@ main (int argc,
1722 error_count += res; 1726 error_count += res;
1723 if (res) 1727 if (res)
1724 fprintf (stderr, 1728 fprintf (stderr,
1725 "FAILED: Upgrade with internal select with thread pool, return code %d.\n", 1729 "FAILED: Upgrade with internal select with thread pool, return code %u.\n",
1726 res); 1730 res);
1727 else if (verbose) 1731 else if (verbose)
1728 printf ("PASSED: Upgrade with internal select with thread pool.\n"); 1732 printf ("PASSED: Upgrade with internal select with thread pool.\n");
@@ -1732,7 +1736,7 @@ main (int argc,
1732 error_count += res; 1736 error_count += res;
1733 if (res) 1737 if (res)
1734 fprintf (stderr, 1738 fprintf (stderr,
1735 "FAILED: Upgrade with internal 'auto' return code %d.\n", 1739 "FAILED: Upgrade with internal 'auto' return code %u.\n",
1736 res); 1740 res);
1737 else if (verbose) 1741 else if (verbose)
1738 printf ("PASSED: Upgrade with internal 'auto'.\n"); 1742 printf ("PASSED: Upgrade with internal 'auto'.\n");
@@ -1742,7 +1746,7 @@ main (int argc,
1742 error_count += res; 1746 error_count += res;
1743 if (res) 1747 if (res)
1744 fprintf (stderr, 1748 fprintf (stderr,
1745 "FAILED: Upgrade with internal 'auto' with thread pool, return code %d.\n", 1749 "FAILED: Upgrade with internal 'auto' with thread pool, return code %u.\n",
1746 res); 1750 res);
1747 else if (verbose) 1751 else if (verbose)
1748 printf ("PASSED: Upgrade with internal 'auto' with thread pool.\n"); 1752 printf ("PASSED: Upgrade with internal 'auto' with thread pool.\n");
@@ -1753,7 +1757,7 @@ main (int argc,
1753 error_count += res; 1757 error_count += res;
1754 if (res) 1758 if (res)
1755 fprintf (stderr, 1759 fprintf (stderr,
1756 "FAILED: Upgrade with internal poll, return code %d.\n", 1760 "FAILED: Upgrade with internal poll, return code %u.\n",
1757 res); 1761 res);
1758 else if (verbose) 1762 else if (verbose)
1759 printf ("PASSED: Upgrade with internal poll.\n"); 1763 printf ("PASSED: Upgrade with internal poll.\n");
@@ -1762,7 +1766,7 @@ main (int argc,
1762 fflush_allstd (); 1766 fflush_allstd ();
1763 if (res) 1767 if (res)
1764 fprintf (stderr, 1768 fprintf (stderr,
1765 "FAILED: Upgrade with internal poll with thread pool, return code %d.\n", 1769 "FAILED: Upgrade with internal poll with thread pool, return code %u.\n",
1766 res); 1770 res);
1767 else if (verbose) 1771 else if (verbose)
1768 printf ("PASSED: Upgrade with internal poll with thread pool.\n"); 1772 printf ("PASSED: Upgrade with internal poll with thread pool.\n");
@@ -1773,7 +1777,7 @@ main (int argc,
1773 fflush_allstd (); 1777 fflush_allstd ();
1774 if (res) 1778 if (res)
1775 fprintf (stderr, 1779 fprintf (stderr,
1776 "FAILED: Upgrade with internal epoll, return code %d.\n", 1780 "FAILED: Upgrade with internal epoll, return code %u.\n",
1777 res); 1781 res);
1778 else if (verbose) 1782 else if (verbose)
1779 printf ("PASSED: Upgrade with internal epoll.\n"); 1783 printf ("PASSED: Upgrade with internal epoll.\n");
@@ -1782,7 +1786,7 @@ main (int argc,
1782 fflush_allstd (); 1786 fflush_allstd ();
1783 if (res) 1787 if (res)
1784 fprintf (stderr, 1788 fprintf (stderr,
1785 "FAILED: Upgrade with internal epoll, return code %d.\n", 1789 "FAILED: Upgrade with internal epoll, return code %u.\n",
1786 res); 1790 res);
1787 else if (verbose) 1791 else if (verbose)
1788 printf ("PASSED: Upgrade with internal epoll.\n"); 1792 printf ("PASSED: Upgrade with internal epoll.\n");