Skip to content

runtests: retrieve curl version without using disk files - #23442

Closed
vszakats wants to merge 6 commits into
curl:masterfrom
vszakats:t-curlv-pipe
Closed

vszakats wants to merge 6 commits into
curl:masterfrom
vszakats:t-curlv-pipe

Conversation

@vszakats

@vszakats vszakats commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Prior to this patch runtests was determining curl version and build
details by saving stdout and stderr output to disk file and re-reading
from there to parse and output to log. Simplify by reading stdout+
stderr directly into memory instead.

Also avoids touching the disk, and no longer needs a log directory
present.

Also:

  • pass --disable alongside --version to prevent parsing .curlrc
    with potential extra output or side-effect.

Ref: https://perldoc.perl.org/perlop#%60STRING%60
Ref: #23424
Follow-up to 93d5952


The fundamental change here is that now the combined stdout+stderr
is parsed, while earlier, only stdout was parsed and stderr logged in
case of error. In practice however, stderr only has the bebug-enabled
build warning, the relevant information is in stdout. The warning is
just skipped by the parser after this patch. Perhaps it'd be useful to
also pass --disable to avoid a .curlrc potentially skewing the results [DONE].

@vszakats vszakats added the tests label Oct 16, 2026
@vszakats
vszakats marked this pull request as draft October 16, 2026 17:19
@vszakats vszakats added the tests label Oct 16, 2026
@vszakats
vszakats marked this pull request as ready for review October 16, 2026 17:28
Comment thread tests/runtests.pl
Comment on lines 2700 to 2708
#######################################################################
# clear and create logging directory:
#

# TODO: figure how to get around this. This directory is needed for checksystemfeatures()
# Maybe create & use & delete a temporary directory in that function
cleardir($LOGDIR);
mkdir($LOGDIR, 0777);
mkdir("$LOGDIR/$LOCKDIR", 0777);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed?

@vszakats vszakats Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's not necessary anymore, but I didn't look at it closely.

It's also what your PR aims at in #23424, seems best to continue
tackling there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound good to me. I would leave the pull request open.

To avoid potential extra output, e.g. if a .curlrc is present
with --verbose and -vvvv in it, the location of the .curlrc
file (also controllable via CURL_HOME) is output to stderr, e.g.:

```
Note: Read config file from '/path/to/.curlrc'
WARNING: this libcurl is Debug-enabled, do not use in production

```

I can't see how this could confuse the parser, but best to
prevent it with `--disable`.
@vszakats

vszakats commented Oct 17, 2026 •

Copy link
Copy Markdown
Member Author

On NetBSD 11, tests started timing out yesterday, it is unrelated to this commit.
Seen here first in master: https://github.com/curl/curl/actions/runs/38781183594 (Oct 15 at 7:54 PM GMT+2)
On a quick skim couldn't find similar failures around this time in PRs. Previous
good run: https://github.com/curl/curl/actions/runs/38714914414/job/116355144000
Package versions are identical. Perhaps it'll just disappear.

Just FTR.

Here's a run that's just slow:
https://github.com/curl/curl/actions/runs/39021153529/job/117363059050?pr=23450
Ending with:

TESTDONE: 1974 tests out of 1975 reported OK: 99%

@vszakats vszakats closed this in eaa9103 Oct 17, 2026
@vszakats
vszakats deleted the t-curlv-pipe branch October 17, 2026 00:15
vszakats added a commit that referenced this pull request Oct 17, 2026
To avoid potentially reading `.curlrc`.

Also: use long-form `--manual` option for clarity.

Follow-up to eaa9103 #23442

Closes #23450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants