pytest: add SOCKS tests and scoring

Configure curl with `--with-test-sockd=<path to sockd>` for a locally
installed dante sockd server and new `test_40_*` will verify that
down- and uploads work via SOCKS.

Invoke scorecard.py with `--socks4` or `--socks5` to run performance
tests with SOCKS. Note that SOCKS is not supported for HTTP/3.

Ref: #17969
Closes #17986
This commit is contained in:
Stefan Eissing 2025-07-21 12:23:06 +02:00 committed by Daniel Stenberg
parent fb0b4c8710
commit ab5e0bfddc
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
15 changed files with 450 additions and 66 deletions

View file

@ -463,6 +463,7 @@ Details via CMake
- `CADDY`: Default: `caddy`
- `HTTPD_NGHTTPX`: Default: `nghttpx`
- `HTTPD`: Default: `apache2`
- `SOCKD`: Default: `sockd`
- `TEST_NGHTTPX`: Default: `nghttpx`
- `VSFTPD`: Default: `vsftps`

View file

@ -52,6 +52,13 @@ curl> python3 tests/http/scorecard.py -d --download-sizes=1mb --download-count=1
Similar options are available for uploads and requests scenarios.
## sockd
If you have configured curl with `--with-test-sockd=<sockd-path>` for a
`dante sockd` server installed on your system, you can provide the scorecard
with arguments `--socks4` or `--socks5` to test performance with a SOCKS proxy
involved. (Note: this does not work for HTTP/3)
## dtrace
With the `--dtrace` option, scorecard produces a dtrace sample of the user stacks in `tests/http/gen/curl/curl.user_stacks`. On many platforms, `dtrace` requires **special permissions**. It is therefore invoked via `sudo` and you should make sure that sudo works for the run without prompting for a password.

View file

@ -52,6 +52,7 @@ Via curl's `configure` script you may specify:
* `--with-test-httpd=<httpd-install-path>` if you have an Apache httpd installed somewhere else. On Debian/Ubuntu it will otherwise look into `/usr/bin` and `/usr/sbin` to find those.
* `--with-test-caddy=<caddy-install-path>` if you have a Caddy web server installed somewhere else.
* `--with-test-vsftpd=<vsftpd-install-path>` if you have a vsftpd ftp server installed somewhere else.
* `--with-test-sockd=<dante-sockd-path>` if you have `dante sockd` server installed
## Usage Tips