Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Feb 6, 2025

In certain Windows configurations, Perl resides under C:/Program Files
causing tests to fail when executing Perl. Fix by quoting the command.

Seen in dl-mingw jobs when switching to the default bash shell
offered by the windows-latest runner on GHA.

Also:

  • apply the same fix for valgrind for consistency.
  • make more use of shell_quote() when passing the srcdir directory
    over the command-line. This doesn't come up in CI, but seems like
    good practice. There are lots more unquoted arguments and possibly
    also commands.
-------e--- OK (940 out of 1537, remaining: 00:32, took 0.217s, duration: 00:50)
test 1167...[Verify curl prefix of public symbols in header files]
/C/Program Files/Git/usr/bin/perl -I. -ID:/a/curl/curl/tests  returned 127, when expecting 0
 1167: exit FAILED
[...]
=== Start of file stderr1167
 sh: line 1: /C/Program: No such file or directory

Ref: https://github.com/curl/curl/actions/runs/13181757313/job/36794072190?pr=16217#step:13:2107

@github-actions github-actions bot added the tests label Feb 6, 2025
@vszakats vszakats added the Windows Windows-specific label Feb 6, 2025
@testclutch
Copy link

Analysis of PR #16220 at 37f354f5:

Test 987 failed, which has NOT been flaky recently, so there could be a real issue in this PR.

Generated by Testclutch

@vszakats vszakats marked this pull request as draft February 6, 2025 17:33
```
-------e--- OK (940 out of 1537, remaining: 00:32, took 0.217s, duration: 00:50)
test 1167...[Verify curl prefix of public symbols in header files]

/C/Program Files/Git/usr/bin/perl -I. -ID:/a/curl/curl/tests  returned 127, when expecting 0
 1167: exit FAILED
== Contents of files in the log/2/ dir after test 1167
=== Start of file server.cmd
 Testnum 1167
=== End of file server.cmd
=== Start of file stderr1167
 sh: line 1: /C/Program: No such file or directory
=== End of file stderr1167
test 1165...[Verify configure.ac and source code CURL_DISABLE_-sync]

/C/Program Files/Git/usr/bin/perl -I. -ID:/a/curl/curl/tests  returned 127, when expecting 0
 1165: exit FAILED
```
https://github.com/curl/curl/actions/runs/13181757313/job/36794072190?pr=16217#step:13:2107
@vszakats vszakats force-pushed the runtest-perl-spaces branch from 37f354f to e7693a0 Compare February 6, 2025 19:41
@vszakats vszakats changed the title globalconfig.pm: quote perl command to support paths with spaces runtests: quote commands to support paths with spaces Feb 6, 2025
@vszakats vszakats marked this pull request as ready for review February 6, 2025 19:55
@vszakats vszakats closed this in 3814fb5 Feb 6, 2025
@vszakats vszakats deleted the runtest-perl-spaces branch February 6, 2025 20:05
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
In certain Windows configurations, Perl resides under `C:/Program Files`
causing tests to fail when executing Perl. Fix by quoting the command.

Seen in `dl-mingw` jobs when switching to the default `bash` shell
offered by the `windows-latest` runner on GHA.

Also:
- apply the same fix for `valgrind` for consistency.
- make more use of `shell_quote()` when passing the `srcdir` directory
  over the command-line. This doesn't come up in CI, but seems like
  good practice. There are lots more unquoted arguments and possibly
  also commands.

```
-------e--- OK (940 out of 1537, remaining: 00:32, took 0.217s, duration: 00:50)
test 1167...[Verify curl prefix of public symbols in header files]
/C/Program Files/Git/usr/bin/perl -I. -ID:/a/curl/curl/tests  returned 127, when expecting 0
 1167: exit FAILED
[...]
=== Start of file stderr1167
 sh: line 1: /C/Program: No such file or directory
```
Ref: https://github.com/curl/curl/actions/runs/13181757313/job/36794072190?pr=16217#step:13:2107

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

Labels

tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants