Skip to content
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

test613: make it pass on Windows, fix postprocess, unignore in CI #16791

Closed
wants to merge 11 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Mar 22, 2025

  • on native Windows (also when using MSYS2 openssh), the group and other
    permissions do not end up as requested by Perl's chmod:

    --- log/8/check-expected
    +++ log/8/check-generated
    @@ -1,3 +1,3 @@
     d?????????    N U         U               N ???  N NN:NN asubdir[LF]
    --rw?rw?rw?    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
    +-rw?r-?r-?    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
     -r-?r-?r-?    1 U         U              47 Dec 31  2000 rofile.txt[LF]

    Ref: https://github.com/curl/curl/actions/runs/14004029192/job/39215359241?pr=16781#step:15:1596
    Fix it by ignoring group and other attributes.

  • fix failing postprocess cleanup by making the read-only test file
    writeable again before deleting it. Fixing:

    Directory not empty at ../../tests/libtest/test613.pl line 83.
    

    (seen on Windows with Git for Windows perl.exe)

  • unignore in GHA/windows.

@github-actions github-actions bot added CI Continuous Integration and removed SCP/SFTP Windows Windows-specific labels Mar 22, 2025
@testclutch

This comment was marked as outdated.

vszakats added 11 commits March 24, 2025 09:49

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats
- on native Windows (also when using MSYS2 openssh), the group and other
  permissions aren't set as requested by Perl's chmod:
  ```
  --- log/8/check-expected
  +++ log/8/check-generated
  @@ -1,3 +1,3 @@
   d?????????    N U         U               N ???  N NN:NN asubdir[LF]
  --rw?rw?rw?    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
  +-rw?r-?r-?    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
   -r-?r-?r-?    1 U         U              47 Dec 31  2000 rofile.txt[LF]
  ```
  Fix it by ignoring group and other attributes.

- fix failing cleanup process by making the read-only test file
  writeable again before deleting it. Fixing:
  ```
  Directory not empty at ../../tests/libtest/test613.pl line 83.
  ```

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats
This reverts commit 83bbeb0.

Still fails.

https://github.com/curl/curl/actions/runs/14012786350/job/39234672973?pr=16791#step:15:1905
```
  test 0614...[SFTP pre-quote chmod]

   614: data FAILED:
  --- log/1/check-expected	2025-03-22 22:14:42.124474500 +0000
  +++ log/1/check-generated	2025-03-22 22:14:42.124474500 +0000
  @@ -1,3 +0,0 @@
  -d?????????    N U         U               N ???  N NN:NN asubdir[LF]
  --r-???????    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
  --r-???????    1 U         U              47 Dec 31  2000 rofile.txt[LF]
  == Contents of files in the log/1/ dir after test 614
  === Start of file check-expected
   d?????????    N U         U               N ???  N NN:NN asubdir[LF]
   -r-???????    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
   -r-???????    1 U         U              47 Dec 31  2000 rofile.txt[LF]
  === End of file check-expected
  === Start of file commands.log
   ../src/Debug/curl.exe -q --output log/1/curl614.out  --include --trace-ascii log/1/trace614 --trace-config all --trace-time --key log/1/server/curl_client_key --pubkey log/1/server/curl_client_key.pub -u runneradmin: -Q "chmod 444 /D:/a/curl/curl/bld/tests/log/1/test614.dir/plainfile.txt" sftp://127.0.0.1:61582/D:/a/curl/curl/bld/tests/log/1/test614.dir/ --insecure > log/1/stdout614 2> log/1/stderr614
  === End of file commands.log
  === Start of file server.cmd
   Testnum 614
  === End of file server.cmd
  === Start of file stderr614
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed

     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   curl: (21) Attempt to set SFTP stats failed: SFTP server: Failure
  === End of file stderr614
  === Start of file trace614
   22:14:41.170000 [0-x] == Info: [0-x] !!! WARNING !!
   22:14:41.170000 [0-x] == Info: [0-x] This is a debug build of libcurl, do not use in production.
   22:14:41.170000 [0-x] == Info: [0-x] [MULTI] [INIT] added, transfers=1
   22:14:41.170000 [0-x] == Info: [0-x] [MULTI] [INIT] multi_perform(running=1)
   22:14:41.170000 [0-x] == Info: [0-x] [MULTI] [INIT] -> [SETUP] (line 2253)
   22:14:41.170000 [0-x] == Info: [0-x] [MULTI] [SETUP] -> [CONNECT] (line 2269)
   22:14:41.170000 [0-x] == Info: [0-x] [READ] client_reset, clear readers
   22:14:41.170000 [0-0] == Info: [0-0] Added connection 0. The cache now contains 1 members
   22:14:41.170000 [0-0] == Info: [0-0] [SETUP] added
   22:14:41.170000 [0-0] == Info: [0-0] [MULTI] [CONNECT] -> [CONNECTING] (line 2184)
   22:14:41.170000 [0-0] == Info: [0-0] [HAPPY-EYEBALLS] created ipv4 (timeout 299997ms)
   22:14:41.170000 [0-0] == Info: [0-0] [HAPPY-EYEBALLS] ipv4 starting (timeout=299997ms)
   22:14:41.170000 [0-0] == Info: [0-0]   Trying 127.0.0.1:61582...
   22:14:41.170000 [0-0] == Info: [0-0] [TCP] cf_socket_open() -> 0, fd=436
   22:14:41.170000 [0-0] == Info: [0-0] [TCP] local address 127.0.0.1 port 61615...
   22:14:41.170000 [0-0] == Info: [0-0] [HAPPY-EYEBALLS] ipv4 connect -> 0, connected=0
   22:14:41.170000 [0-0] == Info: [0-0] [SETUP] Curl_conn_connect(block=0) -> 0, done=0
   22:14:41.170000 [0-0] == Info: [0-0] [TCP] adjust_pollset, !connected, POLLOUT fd=436
   22:14:41.170000 [0-0] == Info: [0-0] [HAPPY-EYEBALLS] adjust_pollset -> 1 socks
   22:14:41.170000 [0-0] == Info: [0-0] [MULTI] [CONNECTING] multi_wait pollset[fd=436 OUT], timeouts=0
   22:14:41.170000 [0-0] == Info: [0-0] [MULTI] [CONNECTING] multi_perform(running=1)
   22:14:41.170000 [0-0] == Info: [0-0] [TCP] connected
   22:14:41.170000 [0-0] == Info: [0-0] [HAPPY-EYEBALLS] ipv4 connect -> 0, connected=1
   22:14:41.170000 [0-0] == Info: [0-0] [HAPPY-EYEBALLS] Connected to 127.0.0.1 (127.0.0.1) port 61582
   22:14:41.170000 [0-0] == Info: [0-0] [SETUP] Curl_conn_connect(block=0) -> 0, done=1
   22:14:41.170000 [0-0] == Info: [0-0] Connected to 127.0.0.1 (127.0.0.1) port 61582
   22:14:41.170000 [0-0] == Info: [0-0] [MULTI] [CONNECTING] -> [PROTOCONNECT] (line 2307)
   22:14:41.185000 [0-0] == Info: [0-0] User: runneradmin
   22:14:41.185000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_STOP to SSH_INIT (line 2214)
   22:14:41.185000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_INIT to SSH_S_STARTUP (line 662)
   22:14:41.185000 [0-0] == Info: [0-0] ssh_connect -> EAGAIN
   22:14:41.185000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECT] -> [PROTOCONNECTING] (line 2332)
   22:14:41.185000 [0-0] == Info: [0-0] ssh_connect -> EAGAIN
   22:14:41.185000 [0-0] == Info: [0-0] ssh_getsock -> 1
   22:14:41.185000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 IN], timeouts=0
   22:14:41.217000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.217000 [0-0] == Info: [0-0] ssh_connect -> EAGAIN
   22:14:41.217000 [0-0] == Info: [0-0] ssh_getsock -> 10001
   22:14:41.217000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 INOUT], timeouts=0
   22:14:41.217000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.217000 [0-0] == Info: [0-0] ssh_connect -> EAGAIN
   22:14:41.217000 [0-0] == Info: [0-0] ssh_getsock -> 1
   22:14:41.217000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 IN], timeouts=0
   22:14:41.279000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.279000 [0-0] == Info: [0-0] ssh_connect -> EAGAIN
   22:14:41.279000 [0-0] == Info: [0-0] ssh_getsock -> 10001
   22:14:41.279000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 INOUT], timeouts=0
   22:14:41.279000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.279000 [0-0] == Info: [0-0] ssh_connect -> EAGAIN
   22:14:41.279000 [0-0] == Info: [0-0] ssh_getsock -> 1
   22:14:41.279000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 IN], timeouts=0
   22:14:41.389000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.389000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_S_STARTUP to SSH_HOSTKEY (line 680)
   22:14:41.389000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_HOSTKEY to SSH_AUTHLIST (line 691)
   22:14:41.389000 [0-0] == Info: [0-0] ssh_getsock -> 10001
   22:14:41.389000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 INOUT], timeouts=0
   22:14:41.389000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.389000 [0-0] == Info: [0-0] ssh_getsock -> 1
   22:14:41.389000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 IN], timeouts=0
   22:14:41.389000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.389000 [0-0] == Info: [0-0] ssh_getsock -> 1
   22:14:41.389000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 IN], timeouts=0
   22:14:41.467000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.467000 [0-0] == Info: [0-0] SSH authentication methods available: public key,
   22:14:41.467000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_AUTHLIST to SSH_AUTH_PKEY_INIT (line 726)
   22:14:41.467000 [0-0] == Info: [0-0] Authentication using SSH public key file
   22:14:41.467000 [0-0] == Info: [0-0] ssh_getsock -> 10000
   22:14:41.467000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 OUT], timeouts=0
   22:14:41.467000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.467000 [0-0] == Info: [0-0] ssh_getsock -> 1
   22:14:41.467000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 IN], timeouts=0
   22:14:41.483000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.483000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_AUTH_PKEY_INIT to SSH_AUTH_PKEY (line 779)
   22:14:41.498000 [0-0] == Info: [0-0] ssh_getsock -> 1
   22:14:41.498000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_wait pollset[fd=436 IN], timeouts=0
   22:14:41.576000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] multi_perform(running=1)
   22:14:41.576000 [0-0] == Info: [0-0] Completed public key authentication
   22:14:41.576000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_AUTH_PKEY to SSH_AUTH_DONE (line 811)
   22:14:41.576000 [0-0] == Info: [0-0] Authentication complete
   22:14:41.576000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_AUTH_DONE to SSH_SFTP_INIT (line 911)
   22:14:41.921000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_SFTP_INIT to SSH_SFTP_REALPATH (line 936)
   22:14:41.934000 [0-0] == Info: [0-0] SSH CONNECT phase done
   22:14:41.934000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_SFTP_REALPATH to SSH_STOP (line 957)
   22:14:41.934000 [0-0] == Info: [0-0] [MULTI] [PROTOCONNECTING] -> [DO] (line 2353)
   22:14:41.934000 [0-0] == Info: [0-0] DO phase starts
   22:14:41.934000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_STOP to SSH_SFTP_QUOTE_INIT (line 2482)
   22:14:41.934000 [0-0] == Info: [0-0] Sending quote commands
   22:14:41.934000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_SFTP_QUOTE_INIT to SSH_SFTP_QUOTE (line 971)
   22:14:41.934000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_SFTP_QUOTE to SSH_SFTP_QUOTE_STAT (line 2778)
   22:14:41.936000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_SFTP_QUOTE_STAT to SSH_SFTP_QUOTE_SETSTAT (line 2965)
   22:14:41.952000 [0-0] == Info: Attempt to set SFTP stats failed: SFTP server: Failure
   22:14:41.952000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_SFTP_QUOTE_SETSTAT to SSH_SFTP_CLOSE (line 1026)
   22:14:41.952000 [0-0] == Info: [0-0] [MULTI] [DO] -> [DOING] (line 1934)
   22:14:41.952000 [0-0] == Info: [0-0] SFTP DONE done
   22:14:41.952000 [0-0] == Info: [0-0] SSH 0x1c214cfb510 state change from SSH_SFTP_CLOSE to SSH_STOP (line 1741)
   22:14:41.952000 [0-0] == Info: [0-0] DO phase is complete
   22:14:41.952000 [0-0] == Info: [0-0] [MULTI] [DOING] multi_done: status: 21 prem: 0 done: 0
   22:14:41.952000 [0-0] == Info: [0-0] Connection #0 to host 127.0.0.1 left intact
   22:14:41.952000 [0-0] == Info: [0-0] [MULTI] [DOING] -> [COMPLETED] (line 2534)
   22:14:41.952000 [0-0] == Info: [0-0] [MULTI] [COMPLETED] -> [MSGSENT] (line 2567)
   22:14:41.952000 [0-0] == Info: [0-0] [MULTI] [COMPLETED] removed, transfers=0
  === End of file trace614
```

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats
This reverts commit 708bf98.

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats
A variation of this is with libssh + OpenSSH for Windows:
```
  test 0614...[SFTP pre-quote chmod]

   614: data FAILED:
  --- log/1/check-expected	2025-03-22 22:14:42.124474500 +0000
  +++ log/1/check-generated	2025-03-22 22:14:42.124474500 +0000
  @@ -1,3 +0,0 @@
  -d?????????    N U         U               N ???  N NN:NN asubdir[LF]
  --r-???????    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
  --r-???????    1 U         U              47 Dec 31  2000 rofile.txt[LF]
  == Contents of files in the log/1/ dir after test 614
  === Start of file check-expected
   d?????????    N U         U               N ???  N NN:NN asubdir[LF]
   -r-???????    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
   -r-???????    1 U         U              47 Dec 31  2000 rofile.txt[LF]
  === End of file check-expected
[...]
 curl: (21) Attempt to set SFTP stats failed: SFTP server: Failure
```
https://github.com/curl/curl/actions/runs/14012786350/job/39234672973?pr=16791#step:15:1905

Wild guess: This may be a similar to 612: Trying to `stat` a file that
we created locally, not via `sshd`, and it's possible the server doesn't
know about the file and/or misses it due to an ACL/permission mixup.

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats
This reverts commit 4c8553abfdfb021b42f80edb8815258970a19f8b.

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats
This reverts commit 832f6d62b947db39dcb00cf337ba805abeaa5eec.

Verified

This commit was signed with the committer’s verified signature.
vszakats Viktor Szakats
This reverts commit 711ca79.
@vszakats vszakats changed the title test613: make it pass on Windows, fix post cleanup, unignore in CI test613: make it pass on Windows, fix postprocess, unignore in CI Mar 24, 2025
@vszakats vszakats closed this in efa65b2 Mar 24, 2025
@vszakats vszakats deleted the test613 branch March 24, 2025 09:06
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.

None yet

2 participants