runtests: add -m=seconds to override test curl command timeout

To override the curl default of 5 minutes (300000 ms).

Sometimes a simple test data change can result in a stuck test, this
option makes it exit with an error early. Possible future use in CI
or fast machines to prevent a single test taking 5 minutes and failing
the whole job.

Example hangers:

tests/data/test65:
```diff
-<data1000 crlf="yes">
+<data1000 crlf="headers">
```

tests/data/tests993:
```diff
-%repeat[1000 x 95 328485%0d%0a]%</data>
+%repeat[1000 x 95 328485%0d%0a]%
+</data>
```

Closes #19319
This commit is contained in:
Viktor Szakats 2025-11-01 03:07:36 +01:00
parent 991119051c
commit 2decbb1c1f
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
16 changed files with 26 additions and 1 deletions

View file

@ -2421,6 +2421,10 @@ while(@ARGV) {
$short=1;
$automakestyle=1;
}
elsif($ARGV[0] =~ /-m=(\d+)/) {
my ($num)=($1);
$maxtime=$num;
}
elsif($ARGV[0] eq "-n") {
# no valgrind
undef $valgrind;
@ -2563,6 +2567,7 @@ Usage: runtests.pl [options] [test selection(s)]
-k keep stdout and stderr files present after tests
-L path require an additional perl library file to replace certain functions
-l list all test case names/descriptions
-m=[seconds] set timeout for curl commands in tests
-n no valgrind
--no-debuginfod disable the valgrind debuginfod functionality
-o variable=value set internal variable to the specified value