curl/tests
Stefan Eissing f0be417635
multi: xfers_really_alive
Yes, we were counting the "live" transfers before, but were they
*really* alive?

When determining to add the wakeup socket to fdset/waitfds etc, we
should only do that when the multi handle is actually processing
transfers. Other wise, the application could wait on the wakeup socket
forever.

For this, we counted `multi->xfers_alive` (e.g. the "running" number
returned by `curl_multi_perform()`). This was almost correct.

The problem is that added easy handles are counted as "alive" right away
on the addition. But the processing has not started yet. They did not
trigger any DNS resolves or opened any sockets yet.

Add two fields in multi and easy handle:

* `multi->xfers_really_alive`: counts the "alive" transfers that have
  passed `MSTATE_INIT` (at least once)
* `data->state.really_alive`: to track if the transfer has been counted

Add test 2412 to check that adding transfers without perform will not
trigger the wakeup socket to be added.

Fixes #22050
Reported-by: Bryan Henderson
Closes #22066
2026-06-18 10:31:40 +02:00
..
certs perl: || die -> or die 2026-06-16 00:41:29 +02:00
cmake cmake: add CMake Config-based dependency detection 2026-03-21 18:52:31 +01:00
data multi: xfers_really_alive 2026-06-18 10:31:40 +02:00
http GHA: bump pip cryptography from 46.0.7 to 48.0.1 2026-06-16 22:18:43 +02:00
libtest multi: xfers_really_alive 2026-06-18 10:31:40 +02:00
server servers: deduplicate storerequest() across two servers 2026-06-16 12:42:59 +02:00
tunit build: enable -Wformat-signedness, fix issues found 2026-06-10 15:14:08 +02:00
unit cf-capsule: complete filter 2026-06-15 15:42:22 +02:00
.gitignore build: stop building and installing runtests.1 and testcurl.1 2026-04-28 09:07:27 +02:00
allversions.pm perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
appveyor.pm perl: switch from backticks to qx() 2026-06-14 14:25:02 +02:00
azure.pm perl: switch from backticks to qx() 2026-06-14 14:25:02 +02:00
CMakeLists.txt cmake: add basic way to select pytests to run 2026-06-01 15:07:17 +02:00
config.in
configurehelp.pm.in build: use configurehelp.pm.in with autotools and cmake 2024-09-21 12:21:14 +02:00
devtest.pl perl: switch from backticks to qx() 2026-06-14 14:25:02 +02:00
dictserver.py tests: make whitespace between functions and classes consistent 2026-04-08 10:28:05 -07:00
directories.pm tidy-up: miscellaneous 2025-12-12 04:18:48 +01:00
ech_combos.py tidy-up: add space around operators, where missing 2026-05-28 10:12:00 +02:00
ech_tests.sh tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
ftpserver.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
getpart.pm perl: || die -> or die 2026-06-16 00:41:29 +02:00
globalconfig.pm tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
http-server.pl tidy-up: miscellaneous 2026-06-01 22:33:57 +02:00
http2-server.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
http3-server.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
Makefile.am tidy-up: miscellaneous 2026-01-15 13:06:13 +01:00
memanalyze.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
memanalyzer.pm tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
negtelnetserver.py tidy-up: miscellaneous 2026-06-01 22:33:57 +02:00
nghttpx.conf
pathhelp.pm tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
processhelp.pm tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
requirements.txt GHA: bump actions and pips 2026-05-01 21:19:22 +02:00
rtspserver.pl tidy-up: miscellaneous 2026-06-01 22:33:57 +02:00
runner.pm perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
runtests.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
secureserver.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
serverhelp.pm tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
servers.pm perl: || die -> or die 2026-06-16 00:41:29 +02:00
smbserver.py tidy-up: miscellaneous 2026-06-11 19:48:07 +02:00
sshhelp.pm perl: switch from backticks to qx() 2026-06-14 14:25:02 +02:00
sshserver.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
test745.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
test971.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
test1119.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
test1135.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
test1139.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
test1140.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
test1165.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
test1167.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
test1173.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
test1175.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
test1177.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
test1222.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
test1275.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
test1276.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
test1477.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
test1486.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
test1488.pl perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
test1544.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
test1707.pl perl: || die -> or die 2026-06-16 00:41:29 +02:00
testcurl.pl perl: switch from backticks to qx() 2026-06-14 14:25:02 +02:00
testutil.pm tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
tftpserver.pl tidy-up: miscellaneous 2026-06-01 22:33:57 +02:00
util.py tests: make whitespace between functions and classes consistent 2026-04-08 10:28:05 -07:00
valgrind.pm perl: open... || -> open... or (cont.) 2026-06-16 19:11:15 +02:00
valgrind.supp hyper: drop support 2024-12-21 11:33:05 +01:00