Skip to content

tests/servers.pm: minor improvements - #23543

Closed
vszakats wants to merge 13 commits into
curl:masterfrom
vszakats:t-t
Closed

vszakats wants to merge 13 commits into
curl:masterfrom
vszakats:t-t

Conversation

@vszakats

@vszakats vszakats commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

@vszakats

vszakats commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

Maybe this:

startnew: /usr/bin/perl -I. -ID:/a/curl/curl/tests 
  D:/a/curl/curl/tests/http3-server.pl --port 49426 --nghttpx "" --pidfile
  "log/4/server/http_v3_server.pid" --logfile "log/4/http_v3_server.log"
  --logdir "log/4" --connect 127.0.0.1:49360.
startnew: child process has died, server might start up
RUN: failed to start the HTTP/3 server
test 2501 SKIPPED: failed starting HTTP/3 server
startnew: /usr/bin/perl -I. -ID:/a/curl/curl/tests 
  D:/a/curl/curl/tests/http3-server.pl --port 49431 --nghttpx "" --pidfile
  "log/5/server/http_v3_server.pid" --logfile "log/5/http_v3_server.log"
  --logdir "log/5" --connect 127.0.0.1:49282.
startnew: child process has died, server might start up
RUN: failed to start the HTTP/3 server
test 2502 SKIPPED: failed starting HTTP/3 server

https://github.com/curl/curl/actions/runs/39646618031/job/119393291959?pr=23543#step:16:4183

@testclutch

Copy link
Copy Markdown

Analysis of PR #23543 at 9f5adad3:

Test 3301 failed, but it has been 0.5% flaky lately, so it's probably NOT a fault of the PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them).

Generated by Testclutch

@vszakats

Copy link
Copy Markdown
Member Author

Yes:

--pd---em-- OK (1867 out of 2037, remaining: 00:20, took 0.460s, duration: 03:42)
http3-server.pl ARG: '--port'
http3-server.pl ARG-4: '64436'
http3-server.pl ARG: '--nghttpx'
http3-server.pl ARG: ''
Warning: http3-server.pl unknown parameter: ''
http3-server.pl ARG: '--pidfile'
http3-server.pl ARG-2: 'log/5/server/http_v3_server.pid'
http3-server.pl ARG: '--logfile'
http3-server.pl ARG-7: 'log/5/http_v3_server.log'
http3-server.pl ARG: '--logdir'
http3-server.pl ARG-8: 'log/5'
http3-server.pl ARG: '--connect'
http3-server.pl ARG-5: '127.0.0.1:64133'
http3-server.pl ARG: '--port'
http3-server.pl ARG-4: '64438'
http3-server.pl ARG: '--nghttpx'
http3-server.pl ARG: ''
Warning: http3-server.pl unknown parameter: ''
http3-server.pl ARG: '--pidfile'
http3-server.pl ARG-2: 'log/8/server/http_v3_server.pid'
http3-server.pl ARG: '--logfile'
http3-server.pl ARG-7: 'log/8/http_v3_server.log'
http3-server.pl ARG: '--logdir'
http3-server.pl ARG-8: 'log/8'
http3-server.pl ARG: '--connect'
http3-server.pl ARG-5: '127.0.0.1:64099'

https://github.com/curl/curl/actions/runs/39652098743/job/119402859418?pr=23543#step:16:4073

vszakats added a commit that referenced this pull request Oct 22, 2026
To make these tests excluded early if nghttpx is not present, or does
not support HTTP/3 (while testing curl with HTTP/3 built-in). Before
this patch, the tests were run, failed to start, adding log noise.

Silencing:
```
Warning: http3-server.pl unknown parameter: ''

Warning: http3-server.pl unknown parameter: ''
[...]
RUN: failed to start the HTTP/3 server
test 2501 SKIPPED: failed starting HTTP/3 server
[...]
RUN: failed to start the HTTP/3 server
test 2502 SKIPPED: failed starting HTTP/3 server
```
https://github.com/curl/curl/actions/runs/39625191772/job/119308529929#step:16:3862
(msvc, CM x64-windows openssl +examples)

Follow-up to 71b7e01 #10141
Cherry-picked from #23543

Closes #23559
```
-rp----em-- OK (1860 out of 2037, remaining: 00:20, took 0.353s, duration: 03:38)

Warning: http3-server.pl unknown parameter: ''

Warning: http3-server.pl unknown parameter: ''
test 2306 [HTTP GET reused handle with first header folded]
```
https://github.com/curl/curl/actions/runs/39625191772/job/119308529929#step:16:3862
(msvc, CM x64-windows openssl +examples)
https://metacpan.org/release/TODDR/IO-1.55/source/lib/IO/Socket/INET.pm#L277
```
sub sockport {
    @_ == 1 or croak 'usage: $sock->sockport()';
    my($sock) = @_;
    my $name = $sock->sockname;
    $name ? (sockaddr_in($name))[0] : undef;
}
```
Maybe this:
```
startnew: /usr/bin/perl -I. -ID:/a/curl/curl/tests
  D:/a/curl/curl/tests/http3-server.pl --port 49426 --nghttpx "" --pidfile
  "log/4/server/http_v3_server.pid" --logfile "log/4/http_v3_server.log"
  --logdir "log/4" --connect 127.0.0.1:49360.
startnew: child process has died, server might start up
RUN: failed to start the HTTP/3 server
test 2501 SKIPPED: failed starting HTTP/3 server
startnew: /usr/bin/perl -I. -ID:/a/curl/curl/tests
  D:/a/curl/curl/tests/http3-server.pl --port 49431 --nghttpx "" --pidfile
  "log/5/server/http_v3_server.pid" --logfile "log/5/http_v3_server.log"
  --logdir "log/5" --connect 127.0.0.1:49282.
startnew: child process has died, server might start up
RUN: failed to start the HTTP/3 server
test 2502 SKIPPED: failed starting HTTP/3 server
```
https://github.com/curl/curl/actions/runs/39646618031/job/119393291959?pr=23543#step:16:4183
This reverts commit 9f5adad.

Yes:
```
--pd---em-- OK (1867 out of 2037, remaining: 00:20, took 0.460s, duration: 03:42)
http3-server.pl ARG: '--port'
http3-server.pl ARG-4: '64436'
http3-server.pl ARG: '--nghttpx'
http3-server.pl ARG: ''
Warning: http3-server.pl unknown parameter: ''
http3-server.pl ARG: '--pidfile'
http3-server.pl ARG-2: 'log/5/server/http_v3_server.pid'
http3-server.pl ARG: '--logfile'
http3-server.pl ARG-7: 'log/5/http_v3_server.log'
http3-server.pl ARG: '--logdir'
http3-server.pl ARG-8: 'log/5'
http3-server.pl ARG: '--connect'
http3-server.pl ARG-5: '127.0.0.1:64133'
http3-server.pl ARG: '--port'
http3-server.pl ARG-4: '64438'
http3-server.pl ARG: '--nghttpx'
http3-server.pl ARG: ''
Warning: http3-server.pl unknown parameter: ''
http3-server.pl ARG: '--pidfile'
http3-server.pl ARG-2: 'log/8/server/http_v3_server.pid'
http3-server.pl ARG: '--logfile'
http3-server.pl ARG-7: 'log/8/http_v3_server.log'
http3-server.pl ARG: '--logdir'
http3-server.pl ARG-8: 'log/8'
http3-server.pl ARG: '--connect'
http3-server.pl ARG-5: '127.0.0.1:64099'
```
https://github.com/curl/curl/actions/runs/39652098743/job/119402859418?pr=23543#step:16:4073
This should not be the case if the test is configured correctly,
but helps failing more cleanly if it isn't.
- consume the value argument if empty
- skip the argument even if its value is invalid

to avoid a wrong argument skewing arg processing, and reporting
a bogus error.

The bogus error was seen live for misconfigured tests that went
ahead to start up http3-server without NGHTTPX filled, this made
passing `--nghttpx ""` to the command-line. this ended up logging:

```
Warning: http3-server.pl unknown parameter: ''
```

aft this patch the warning will be gone, silently setting the
value to the empty one.

~~let's see if this helps, or it counterintuitively makes things
worse.~~

well, aft wriging the above, this doesn't seem like a good idea.
so reverting before even trying it out.
This reverts commit d9ed480.

Can't happen due to arg checks
… name

Fixing:
```
Use of uninitialized value $pidfile in -f at D:/a/curl/curl/tests/servers.pm line 472.
```
https://github.com/curl/curl/actions/runs/39695904768/job/119553125031?pr=23543#step:16:4394
This reverts commit 984d93ffd540282248abe3f75e02072393b636e1.
@vszakats vszakats changed the title [TEST] runtests: chasing warnings runtests: minor improvements Oct 22, 2026
@vszakats vszakats changed the title runtests: minor improvements tests/servers.pm: minor improvements Oct 22, 2026
@vszakats
vszakats marked this pull request as ready for review October 22, 2026 18:51
@vszakats vszakats closed this in 1b0e681 Oct 22, 2026
@vszakats
vszakats deleted the t-t branch October 22, 2026 19:26
vszakats added a commit that referenced this pull request Oct 30, 2026
Tests with `http/2` in `<servers>` but without `nghttpx` in `<features>`
list, with the nghttpx server missing, were tried to be run, then
suffered a slow failure with processes started and killed. Fix by adding
`nghttpx` to the `<features>` list to skip these tests early if the
server is missing.

Silencing:
```
runhttp2server: NGHTTPX env is not set
test 0358 SKIPPED: failed starting HTTP/2 server
[...]
runhttp2server: NGHTTPX env is not set
test 1700 SKIPPED: failed starting HTTP/2 server
[...]
```
Ref: https://github.com/curl/curl/actions/runs/40969439422/job/123782249517#step:16:793 (msvc, CM x64-windows openssl +examples)
Ref: https://github.com/curl/curl/actions/runs/40969439422/job/123782249701#step:17:3236 (mingw, CM clang-x86_64 schannel c-ares U)

Also:
- test1800: drop redundant `http/2` feature, it's implied by `h2c`
  (= nghttp2) already listed there.

Follow-up to 1b0e681 #23543

Closes #23679
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants