Skip to content

test615: fix for Cygwin, unignore in CI #16818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Mar 24, 2025

Setting a server-side file read-only by chmod 0444 has does not
prevent overwriting it via SFTP upload (as tested in CI).

Fix it by setting its MS-DOS read-only attribute in addition. It
requires the Cygwin tool chattr.

Also unignore in CI.

Fixes:

test 0615...[SFTP put remote failure]
curl returned 0, when expecting 9
 615: exit FAILED
=== Start of file stderr615
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 100    30    0     0  100    30      0     93 --:--:-- --:--:-- --:--:--    95
 
 100    30    0     0  100    30      0     92 --:--:-- --:--:-- --:--:--    92
=== End of file stderr615

Ref: https://github.com/curl/curl/actions/runs/14037991918/job/39300723214#step:12:1269

vszakats added 11 commits March 24, 2025 16:09
---d---em-- OK (600 out of 1740, remaining: 02:09, took 0.946s, duration: 01:07)
test 0613 SKIPPED: # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--  # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--
test 0615 SKIPPED: # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--  # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--
test 0614 SKIPPED: # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--  # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--
test 0612...[SFTP post-quote remove file]

https://github.com/curl/curl/actions/runs/14024607711/job/39261169320?pr=16803
```
chmod 0444, "rofile.txt";
if($^O eq 'cygwin') {
  # file: rofile.txt # owner: runneradmin # group: None user::r-- group::--- group:SYSTEM:rwx	#effective:r-- group:Administrators:rwx	#effective:r-- group:Users:rwx	#effective:r-- mask::r-- other::r--
  system "/bin/setfacl --remove-all rofile.txt";
  # file: rofile.txt # owner: runneradmin # group: None user::r-- group::--- other::r--
  chmod 0444, "rofile.txt";
  # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--
  system "/bin/setfacl ---default --modify u:r,g:r,o:r rofile.txt";
  # file: rofile.txt # owner: runneradmin # group: None user::r-- group::r-- other::r--
}
```
@vszakats vszakats added tests CI Continuous Integration labels Mar 24, 2025
@vszakats vszakats closed this in 579625e Mar 24, 2025
@vszakats vszakats changed the title test615: fix for Cygwin test615: fix for Cygwin, unignore in CI Mar 24, 2025
@vszakats vszakats deleted the test615cyg branch March 24, 2025 15:50
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Setting a server-side file read-only by `chmod 0444` has does not
prevent overwriting it via SFTP upload (as tested in CI).

Fix it by setting its MS-DOS read-only attribute in addition. It
requires the Cygwin tool `chattr`.

Also unignore in CI.

Fixes:
```
test 0615...[SFTP put remote failure]
curl returned 0, when expecting 9
 615: exit FAILED
=== Start of file stderr615
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 100    30    0     0  100    30      0     93 --:--:-- --:--:-- --:--:--    95

 100    30    0     0  100    30      0     92 --:--:-- --:--:-- --:--:--    92
=== End of file stderr615
```
Ref: https://github.com/curl/curl/actions/runs/14037991918/job/39300723214#step:12:1269

Closes curl#16818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration tests
Development

Successfully merging this pull request may close these issues.

1 participant