]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years agourlapi: cleanups
Daniel Stenberg [Tue, 11 Apr 2023 15:06:54 +0000 (17:06 +0200)] 
urlapi: cleanups

- move host checks together
- simplify the scheme parser loop and the end of host name parser
- avoid itermediate buffer storing in multiple places
- reduce scope for several variables
- skip the Curl_dyn_tail() call for speed
- detect IPv6 earlier and skip extra checks for such hosts
- normalize directly in dynbuf instead of itermediate buffer
- split out the IPv6 parser into its own funciton
- call the IPv6 parser directly for ipv6 addresses
- remove (unused) special treatment of % in host names
- junkscan() once in the beginning instead of scattered
- make junkscan return error code
- remove unused query management from dedotdotify()
- make Curl_parse_login_details use memchr
- more use of memchr() instead of strchr() and less strlen() calls
- make junkscan check and return the URL length

An optimized build runs one of my benchmark URL parsing programs ~41%
faster using this branch. (compared against the shipped 7.88.1 library
in Debian)

Closes #10935

2 years agohttp2: fix typo in infof() call
Josh McCullough [Wed, 12 Apr 2023 17:08:18 +0000 (13:08 -0400)] 
http2: fix typo in infof() call

Closes #10940

2 years agonoproxy: pointer to local array 'hostip' is stored outside scope
Daniel Stenberg [Tue, 11 Apr 2023 14:24:29 +0000 (16:24 +0200)] 
noproxy: pointer to local array 'hostip' is stored outside scope

Ref: #10929
Closes #10933

2 years agoconnect: fix https connection setup to treat ssl_mode correctly
Stefan Eissing [Tue, 11 Apr 2023 14:34:01 +0000 (16:34 +0200)] 
connect: fix https connection setup to treat ssl_mode correctly

- for HTTPS protocol, a disabled ssl should never be acceptables.

Closes #10934

2 years agoCMakeLists.txt: fix typo for Haiku detection
Douglas R. Reno [Wed, 12 Apr 2023 01:11:41 +0000 (20:11 -0500)] 
CMakeLists.txt: fix typo for Haiku detection

Closes #10937

2 years agopathhelp: use the cached $use_cygpath when available
Dan Fandrich [Tue, 11 Apr 2023 00:28:09 +0000 (17:28 -0700)] 
pathhelp: use the cached $use_cygpath when available

2 years agoruntests: eliminate unneeded variable
Dan Fandrich [Mon, 10 Apr 2023 22:57:31 +0000 (15:57 -0700)] 
runtests: eliminate unneeded variable

2 years agoruntests: make the # of server start attempts a constant
Dan Fandrich [Sun, 9 Apr 2023 01:27:02 +0000 (18:27 -0700)] 
runtests: make the # of server start attempts a constant

2 years agoruntests: on startup failure call displaylogs only in serverfortest
Dan Fandrich [Sun, 9 Apr 2023 01:31:39 +0000 (18:31 -0700)] 
runtests: on startup failure call displaylogs only in serverfortest

This reduces the number of calls spread throughout the code.

Ref: #10818
Closes #10919

2 years agoruntests: return an error code with startservers()
Dan Fandrich [Sun, 9 Apr 2023 00:13:16 +0000 (17:13 -0700)] 
runtests: return an error code with startservers()

The code indicates the kind of failure encountered in starting a server,
which can be used by the caller to tailor the user experience.

Ref: #10818

2 years agoruntests: abort early if runpingpongserver is given a bad server type
Dan Fandrich [Sat, 8 Apr 2023 22:27:39 +0000 (15:27 -0700)] 
runtests: abort early if runpingpongserver is given a bad server type

2 years agoruntests: don't use the SMB server verification time as reference
Dan Fandrich [Sat, 1 Apr 2023 15:59:38 +0000 (08:59 -0700)] 
runtests: don't use the SMB server verification time as reference

%FTPTIME2 and %FTPTIME3 should be set by the FTP server only, for
consistency.

2 years agotests: factor out the test server management code
Dan Fandrich [Thu, 6 Apr 2023 00:26:20 +0000 (17:26 -0700)] 
tests: factor out the test server management code

This now lives in servers.pm with some configuration variables moved to
globalconfig.pm

Ref: #10818

2 years agoruntests: remove an inappropriate use of runclientoutput
Dan Fandrich [Tue, 11 Apr 2023 00:09:56 +0000 (17:09 -0700)] 
runtests: remove an inappropriate use of runclientoutput

This function is intended for running client code, not servers.

2 years agoruntests: only add $LIBDIR to the path for checktestcmd
Dan Fandrich [Mon, 10 Apr 2023 23:41:07 +0000 (16:41 -0700)] 
runtests: only add $LIBDIR to the path for checktestcmd

Since checkcmd is for finding servers, there will never be anything in
this directory of interest to them.

Ref: #10818

2 years agotests: log sshserver.pl messages to a file
Dan Fandrich [Sat, 8 Apr 2023 20:18:22 +0000 (13:18 -0700)] 
tests: log sshserver.pl messages to a file

The logmsg messages were thrown away before, so they are now available
for debugging.

2 years agoruntests: also show DISABLED tests with -l
Dan Fandrich [Sat, 8 Apr 2023 19:11:26 +0000 (12:11 -0700)] 
runtests: also show DISABLED tests with -l

Other reasons for skipping tests are ignored for -l, so being explicitly
disabled should be too.

2 years agoruntests: move the UNIX sockets into $PIDDIR
Dan Fandrich [Sat, 8 Apr 2023 17:56:15 +0000 (10:56 -0700)] 
runtests: move the UNIX sockets into $PIDDIR

These were missed when the other server files were moved there.

Follow-up to 70d2fca2

Ref: #10818

2 years agotests: tighten up perl exports
Dan Fandrich [Wed, 5 Apr 2023 22:29:00 +0000 (15:29 -0700)] 
tests: tighten up perl exports

This reduces namespace pollution a little.

Ref: #10818

2 years agotests: turn perl modules into full packages
Dan Fandrich [Wed, 5 Apr 2023 19:28:26 +0000 (12:28 -0700)] 
tests: turn perl modules into full packages

This helps enforce more modularization and encapsulation. Enable and fix
warnings on a few packages.  Also, rename ftp.pm to processhelp.pm since
there's really nothing ftp-specific in it.

Ref: #10818

2 years agomulti: remove a few superfluous assigns
Daniel Stenberg [Tue, 11 Apr 2023 13:01:22 +0000 (15:01 +0200)] 
multi: remove a few superfluous assigns

PVS found these "The 'rc' variable was assigned the same value." cases.

Ref: #10929
Closes #10932

2 years agoschannel: add clarifying comment
Daniel Stenberg [Tue, 11 Apr 2023 12:40:46 +0000 (14:40 +0200)] 
schannel: add clarifying comment

Explaining how the PVS warning in #10929 is wrong: Dereferencing of the
null pointer 'backend->cred' might take place.

Closes #10931

2 years agocookie: clarify that init with data set to NULL reads no file
Daniel Stenberg [Tue, 11 Apr 2023 12:14:09 +0000 (14:14 +0200)] 
cookie: clarify that init with data set to NULL reads no file

... and make Curl_cookie_add() require 'data' being set proper with an
assert.

The function has not worked with a NULL data for quite some time so this
just corrects the code and comment.

This is a different take than the proposed fixed in #10927

Reported-by: Kvarec Lezki
Ref: #10929
Closes #10930

2 years agovtls: remove int typecast for sizeof()
Kvarec Lezki [Tue, 11 Apr 2023 11:11:50 +0000 (16:11 +0500)] 
vtls: remove int typecast for sizeof()

V220 Suspicious sequence of types castings: memsize -> 32-bit integer ->
memsize. The value being cast: 'sizeof
(buf->data)'. curl\lib\vtls\vtls.c 2025

https://pvs-studio.com/en/docs/warnings/v220/

Closes #10928

2 years agohttp2: fix copynpaste error reported by coverity
Stefan Eissing [Tue, 11 Apr 2023 08:07:59 +0000 (10:07 +0200)] 
http2: fix copynpaste error reported by coverity

- move all code handling HTTP/2 frames for a particular
  stream into a separate function to keep from confusing
  the call `data` with the stream `data`.

Closes #10924

2 years agotests: log a too-long Unix socket path in sws and socksd
Dan Fandrich [Tue, 11 Apr 2023 17:07:30 +0000 (10:07 -0700)] 
tests: log a too-long Unix socket path in sws and socksd

Ref: #10919

2 years agogen.pl: error on duplicated See-Also fields
Daniel Stenberg [Tue, 11 Apr 2023 09:15:33 +0000 (11:15 +0200)] 
gen.pl: error on duplicated See-Also fields

Updated http2.d accordingly.

Closes #10925

2 years agohttp2: avoid possible null pointer dereference
Daniel Stenberg [Tue, 11 Apr 2023 07:22:08 +0000 (09:22 +0200)] 
http2: avoid possible null pointer dereference

Reported-by: Dan Fandrich
Fixes #10920
Closes #10923

2 years agolib1560: verify that more bad host names are rejected
Daniel Stenberg [Tue, 11 Apr 2023 07:15:41 +0000 (09:15 +0200)] 
lib1560: verify that more bad host names are rejected

when setting the hostname component of a URL

Closes #10922

2 years agocurl_url_set.3: mention that users can set content rather freely
Daniel Stenberg [Tue, 11 Apr 2023 06:59:00 +0000 (08:59 +0200)] 
curl_url_set.3: mention that users can set content rather freely

... which then might render bad URLs if you extract a URL later.

Closes #10921

2 years agoCI: retry failed downloads of aws-lc
Dan Fandrich [Mon, 10 Apr 2023 19:19:11 +0000 (12:19 -0700)] 
CI: retry failed downloads of aws-lc

Don't fail the build in case of a temporary server problem.

2 years agotest1169: fix so it works properly everywhere 10917/head
Dan Fandrich [Mon, 10 Apr 2023 18:05:55 +0000 (11:05 -0700)] 
test1169: fix so it works properly everywhere

- Use an absolute path for the -L option since the module isn't in the
  perl path
- Create the needed test file in a <file> section; <precheck> isn't
  intended for this
- Fix the test number in the file name, which was wrong

Follow-up to f754990a

Ref: #10818
Fixes #10889
Closes #10917

2 years agotests: stop using strndup(), which isn't portable
Dan Fandrich [Mon, 10 Apr 2023 17:35:04 +0000 (10:35 -0700)] 
tests: stop using strndup(), which isn't portable

It's not available on Solaris 10, for example. Since this is just test
code that doesn't need to use an optimized system version, replace it
with the implementation copied from tool_cb_hdr.c.

2 years agoruntests: fix an incorrect comment about the ld_preload feature
Dan Fandrich [Mon, 10 Apr 2023 17:42:21 +0000 (10:42 -0700)] 
runtests: fix an incorrect comment about the ld_preload feature

Follow-up to 1f631864

Ref: #10818

2 years agourlapi: prevent setting invalid schemes with *url_set()
Daniel Stenberg [Sat, 8 Apr 2023 22:38:00 +0000 (00:38 +0200)] 
urlapi: prevent setting invalid schemes with *url_set()

A typical mistake would be to try to set "https://" - including the
separator - this is now rejected as that would then lead to
url_get(... URL...) would get an invalid URL extracted.

Extended test 1560 to verify.

Closes #10911

2 years agohttp2: remove unused Curl_http2_strerror function declaration
Biswapriyo Nath [Sun, 9 Apr 2023 05:48:53 +0000 (11:18 +0530)] 
http2: remove unused Curl_http2_strerror function declaration

Curl_http2_strerror was renamed to http2_strerror in
05b100aee247bb9bec8e9a1b0 and then http2_strerror was removed in
5808a0d0f5ea0399d4a2a2

This also fixes the following compiler error

lib/http2.h:41:33: error: unknown type name 'uint32_t'
lib/http2.h:1:1: note: 'uint32_t' is defined in header '<stdint.h>'

Closes #10912

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 8 Apr 2023 21:57:30 +0000 (23:57 +0200)] 
RELEASE-NOTES: synced

2 years agoconfig-dos.h: fix SIZEOF_CURL_OFF_T for MS-DOS/DJGPP
SuperIlu on github [Sat, 8 Apr 2023 15:50:14 +0000 (17:50 +0200)] 
config-dos.h: fix SIZEOF_CURL_OFF_T for MS-DOS/DJGPP

Fixes #10905
Closes #10910

2 years agolib: remove CURLX_NO_MEMORY_CALLBACKS
Daniel Stenberg [Fri, 7 Apr 2023 22:44:59 +0000 (00:44 +0200)] 
lib: remove CURLX_NO_MEMORY_CALLBACKS

The only user of this define was 'chkdecimalpoint' - a special purpose
test tool that was built but not used anymore (since 17c18fbc3 - Apr
2020).

Closes #10908

2 years agoCURLPROXY_HTTPS2: for HTTPS proxy that may speak HTTP/2
Daniel Stenberg [Thu, 6 Apr 2023 12:33:05 +0000 (14:33 +0200)] 
CURLPROXY_HTTPS2: for HTTPS proxy that may speak HTTP/2

Setting this proxy type allows curl to negotiate and use HTTP/2 with
HTTPS proxies.

Closes #10900

2 years agowrite-out.d: add missing periods
Ali Khodkar [Thu, 6 Apr 2023 09:01:14 +0000 (12:31 +0330)] 
write-out.d: add missing periods

Closes #10897

2 years agohttp2: remove check for !data after it was already dereferenced
Daniel Stenberg [Fri, 7 Apr 2023 17:32:03 +0000 (19:32 +0200)] 
http2: remove check for !data after it was already dereferenced

Pointed out by Coverity

Closes #10906

2 years agohttp_proxy: provide missing arg to infof() call
Daniel Stenberg [Fri, 7 Apr 2023 12:05:00 +0000 (14:05 +0200)] 
http_proxy: provide missing arg to infof() call

Pointed out by Coverity

Closes #10904

2 years agocontent_encoding: only do tranfer-encoding compression if asked to
Daniel Stenberg [Thu, 6 Apr 2023 10:11:42 +0000 (12:11 +0200)] 
content_encoding: only do tranfer-encoding compression if asked to

To reduce surprises. Update test 387 and 418 accordingly.

Closes #10899

2 years agosws: comparison of unsigned expression < 0 is always false
Daniel Stenberg [Thu, 6 Apr 2023 21:55:00 +0000 (23:55 +0200)] 
sws: comparison of unsigned expression < 0 is always false

Follow-up to 356dd0b73a75ed6d5

Closes #10903

2 years agolib/cmake: add HAVE_WRITABLE_ARGV check
Daniel Stenberg [Thu, 6 Apr 2023 08:06:30 +0000 (10:06 +0200)] 
lib/cmake: add HAVE_WRITABLE_ARGV check

Assisted-by: Jakub Zakrzewski
Closes #10896

2 years agoconfigure: don't set HAVE_WRITABLE_ARGV on Windows
Daniel Stenberg [Thu, 6 Apr 2023 07:58:13 +0000 (09:58 +0200)] 
configure: don't set HAVE_WRITABLE_ARGV on Windows

Ref: #10888
Closes #10896

2 years agovtls: fix build error when proxy-disabled
Daniel Stenberg [Thu, 6 Apr 2023 14:34:21 +0000 (16:34 +0200)] 
vtls: fix build error when proxy-disabled

Closes #10901

2 years agotests: increase sws timeout for more robust testing
Stefan Eissing [Thu, 6 Apr 2023 09:19:46 +0000 (11:19 +0200)] 
tests: increase sws timeout for more robust testing

- for https CONNECT forwarding, this was fixed at 5 seconds
  which led to spurious CI test failures
- add --keepalive parameter to sws to control this
- let httpserver use 30 seconds

Closes #10898

2 years agohttp2: move HTTP/2 stream vars into local context
Stefan Eissing [Thu, 6 Apr 2023 09:59:12 +0000 (11:59 +0200)] 
http2: move HTTP/2 stream vars into local context

- remove NGHTTP2 members of `struct HTTP`
- add `void *h2_ctx` to `struct HTTP`
- add `void *h3_ctx` to `struct HTTP`
- separate h2/h3 pointers are needed for eyeballing
- manage local stream_ctx in http implementations

Closes #10877

2 years agoproxy: http2 proxy tunnel implementation
Stefan Eissing [Thu, 6 Apr 2023 07:54:57 +0000 (09:54 +0200)] 
proxy: http2 proxy tunnel implementation

- currently only on debug build and when env variable
  CURL_PROXY_TUNNEL_H2 is present.
- will ALPN negotiate with the proxy server and switch
  tunnel filter based on the protocol negotiated.
- http/1.1 tunnel code moved into cf-h1-proxy.[ch]
- http/2 tunnel code implemented in cf-h2-proxy.[ch]
- tunnel start and ALPN set remains in http_proxy.c
- moving all haproxy related code into cf-haproxy.[ch]

VTLS changes
- SSL filters rely solely on the "alpn" specification they
  are created with and no longer check conn->bits.tls_enable_alpn.
- checks on which ALPN specification to use (or none at all) are
  done in vtls.c when creating the filter.

Testing
- added a nghttpx forward proxy to the pytest setup that
  speaks HTTP/2 and forwards all requests to the Apache httpd
  forward proxy server.
- extending test coverage in test_10 cases
- adding proxy tests for direct/tunnel h1/h2 use of basic auth.
- adding test for http/1.1 and h2 proxy tunneling to pytest

Closes #10780

2 years agovtls and h2 improvements
Stefan Eissing [Wed, 5 Apr 2023 12:52:16 +0000 (14:52 +0200)] 
vtls and h2 improvements

- eliminate receive loop in vtls to fill buffer. This may
  lead to partial reads of data which is counter productive
- let http2 instead loop smarter to process pending network
  data without transfer switches

scorecard improvements
- do not start caddy when only httpd is requested
- allow curl -v to stderr file on --curl-verbose

Closes #10891

2 years agotests: 1078 1288 1297 use valid IPv4 addresses
Daniel Stenberg [Wed, 5 Apr 2023 21:44:44 +0000 (23:44 +0200)] 
tests: 1078 1288 1297 use valid IPv4 addresses

With the enhanced URL parser, these tests failed because of their bad
IPv4 use.

2 years agourlapi: detect and error on illegal IPv4 addresses
Daniel Stenberg [Wed, 5 Apr 2023 21:13:33 +0000 (23:13 +0200)] 
urlapi: detect and error on illegal IPv4 addresses

Using bad numbers in an IPv4 numerical address now returns
CURLUE_BAD_HOSTNAME.

I noticed while working on trurl and it was originally reported here:
https://github.com/curl/trurl/issues/78

Updated test 1560 accordingly.

Closes #10894

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 5 Apr 2023 06:34:30 +0000 (08:34 +0200)] 
RELEASE-NOTES: synced

2 years agourlapi: URL encoding for the URL missed the fragment
Daniel Stenberg [Tue, 4 Apr 2023 14:59:59 +0000 (16:59 +0200)] 
urlapi: URL encoding for the URL missed the fragment

Meaning that it would wrongly still store the fragment using spaces
instead of %20 if allowing space while also asking for URL encoding.

Discovered when playing with trurl.

Added test to lib1560 to verify the fix.

Closes #10887

2 years agortsp: convert mallocs to dynbuf for RTP buffering
Daniel Stenberg [Tue, 4 Apr 2023 12:44:25 +0000 (14:44 +0200)] 
rtsp: convert mallocs to dynbuf for RTP buffering

Closes #10786

2 years agotool_writeout: add URL component variables
Daniel Stenberg [Tue, 4 Apr 2023 12:42:44 +0000 (14:42 +0200)] 
tool_writeout: add URL component variables

Output specific components from the used URL. The following variables
are added for this purpose:

  url.scheme, url.user, url.password, url.options, url.host, url.port,
  url.path, url.query, url.fragment, url.zoneid

Add the following for outputting parts of the "effective URL":

 urle.scheme, urle.user, urle.password, urle.options, urle.host, urle.port,
 urle.path, urle.query, urle.fragment, urle.zoneid

Added test 423 and 424 to verify.

Closes #10853

2 years agotests/http: improved httpd detection
Stefan Eissing [Mon, 3 Apr 2023 09:58:21 +0000 (11:58 +0200)] 
tests/http: improved httpd detection

- better error messages when not found/complete
- handling of `--without-test-httpd`

Reported-by: kwind on github
Fixes #10879
Closes #10883

2 years agoconfigure: make quiche require quiche_conn_send_ack_eliciting
Daniel Stenberg [Tue, 4 Apr 2023 08:47:35 +0000 (10:47 +0200)] 
configure: make quiche require quiche_conn_send_ack_eliciting

curl now requires quiche version >= 1.17.1 to be used and this function
was added in this version and makes a convenient check.

This requirement is because this is the lowest quiche version that
supports peer-initiated key updates correctly.

Closes #10886

2 years agounit tests: use the unit test infrastructure better
Dan Fandrich [Sat, 1 Apr 2023 15:59:38 +0000 (08:59 -0700)] 
unit tests: use the unit test infrastructure better

Allow UNITTEST_STOP to return the error code, use the fail & abort
macros to indicate test failure and return success instead of fail if
the unit test can't test anything because of missing features at
compile-time.  A couple of tests could never fail because they were
overriding the failure return code.

2 years agoruntests: strip EOL on precheck output on Windows, too
Dan Fandrich [Fri, 31 Mar 2023 21:23:46 +0000 (14:23 -0700)] 
runtests: strip EOL on precheck output on Windows, too

Precheck failures would show on two lines in the test summary output
otherwise.

2 years agotests: move server config files under the pid dir
Dan Fandrich [Fri, 31 Mar 2023 04:32:17 +0000 (21:32 -0700)] 
tests: move server config files under the pid dir

These files are generated by the test servers and must therefore be
found in the log directory to make them available to only those servers
once multiple test runners are executing in parallel. They must also not
be deleted with the log files, so they are stored in the pidfile
directory.

Ref: #10818
Closes #10875

2 years agoruntests: use the ssh key filenames from the sshhelp package
Dan Fandrich [Fri, 31 Mar 2023 02:42:06 +0000 (19:42 -0700)] 
runtests: use the ssh key filenames from the sshhelp package

2 years agotests: move pidfiles and portfiles under the log directory
Dan Fandrich [Thu, 30 Mar 2023 20:25:17 +0000 (13:25 -0700)] 
tests: move pidfiles and portfiles under the log directory

This is to segregate all files written by a test process into a single
root to allow for future parallel testing.

Ref: #10818
Closes #10874

2 years agoruntests: minor code cleanups
Dan Fandrich [Thu, 30 Mar 2023 19:21:06 +0000 (12:21 -0700)] 
runtests: minor code cleanups

2 years agoruntests: call processexists() and pidfromfile()
Dan Fandrich [Thu, 30 Mar 2023 19:01:25 +0000 (12:01 -0700)] 
runtests: call processexists() and pidfromfile()

rather than duplicating the logic in several places.

2 years agocmake: do not add zlib headers for openssl
Viktor Szakats [Fri, 31 Mar 2023 18:03:43 +0000 (18:03 +0000)] 
cmake: do not add zlib headers for openssl

Logic copied earlier from wolfSSL. wolfSSL requires zlib headers for its
public headers. OpenSSL does not, so stop adding zlib headers for it.

Follow-up to 1e3319a167d2f32d295603167486e9e88af9bb4e

Closes #10878

2 years agorustls: fix error in recv handling
Stefan Eissing [Fri, 31 Mar 2023 09:07:18 +0000 (11:07 +0200)] 
rustls: fix error in recv handling

- when rustls is told to recieve more TLS data and its internal
  plaintext buffers are full, it returns an IOERROR
- avoid receiving TLS data while plaintext is not read empty

pytest:
- increase curl run timeout when invoking pytest with higher verbosity

Closes #10876

2 years agohttp3: improvements across backends
Stefan Eissing [Thu, 30 Mar 2023 11:00:51 +0000 (13:00 +0200)] 
http3: improvements across backends

- ngtcp2: using bufq for recv stream data
- internal stream_ctx instead of `struct HTTP` members
  for quiche, ngtcp2 and msh3
- no more QUIC related members in `struct HTTP`
- experimental use of recvmmsg(), disabled by default
  - testing on my old debian box shows no throughput improvements.
  - leaving it in, but disabled, for future revisit
- vquic: common UDP receive code for ngtcp2 and quiche
- vquic: common UDP send code for ngtcp2 and quiche
- added pytest skips for known msh3 failures
- fix unit2601 to survive torture testing
- quiche: using latest `master` from quiche and enabling large download
  tests, now that key change is supported
- fixing test_07_21 where retry handling of starting a stream
  was faulty
- msh3: use bufq for recv buffering headers and data
- msh3: replace fprintf debug logging with LOG_CF where possible
- msh3: force QUIC expire timers on recv/send to have more than
  1 request per second served

Closes #10772

2 years agotest1471/2: add http as a required feature
Dan Fandrich [Fri, 31 Mar 2023 06:53:19 +0000 (23:53 -0700)] 
test1471/2: add http as a required feature

curl bails out early with a different error message if http support is
compiled out.

Ref: #10705

2 years agotests: limit return code of unit tests and lib tests
Dan Fandrich [Fri, 31 Mar 2023 02:13:38 +0000 (19:13 -0700)] 
tests: limit return code of unit tests and lib tests

Values greater than 125 have special meanings, so cap it there.  Unit
tests and lib tests use the number of failures as the return code, so a
large number of failures (such as test 2601 as a torture test) can
exceed this causing the test to be erroneously reported as having
failed.

Ref: #10720

2 years agotest1960: point to the correct path for the precheck tool
Dan Fandrich [Thu, 30 Mar 2023 22:36:29 +0000 (15:36 -0700)] 
test1960: point to the correct path for the precheck tool

Otherwise, it might find the binary in .libs which can cause it to use
the system libcurl which can fail. This error is only visible by
noticing that the test is skipped.

Follow-up to e4dfe6fc

Ref: #10651

2 years agotests: use the proper %LOGDIR path on two tests
Dan Fandrich [Thu, 30 Mar 2023 22:34:16 +0000 (15:34 -0700)] 
tests: use the proper %LOGDIR path on two tests

Follow-up to e7a021e1

Ref: #10818

2 years agortsp: fix Value stored to 'skip_size' is never read
Daniel Stenberg [Thu, 30 Mar 2023 21:09:12 +0000 (23:09 +0200)] 
rtsp: fix Value stored to 'skip_size' is never read

Pointed out by scan-build

Follow-up to 6c6306f3008f2c9b20a64

Closes #10872

2 years agotests/http: relax connection check in test_07_02
Stefan Eissing [Thu, 30 Mar 2023 14:30:40 +0000 (16:30 +0200)] 
tests/http: relax connection check in test_07_02

Only 1 connection will be used when curl is slow, happens when
address-sanitized in CI, for example

Closes #10865

2 years agohttp2: flow control and buffer improvements
Stefan Eissing [Thu, 30 Mar 2023 10:13:49 +0000 (12:13 +0200)] 
http2: flow control and buffer improvements

- use bufq for send/receive of network data
- usd bufq for send/receive of stream data
- use HTTP/2 flow control with no-auto updates to control the
  amount of data we are buffering for a stream
  HTTP/2 stream window set to 128K after local tests, defined
  code constant for now
- elminiating PAUSEing nghttp2 processing when receiving data
  since a stream can now take in all DATA nghttp2 forwards

Improved scorecard and adjuste http2 stream window sizes
- scorecard improved output formatting and options default
- scorecard now also benchmarks small requests / second

Closes #10771

2 years agoruntests: show error message if file can't be written
Dan Fandrich [Wed, 29 Mar 2023 21:15:16 +0000 (14:15 -0700)] 
runtests: show error message if file can't be written

2 years agotests: fix remaining servers to run with a dynamic log directory
Dan Fandrich [Wed, 29 Mar 2023 18:27:53 +0000 (11:27 -0700)] 
tests: fix remaining servers to run with a dynamic log directory

This final commit in the series is sufficient to allow the tests succeed
if $LOGDIR is changed in runtests.pl.

Ref: #10818
Closes #10866

2 years agotests: fix fake_ntlm to run with a dynamic log directory
Dan Fandrich [Wed, 29 Mar 2023 19:20:02 +0000 (12:20 -0700)] 
tests: fix fake_ntlm to run with a dynamic log directory

Ref: #10818

2 years agotests: fix http servers to run with a dynamic log directory
Dan Fandrich [Wed, 29 Mar 2023 15:54:57 +0000 (08:54 -0700)] 
tests: fix http servers to run with a dynamic log directory

Ref: #10818

2 years agotests: fix ftpserver to run with a dynamic log directory
Dan Fandrich [Wed, 29 Mar 2023 15:48:03 +0000 (08:48 -0700)] 
tests: fix ftpserver to run with a dynamic log directory

Ref: #10818

2 years agotests: fix C servers to run with a dynamic log directory
Dan Fandrich [Wed, 29 Mar 2023 17:23:28 +0000 (10:23 -0700)] 
tests: fix C servers to run with a dynamic log directory

Ref: #10818

2 years agotests: fix lib tests to run with a dynamic log directory
Dan Fandrich [Wed, 29 Mar 2023 15:29:29 +0000 (08:29 -0700)] 
tests: fix lib tests to run with a dynamic log directory

Ref: #10818

2 years agotests: fix unit tests to run with a dynamic log directory
Dan Fandrich [Wed, 29 Mar 2023 05:30:50 +0000 (22:30 -0700)] 
tests: fix unit tests to run with a dynamic log directory

Ref: #10818

2 years agotests: use %LOGDIR to refer to the log directory
Dan Fandrich [Wed, 29 Mar 2023 01:20:54 +0000 (18:20 -0700)] 
tests: use %LOGDIR to refer to the log directory

This will allow it be set dynamically.

Ref: #10818

2 years agoruntests: track verification time even if no files to compare
Dan Fandrich [Wed, 29 Mar 2023 04:14:13 +0000 (21:14 -0700)] 
runtests: track verification time even if no files to compare

2 years agogetpart: better handle case of file not found
Dan Fandrich [Wed, 29 Mar 2023 04:07:06 +0000 (21:07 -0700)] 
getpart: better handle case of file not found

2 years agotestcurl: bump version date
Dan Fandrich [Tue, 28 Mar 2023 22:14:54 +0000 (15:14 -0700)] 
testcurl: bump version date

It hadn't been updated in 9 years; it's time.

2 years agotests: switch to 3-argument open in test suite
Dan Fandrich [Tue, 28 Mar 2023 20:29:36 +0000 (13:29 -0700)] 
tests: switch to 3-argument open in test suite

The perl 2-argument open has been considered not-quite-deprecated since
the 3-argument form was introduced almost a quarter century ago.

2 years agotests: silence some Perl::Critic warnings in test suite
Dan Fandrich [Tue, 28 Mar 2023 02:58:00 +0000 (19:58 -0700)] 
tests: silence some Perl::Critic warnings in test suite

Not all warnings are fixed; many are as much stylistic suggestions than
anything and IMHO don't do much to actually improve the code.

Ref: #10818
Closes #10861

2 years agodocs: bump the minimum perl version to 5.6
Dan Fandrich [Tue, 28 Mar 2023 04:09:55 +0000 (21:09 -0700)] 
docs: bump the minimum perl version to 5.6

It's actually been this way since at least 2012 (when a 3-argument open
was added to runtests.pl). Given the lack of complaints in the interim,
it's safe to call this 23 year old perl version the minimum.

2 years agoruntests: memoize the getpart* subroutines to speed up access
Dan Fandrich [Fri, 24 Mar 2023 20:08:06 +0000 (13:08 -0700)] 
runtests: memoize the getpart* subroutines to speed up access

The refactored code calls these functions with the same arguments more
often, so this prevents redundant test case file parsing.

Approved-by: Daniel Stenberg
Ref: #10818
Closes #10833

2 years agoruntests: remove duplicated feature variables
Dan Fandrich [Fri, 24 Mar 2023 00:29:59 +0000 (17:29 -0700)] 
runtests: remove duplicated feature variables

Use the feature map stored in the hash table instead. Most of the
variables were only used only once, to set the value in the hash table.

Ref: #10818

2 years agoruntests: also ignore test file problems when ignoring results
Dan Fandrich [Fri, 24 Mar 2023 21:20:32 +0000 (14:20 -0700)] 
runtests: also ignore test file problems when ignoring results

This simplifies error handling in the test verification code and makes
it more consistent.

Ref: #10818

2 years agoruntests: more refactoring for clarity
Dan Fandrich [Thu, 23 Mar 2023 21:38:21 +0000 (14:38 -0700)] 
runtests: more refactoring for clarity

Ref: #10818

2 years agoruntests: don't start servers if -l is given
Dan Fandrich [Thu, 23 Mar 2023 20:30:32 +0000 (13:30 -0700)] 
runtests: don't start servers if -l is given

2 years agoruntests: fix typos
Dan Fandrich [Thu, 23 Mar 2023 18:31:54 +0000 (11:31 -0700)] 
runtests: fix typos

2 years agoruntests: refactor singletest() into separate functions
Dan Fandrich [Wed, 22 Mar 2023 23:48:23 +0000 (16:48 -0700)] 
runtests: refactor singletest() into separate functions

This takes it from a 1200 line behemoth into something more manageable.
The content and order of the functions is taken almost directly from
singletest() so the diff sans whitespace is quite short.

Ref: #10818

2 years agoruntests: refactor singletest() into distinct sections
Dan Fandrich [Wed, 22 Mar 2023 20:35:06 +0000 (13:35 -0700)] 
runtests: refactor singletest() into distinct sections

Namely:
- Verify that this test case should be run
- Start the servers needed to run this test case
- Check that test environment is fine to run this test case
- Prepare the test environment to run this test case
- Run the test command
- Clean up after test command
- Verify test succeeded

Ref: #10818