curl/tests/libtest
Daniel Stenberg c72cefea0f
select: use poll() if existing, avoid poll() with no sockets
poll() on macOS 10.12 was deemed broken in 2016 when we discovered that
it misbehaves when provided with no sockets to wait for. The
HAVE_POLL_FINE is used to mark a poll() implementation that behaves
correctly: it *should* still wait the timeout time.

curl has therefore opted to use select() on Apple operating systems ever
since. To avoid the risk that this or other breakage cause problems.

However, using select() internally is also bad because it suffers from
problems when using file descriptors beyond 1024.

This change makes poll() used if it is present, but if there is no
sockets to wait for it avoids using poll() and instead falls back to
select() - but without any sockets to wait for there is no 1024 problem.

This removes all previous special-handling involving HAVE_POLL_FINE.

ref: https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/

Closes #15096
2024-10-01 15:11:50 +02:00
..
.checksrc checksrc: ban gmtime/localtime 2020-07-28 23:51:17 +02:00
.gitignore tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
CMakeLists.txt tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
first.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
first.h tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib500.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib501.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib502.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib503.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib504.c test504: fix handling on pending connect 2024-09-26 16:57:51 +02:00
lib505.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib506.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib507.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib508.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib509.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib510.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib511.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib512.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib513.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib514.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib515.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib516.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib517.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib518.c select: use poll() if existing, avoid poll() with no sockets 2024-10-01 15:11:50 +02:00
lib519.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib520.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib521.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib523.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib524.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib525.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib526.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib530.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib533.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib536.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib537.c select: use poll() if existing, avoid poll() with no sockets 2024-10-01 15:11:50 +02:00
lib539.c tests: provide FTP directory contents in the test file 2024-07-29 13:04:24 +02:00
lib540.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib541.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib542.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib543.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib544.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib547.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib549.c tidy-up: misc spelling (bit, ASCII) 2024-08-15 15:30:09 +02:00
lib552.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib553.c cmake: allow building tests in unity mode 2024-09-19 21:32:58 +02:00
lib554.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib555.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib556.c test556: improve robustness 2024-08-09 09:38:19 +02:00
lib557.c build: fix possible -Wformat-overflow in lib557 with test bundle builds 2024-09-23 11:52:55 +02:00
lib558.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib559.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib560.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib562.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib564.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib566.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib567.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib568.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib569.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib570.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib571.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib572.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib573.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib574.c tests: provide FTP directory contents in the test file 2024-07-29 13:04:24 +02:00
lib575.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib576.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib578.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib579.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib582.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib583.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib586.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib589.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib590.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib591.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib597.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib598.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib599.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib643.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib650.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib651.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib652.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib653.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib654.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib655.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib658.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib659.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib661.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib666.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib667.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib668.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib670.c cleanup: added space around ternary expressions 2024-09-25 08:02:01 +02:00
lib674.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib676.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib677.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib678.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1156.c cleanup: added space around ternary expressions 2024-09-25 08:02:01 +02:00
lib1301.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1485.c http: write last header line late 2024-05-25 23:42:53 +02:00
lib1500.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1501.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1502.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1506.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1507.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1508.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1509.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1510.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1511.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1512.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1513.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1514.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1515.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1517.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1518.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1520.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1522.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1523.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1525.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1526.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1527.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1528.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1529.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1530.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1531.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1532.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1533.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1534.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1535.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1536.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1537.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1538.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1540.c test1540: add debug logging 2024-09-26 16:58:42 +02:00
lib1541.c getinfo: add CURLINFO_POSTTRANSFER_TIME_T 2024-08-15 09:02:58 +02:00
lib1542.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1545.c build: tidy up deprecation suppression, enable warnings for clang 2024-09-21 00:59:52 +02:00
lib1550.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1551.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1552.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1553.c multi: fix multi_wait() timeout handling 2024-05-30 08:29:00 +02:00
lib1554.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1555.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1556.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1557.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1558.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1559.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1560.c WebSockets: make support official (non-experimental) 2024-09-27 13:20:25 +02:00
lib1564.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1565.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1567.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1568.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1569.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1591.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1592.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1593.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1594.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1597.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1598.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1662.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1900.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1901.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1903.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1905.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1906.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1907.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1908.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1910.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1911.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1912.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1913.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1915.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1916.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1918.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1919.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1933.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1934.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1935.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1936.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1937.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1938.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1939.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1940.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
lib1945.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1947.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1948.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1955.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1956.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1957.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1958.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1959.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1960.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1964.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1970.c misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
lib1971.c misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
lib1972.c misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
lib1973.c misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
lib1974.c misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
lib1975.c misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
lib2301.c WebSockets: make support official (non-experimental) 2024-09-27 13:20:25 +02:00
lib2302.c WebSockets: make support official (non-experimental) 2024-09-27 13:20:25 +02:00
lib2304.c WebSockets: make support official (non-experimental) 2024-09-27 13:20:25 +02:00
lib2305.c WebSockets: make support official (non-experimental) 2024-09-27 13:20:25 +02:00
lib2306.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib2308.c libtest: 2308 verifies CURLE_WRITE_ERROR after write callback error 2024-05-16 13:46:52 +02:00
lib2402.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib2404.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib2405.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib2502.c test2502: add libtest debug tracing 2024-09-26 16:57:13 +02:00
lib3010.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib3025.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib3026.c tidy-up: rename CURL_WINDOWS_APP to CURL_WINDOWS_UWP 2024-09-19 19:24:12 +02:00
lib3027.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib3100.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib3101.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib3102.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib3103.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib3207.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
libauthretry.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
libntlmconnect.c tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
libprereq.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
Makefile.am tests: postcheck is now in verify 2024-09-26 08:43:24 +02:00
Makefile.inc test1540: add debug logging 2024-09-26 16:58:42 +02:00
mk-lib1521.pl tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
stub_gssapi.c tests: avoid int/size_t conversion size/sign warnings 2024-01-24 15:03:05 +01:00
stub_gssapi.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
test307.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
test610.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
test613.pl test613: stop showing an error on missing output file 2023-10-13 20:28:58 -07:00
test1013.pl test1013.pl: require case match for features, order match for protos, fix issue 2024-08-29 13:56:05 +02:00
test1022.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
test.h tests: speed up builds with single-binary test bundles 2024-09-22 09:51:15 +02:00
testtrace.c build: enable missing OpenSSF-recommended warnings, with fixes 2023-12-16 13:12:37 +00:00
testtrace.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
testutil.c tidy-up: rename CURL_WINDOWS_APP to CURL_WINDOWS_UWP 2024-09-19 19:24:12 +02:00
testutil.h windows: use built-in _WIN32 macro to detect Windows 2023-11-22 15:42:25 +00:00