Commit Graph

33601 Commits

Author SHA1 Message Date
Viktor Szakats
e474b02301
runtests: fix indentation 2024-09-30 01:51:12 +02:00
Viktor Szakats
80a8e24956
GHA/cygwin, msys: move tests to cmake jobs, to finish faster
Move test runs from autotools jobs to cmake ones for Cygwin and MSYS.
This makes producing test results and finishing the workflows faster,
because the cmake build steps are much faster than autotools in these
envs.

Also:
- drop building examples with Cygwin autotools. It takes almost
  4 minutes. Keep building them with cmake, taking 20 seconds.
- drop building examples in MSYS autotools jobs that run tests.
  Keep building them in autotools jobs without tests. It makes
  the longest running job 2 minutes shorter.

After this patch Cygwin job times are on par with or lower than Windows
ones. It means Cygwin doesn't cause extra delay to finish the whole
workflow, allowing to re-merge these jobs into the Windows workflow.

Closes #15083
2024-09-30 01:45:01 +02:00
Viktor Szakats
47d604ae7e
GHA/windows: fix find in old-mingw-w64 curl -V step
By default it runs the Windows `find` command and fails.
Tweak the `PATH` to find the MSYS shell implementation.
2024-09-29 22:35:48 +02:00
Viktor Szakats
2c419fc14b
ci: tidy-ups
- http3-linux: add newlines for readability.
- http3-linux: use `make pytest` to run pytest.
- checksrc: use `|` multiline to sync with other uses.
- checksrc: prefer `$()`.
- prefer `>-` over `>` for folded option lists.
- cygwin: drop a `grep` no longer necessary.

Closes #15081
2024-09-29 17:39:55 +02:00
Viktor Szakats
8a8719d2e1
cmake: websockets tidy-ups
- restore change lost after websockets-default update.
  Ref: 6a1dcdc5d2 #14998
- delete unused line after websockets is on by default.
  Follow-up to d78e129d50 #14936

Closes #15078
2024-09-29 17:39:55 +02:00
Viktor Szakats
842f88434f
GHA linux: restore apt-get update
It seems like the Ubuntu apt mirror list or other preloaded data on the
Linux runner can go stale (?) throughout a single week causing failures
like this, in some of the jobs:
```
Ign:16 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 libapr1-dev amd64 1.7.0-8ubuntu0.22.04.1
Err:16 mirror+file:/etc/apt/apt-mirrors.txt jammy-updates/main amd64 libapr1-dev amd64 1.7.0-8ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Get:24 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libnghttp2-dev amd64 1.43.0-1ubuntu0.2 [117 kB]
Get:25 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 vsftpd amd64 3.0.5-0ubuntu1.1 [123 kB]
Fetched 4029 kB in 2s (1682 kB/s)
E: Failed to fetch mirror+file:/etc/apt/apt-mirrors.txt/pool/main/a/apr/libapr1-dev_1.7.0-8ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Process completed with exit code 100.
```
https://github.com/curl/curl/actions/runs/11074211380/job/30772496037#step:32:63

Restore `apt update` to fix it.

Follow-up to 1b8449674a #14992

Closes #15082
2024-09-28 20:59:22 +02:00
Tatsuhiro Tsujikawa
7048d1d211
docs/cmdline-opts: GnuTLS supports PKCS#11 URI in --cert option
Closes #15075
2024-09-28 18:09:05 +02:00
Viktor Szakats
f2ce14e10a
singleuse: limit checks to non-unity jobs
`singleuse.pl` requires non-unity builds. With unity builds, it remains
silent.

- make some jobs non-unity to allow singleuse to do its job.
- since all jobs used the `--unit` singleuse checker option, make this
  option permanent.

Closes #15065
2024-09-27 18:24:31 +02:00
Viktor Szakats
9541e66623
GHA/windows: formatting, adjust timeouts, tidy-ups
- reduce job timeouts for msys2 and old-mingw-w64 jobs.
- fold long lines and reorder options in MSVC jobs.
- make some options default in MSVC jobs.

Closes #15017
2024-09-27 18:24:31 +02:00
Dan Fandrich
95d33905fb CI: update 32-bit CI to Ubuntu 24.04 and enable more
Enable librtmp, libssh, libidn2 and c-ares support for broader 32-bit
test coverage. Bump the gcc version to 14.

Closes #15068
2024-09-27 08:59:55 -07:00
Stefan Eissing
7f3d598276
CI: improvements in test reliability and performance
- CI default: raise parallelism to 20
- CI valgind: set parallelism to 6
- CI non-native: adapt parallelism for OS builds
- CI Windows: no longer ignore FTP, TFTP, MQTT and SMTP
- CI Windows: restrict test timeout to 10 minutes
- CI Windows: do not run tests for msh3 build
- tests, various: restrict curl invocation to ipv4 to avoid talking to
  any ipv6 test server running in parallel
- tests: requiring http/2 server no longer needs to mention http server
- test 190: use a fixed timeout of 10 seconds instead of %FTPTIME2, as
  that value rises under parallel load beyond what the server is waiting
  and then produces different results
- test 1540: add debug logging
- testrunner: add verify checks for http/2 and http/3 server

Closes #15040
2024-09-27 16:47:37 +02:00
Daniel Stenberg
aca28abac7
lib: fix disabled-verbose-strings + enable-debug build warnings 2024-09-27 13:20:25 +02:00
Daniel Stenberg
d78e129d50
WebSockets: make support official (non-experimental)
Inverts the configure/cmake options to instead provide options that
disable WebSockets and have them (ws + wss) enabled by default.

Closes #14936
2024-09-27 13:20:25 +02:00
Viktor Szakats
cfae354a9a
codespell: extend checks to more subdirs
- fix issues found.
- fix a few more found locally.

Closes #15072
2024-09-27 10:27:08 +02:00
Viktor Szakats
6b2824dae1
GHA/torture: prefer pip --break-system-packages for speed
Follow-up to c5e3d8ba94 #14972

Closes #15071
2024-09-27 10:27:08 +02:00
Viktor Szakats
fcc89619d9
singleuse: make git grep faster, add Apple nm support
- avoid regexp in grep to make it run faster.
- add support for parsing Apple `nm` output:
  - skip leading underscore from function names.
  - pick object name from output.

Closes #15070
2024-09-27 10:27:08 +02:00
Viktor Szakats
f0f9e2c61f
GHA/http3-linux: add name to align with other Linux workflows
Closes #15069
2024-09-27 10:27:08 +02:00
Daniel Stenberg
1b0da9cfc7
RELEASE-NOTES: synced 2024-09-26 23:52:59 +02:00
Viktor Szakats
44505adb36
GHA/linux: improve cmake use, switch to Ninja
- cmake: allow easy switching of generator (= make tool).
- merge autotools/cmake job steps.
- cmake: switch to Ninja.
  (build was already fast, Ninja doesn't make it noticeably faster)

Closes #15023
2024-09-26 23:43:45 +02:00
Daniel Stenberg
d08d16cac3
multi: avoid reading whole struct pointer from pointer
The proper alignment is not guaranteed. This function now instead uses
only the first and last byte of the key since they are the ones likely
to change most (one of them, depending on CPU endian) and the hash is
tiny anyway.

Closes #15063
2024-09-26 23:37:15 +02:00
Stefan Eissing
6f2a1666a1
tests: use '-4' where needed
Our test servers run either on ipv4 *or* on ipv6, as requested.
A test case using 'localhost' or '*.local' in the url needs to
run with the specific version of the server started.

Otherwise, curl's "happy eyeball"ing will connect to another
server that may be running due to parallel testing or for some
other reasons.

Note that port reuse here depends on the OS strategy and it
seems netbsd is especially likely to hit this.

Closes #15060
2024-09-26 23:36:09 +02:00
Stefan Eissing
841fbdb63c
tests: improve mqtt server handling
Check that the mqtt server process actually is running.
Handle its port number similar to other servers.

Closes #15059
2024-09-26 23:35:13 +02:00
Stefan Eissing
e61c5eb417
tests: check http/2 and http/3 server responsiveness
Check responsiveness of http/3 server when running.

Also, a test case with http/2 or http/3 server requirement
now implicitly drags in a 'http' server and we need no longer
mention that in testdata.

Closes #15058
2024-09-26 23:34:16 +02:00
Stefan Eissing
ef400f4f38
test190: replace %FTPTIME2 with a fixed value
The variable FTPTIME2 may, on a loaded test server, become so
large that the timeout does not happen before the fixed 60 seconds
the server waits.

Closes #15056
2024-09-26 23:33:18 +02:00
Daniel Stenberg
dc284be4cc
tests: remove the %FTPTIME3 variable
Nothing uses it.

Ref: #15056
Closes #15064
2024-09-26 23:25:47 +02:00
Daniel Stenberg
af60bdf4ec
socks_gssapi: switch to dynbuf from buffer with strcpy
Closes #15057
2024-09-26 23:24:14 +02:00
Dan Fandrich
8e9a8dd978 tests: add file: tests with existing files
Windows sometimes has issues when opening the same file twice, so these
test two situations where that could potentially occur.

Reported-by: ralfjunker on github
Ref: #15043
Closes #15045
2024-09-26 10:10:36 -07:00
Daniel Stenberg
dd0405c909
test518: restore valgrind disable
Follow-up to c91c37b6e8

The test does not work well when run with valgrind

Closes #15062
2024-09-26 17:02:09 +02:00
Daniel Stenberg
5d7275d5df
openssl: convert a memcpy to dynbuf use
and avoid an alloc for CN handling unless necessary

Closes #15049
2024-09-26 17:00:43 +02:00
Stefan Eissing
b2dc95540a
test1540: add debug logging
Closes #15055
2024-09-26 16:58:42 +02:00
Stefan Eissing
cbbf4d8ed2
test504: fix handling on pending connect
Test expected a connect to a port no one is listening to immediately
fail. But Windows has its internal retry logic that may fail this.

As fix, multi_perform()/multi_wait() until transfer is done.

Closes #15054
2024-09-26 16:57:51 +02:00
Stefan Eissing
17a7e12e1b
test2502: add libtest debug tracing
Closes #15053
2024-09-26 16:57:13 +02:00
Stefan Eissing
f518982775
testrun: explicitly set proper IP address for stunnel listen/connect
Closes #15051
2024-09-26 16:55:52 +02:00
Gabriel Marin
8289ac1be6
lib/cw-out: initialize 'flush_all' directly
Closes #15044
2024-09-26 16:55:01 +02:00
Stefan Eissing
21fb30b5d1
test1035: convert host name back to utf8 as should be
Follow-up to 0b70b23ef4

Closes #15050
2024-09-26 16:54:03 +02:00
Daniel Stenberg
4e22d7c56a
openssl: remove two strcpy() calls
Closes #15052
2024-09-26 15:51:47 +02:00
Daniel Stenberg
f383a17617
tool_doswin: simplify; remove unused options and strncpy calls
SANITIZE_ALLOW_TRUNCATE and SANITIZE_ALLOW_COLONS were never used by
code, thus only making the code complicated for no good use.

Since nothing should truncate, using strncpy() is wrong.

Two cases of malloc + copy replaced with proper strdup() calls.

Fixup unit test 1604 accordingly.

Closes #15047
2024-09-26 10:45:08 +02:00
Daniel Stenberg
0b70b23ef4
tests: add codeset-utf8 as a feature
To avoid having to use <precheck> for tests that require UTF-8 support.

Closes #15039
2024-09-26 08:44:59 +02:00
Daniel Stenberg
5fb1b64fdd
tests: introduce %CLIENT6IP-NB
This is the %CLIENT6IP variable - but without outmost brackets since
some commmand lines need the address without the brackets. With this
variable we can run three more tests without prechecks.

Closes #15039
2024-09-26 08:44:55 +02:00
Daniel Stenberg
7aa2b4e01f
tests: make precheck for HTTP on 127.0.0.1 into a feature
It can now be required easily in <features> instead of having perl code
in a <precheck>.

Closes #15039
2024-09-26 08:44:45 +02:00
Daniel Stenberg
56183c1d6f
tests: postcheck is now in verify
Also introduce 'notexists' for verifying that directory entries do not
exist after a test. Now an explicit supported feature instead of using
"funny" perl in postcheck.

Closes #15046
2024-09-26 08:43:24 +02:00
Daniel Stenberg
7060b9b082
build: fix cross-compile check for poll with bionic
Since it seems the _POSIX_C_SOURCE "trick" does not work there, the
check does not find poll().

Fixes #15013
Reported-by: vvb2060 on github
Closes #15037
2024-09-25 23:41:17 +02:00
Daniel Stenberg
da94b02372
THANKS: cleanup duplicates 2024-09-25 09:54:09 +02:00
Viktor Szakats
d82f9f965c
build: add pytest targets
It enables running pytests in cmake jobs, regardless of underlying build
tool choice (= makes it work with ninja.)

Also:

- drop pytest logic launching `make` and exiting in case of failure.
  Maybe there is a better way and keep this functionality somehow, bind
  it to a command-line option? make it fail softly?

- GHA/linux: invoke pytest via the build, not directly.

- autotools: add missing dummy runtests targets when cross-compiling.

Closes #15034
2024-09-25 09:25:44 +02:00
Viktor Szakats
ed766751cc
GHA/linux: tidy up msh3 build step
Ninja does not improve msh3 build speed on GHA/linux:
https://github.com/curl/curl/actions/runs/11020206432/job/30604509300

Cherry-picked from #15023
2024-09-25 09:20:52 +02:00
Viktor Szakats
b4cf21b45d
build: clarify CA embed is for curl tool, mark default, improve summary
- say that CA embed is for the curl tool.
- show "no" in summary when there is no CA embed.
- cmake: sync wording.

Closes #15035
2024-09-25 09:10:45 +02:00
Viktor Szakats
73ea09b9ef
GHA/linux: review and prune valgrind use
Valgrind jobs are slow, drop it from jobs where its use is redundant
and/or has limited impact:

- BearSSL: deprecated.
- LibreSSL heimdal with autotools.
  Keep valgrind for the same job with cmake.
- msh3.
- IntelC no-SSL.
  Keep valgrind for IntelC OpenSSL.
- OpenSSL 3.
  All OpenSSL jobs are v3 now, keep valgrind for the `-O3`, and
  libssh2 + sync-resolver variants.

Closes #15020
2024-09-25 09:10:45 +02:00
Viktor Szakats
68a224c291
tidy-up: indentation in autotools sources
Indentation in `configure.ac` and `.m4` files.

Closes #14692
2024-09-25 09:10:45 +02:00
Gabriel Marin
b70e8f4b9b
cleanup: added space around ternary expressions
Closes #14990
2024-09-25 08:02:01 +02:00
Gabriel Marin
b7c9166c4c
test1185: Updated test data with NOSPACEC rule
Closes #14990
2024-09-25 08:01:58 +02:00