← Commit list

2decbb1c1f

Viktor Szakats
Viktor Szakats
2025-11-19
SUCCESS Duration: 342s

Subject

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

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/runtests.md+4 -0
@@ -180,6 +180,10 @@ regression test suite.
Lists all test case names.
+## `-m=[seconds]`
+
+Set timeout for curl commands in tests
+
## `-n`
Disable the check for and use of valgrind.
tests/data/test1400+1 -0
@@ -59,6 +59,7 @@ $_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_SSLVERSION/
$_ = '' if /CURLOPT_HTTP09_ALLOWED/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
<file name="%LOGDIR/test%TESTNUMBER.c" mode="text">
/********* Sample code generated by the curl command line tool **********
tests/data/test1401+1 -0
@@ -68,6 +68,7 @@ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
<file name="%LOGDIR/test%TESTNUMBER.c" mode="text">
/********* Sample code generated by the curl command line tool **********
tests/data/test1402+1 -0
@@ -62,6 +62,7 @@ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
<file name="%LOGDIR/test%TESTNUMBER.c" mode="text">
/********* Sample code generated by the curl command line tool **********
tests/data/test1403+1 -0
@@ -59,6 +59,7 @@ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
<file name="%LOGDIR/test%TESTNUMBER.c" mode="text">
/********* Sample code generated by the curl command line tool **********
tests/data/test1404+1 -0
@@ -104,6 +104,7 @@ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
# CURL_DOES_CONVERSION generates an extra comment.
$_ = '' if /\/\* "value" \*\//
</stripfile>
tests/data/test1405+1 -0
@@ -144,6 +144,7 @@ $_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_HTTP09_ALLOWED/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
</verify>
</testcase>
tests/data/test1406+1 -0
@@ -131,6 +131,7 @@ $_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_HTTP09_ALLOWED/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
</verify>
</testcase>
tests/data/test1407+1 -0
@@ -109,6 +109,7 @@ $_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_HTTP09_ALLOWED/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
</verify>
</testcase>
tests/data/test1420+1 -0
@@ -113,6 +113,7 @@ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
</verify>
</testcase>
tests/data/test1465+1 -0
@@ -65,6 +65,7 @@ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
$_ = '' if /CURLOPT_SSLVERSION/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
<file name="%LOGDIR/test%TESTNUMBER.c" mode="text">
/********* Sample code generated by the curl command line tool **********
tests/data/test1481+1 -0
@@ -61,6 +61,7 @@ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
$_ = '' if /CURLOPT_HTTP09_ALLOWED/
$_ = '' if /CURLOPT_INTERLEAVEDATA/
+$_ = '' if /CURLOPT_TIMEOUT_MS/
</stripfile>
<file name="%LOGDIR/test%TESTNUMBER.c" mode="text">
/********* Sample code generated by the curl command line tool **********
tests/data/test285+1 -1
@@ -16,7 +16,7 @@ tftp
TFTP send
</name>
<command>
--T %LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT// --connect-timeout 549
+-T %LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT// --connect-timeout 549 --max-time 599
</command>
<file name="%LOGDIR/test%TESTNUMBER.txt">
a chunk of
tests/globalconfig.pm+2 -0
@@ -49,6 +49,7 @@ BEGIN {
$buildinfo
$LOCKDIR
$LOGDIR
+ $maxtime
$memanalyze
$MEMDUMP
$perlcmd
@@ -103,6 +104,7 @@ our $anyway; # continue anyway, even if a test fail
our $CURLVERSION=""; # curl's reported version number
our $CURLVERNUM=""; # curl's reported version number (without -DEV)
our $randseed = 0; # random number seed
+our $maxtime; # curl command timeout override
# paths
our $pwd = getcwd(); # current working directory
tests/runner.pm+3 -0
@@ -972,6 +972,9 @@ sub singletest_run {
if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-q/)) {
$CMDLINE .= " -q";
}
+ if($maxtime) {
+ $CMDLINE .= " --max-time $maxtime";
+ }
}
if(use_valgrind() && !$disablevalgrind) {
tests/runtests.pl+5 -0
@@ -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