From cdce2460b330d4c1084849ec50149efe3cc1fc7b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Jun 2026 12:37:48 +0200 Subject: [PATCH] runtests: allow skipping tests on torture, use for test 357 Some tests may take a long time in torture mode. Make it possible to skip individual tests when runtests in running in torture mode. Also: - skip test 357 for the reason above. Saved 1-3 minutes for the Linux CI torture job, 1-1.5m on Windows. No savings on macOS. Reported-by: Stefan Eissing Fixes #21873 Closes #21906 --- docs/tests/FILEFORMAT.md | 1 + docs/tests/TEST-SUITE.md | 3 +++ tests/data/test357 | 3 +++ tests/runtests.pl | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/docs/tests/FILEFORMAT.md b/docs/tests/FILEFORMAT.md index 26e32ecd7f..0518be11fd 100644 --- a/docs/tests/FILEFORMAT.md +++ b/docs/tests/FILEFORMAT.md @@ -539,6 +539,7 @@ Features testable here are: - `SSPI` - `threaded-resolver` - `TLS-SRP` +- `torture` - if runtests is running in memory test mode - `TrackMemory` - `typecheck` - `threadsafe` diff --git a/docs/tests/TEST-SUITE.md b/docs/tests/TEST-SUITE.md index 51a3f20b22..6856eb5f8a 100644 --- a/docs/tests/TEST-SUITE.md +++ b/docs/tests/TEST-SUITE.md @@ -188,6 +188,9 @@ that memory leaks do not occur even in those situations. It can help to compile curl with `CPPFLAGS=-DMEMDEBUG_LOG_SYNC` when using this option, to ensure that the memory log file is properly written even if curl crashes. +If a specific test takes a long time to run in memory test mode, you can +disable it individually by adding `!torture` to its `` section. + ### Debug If a test case fails, you can conveniently get the script to invoke the diff --git a/tests/data/test357 b/tests/data/test357 index a763fd2255..c6b11bd83c 100644 --- a/tests/data/test357 +++ b/tests/data/test357 @@ -48,6 +48,9 @@ no-expect http + +!torture + HTTP PUT with Expect: 100-continue and 417 response diff --git a/tests/runtests.pl b/tests/runtests.pl index cd0572a59e..a8072e32cd 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -759,6 +759,10 @@ sub checksystemfeatures { } } + if($torture) { + $feature{"torture"} = 1; + } + if(!$curl) { logmsg "unable to get curl's version, further details are:\n"; logmsg "issued command: \n";