curl/tests/libtest
Stefan Eissing 1be704e17e
cpool: rename "connection cache/conncache" to "Connection Pools/cpool"
This is a better match for what they do and the general "cpool"
var/function prefix works well.

The pool now handles very long hostnames correctly.

The following changes have been made:

* 'struct connectdata', e.g. connections, keep new members
  named `destination` and ' destination_len' that fully specifies
  interface+port+hostname of where the connection is going to.
  This is used in the pool for "bundling" of connections with
  the same destination. There is no limit on the length any more.
* Locking: all locks are done inside conncache.c when calling
  into the pool and released on return. This eliminates hazards
  of the callers keeping track.
* 'struct connectbundle' is now internal to the pool. It is no
  longer referenced by a connection.
* 'bundle->multiuse' no longer exists. HTTP/2 and 3 and TLS filters
  no longer need to set it. Instead, the multi checks on leaving
  MSTATE_CONNECT or MSTATE_CONNECTING if the connection is now
  multiplexed and new, e.g. not conn->bits.reuse. In that case
  the processing of pending handles is triggered.
* The pool's init is provided with a callback to invoke on all
  connections being discarded. This allows the cleanups in
  `Curl_disconnect` to run, wherever it is decided to retire
  a connection.
* Several pool operations can now be fully done with one call.
  Pruning dead connections, upkeep and checks on pool limits
  can now directly discard connections and need no longer return
  those to the caller for doing that (as we have now the callback
  described above).
* Finding a connection for reuse is now done via `Curl_cpool_find()`
  and the caller provides callbacks to evaluate the connection
  candidates.
* The 'Curl_cpool_check_limits()' now directly uses the max values
  that may be set in the transfer's multi. No need to pass them
  around. Curl_multi_max_host_connections() and
  Curl_multi_max_total_connections() are gone.
* Add method 'Curl_node_llist()' to get the llist a node is in.
  Used in cpool to verify connection are indeed in the list (or
  not in any list) as they need to.

I left the conncache.[ch] as is for now and also did not touch the
documentation. If we update that outside the feature window, we can
do this in a separate PR.

Multi-thread safety is not achieved by this PR, but since more details
on how pools operate are now "internal" it is a better starting
point to go for this in the future.

Closes #14662
2024-08-28 13:52:49 +02:00
..
.checksrc checksrc: ban gmtime/localtime 2020-07-28 23:51:17 +02:00
.gitignore tests: delete libhostname.so and chkhostname 2024-08-27 23:40:48 +02:00
CMakeLists.txt tests: delete libhostname.so and chkhostname 2024-08-27 23:40:48 +02:00
first.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib500.c getinfo: add CURLINFO_POSTTRANSFER_TIME_T 2024-08-15 09:02:58 +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 tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib505.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib506.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib507.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib508.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib509.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib510.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib539.c tests: provide FTP directory contents in the test file 2024-07-29 13:04:24 +02:00
lib540.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tidy-up: misc spelling (bit, ASCII) 2024-08-15 15:30:09 +02:00
lib553.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib554.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib579.c test579: improve robustness 2024-08-09 09:39:17 +02:00
lib582.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib583.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib586.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib650.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib651.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib652.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib653.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib654.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib667.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib668.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib670.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 test677: improve robustness 2024-08-09 09:39:59 +02:00
lib678.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1156.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1515.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1517.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1526.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1527.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 cpool: rename "connection cache/conncache" to "Connection Pools/cpool" 2024-08-28 13:52:49 +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 urlapi: verify URL *decoded* hostname when set 2024-08-23 13:55:13 +02:00
lib1564.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib1565.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +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: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tidy-up: spelling WebSockets 2024-08-22 17:43:57 +02:00
lib2302.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib2304.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
lib2305.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 windows: fix UWP builds, add GHA job 2024-06-05 00:52:24 +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
libauthretry.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
libntlmconnect.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
libprereq.c tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +02:00
Makefile.am configure: remove USE_EXPLICIT_LIB_DEPS 2024-08-28 13:45:01 +02:00
Makefile.inc configure: remove USE_EXPLICIT_LIB_DEPS 2024-08-28 13:45:01 +02:00
mk-lib1521.pl test1521: verify setting options to NULL better 2024-08-23 08:24:34 +02:00
notexists.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01: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 build: add Debug, TrackMemory, ECH to feature list 2024-07-07 00:33:21 +02:00
test1022.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
test.h tests: make the unit test result type CURLcode 2024-05-12 18:53:07 +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 windows: fix UWP builds, add GHA job 2024-06-05 00:52:24 +02:00
testutil.h windows: use built-in _WIN32 macro to detect Windows 2023-11-22 15:42:25 +00:00