Skip to content

GHA/windows: enable HTTPS tests with stunnel - #14488

Closed
AkiSakurai wants to merge 5 commits into
curl:masterfrom
AkiSakurai:windows
Closed

AkiSakurai wants to merge 5 commits into
curl:masterfrom
AkiSakurai:windows

Conversation

@AkiSakurai

Copy link
Copy Markdown
Contributor
  • install stunnel

@github-actions github-actions Bot added Windows Windows-specific CI Continuous Integration labels Aug 11, 2024
Comment thread .github/workflows/windows.yml Resolved
Comment thread .github/workflows/windows.yml Resolved
Comment thread .github/workflows/windows.yml Resolved
Comment thread .github/workflows/windows.yml Resolved
Comment thread .github/workflows/windows.yml Resolved
Comment thread .github/workflows/windows.yml Resolved
Comment thread .github/workflows/windows.yml Resolved
Comment thread .github/workflows/windows.yml Resolved
@vszakats

Copy link
Copy Markdown
Member

Thanks @AkiSakurai!

I left a couple of style nits to update.

@vszakats vszakats changed the title ci: enable https tests on windows github ci GHA/windows: enable HTTPS tests with stunnel Aug 13, 2024
Comment thread .github/workflows/windows.yml Resolved
@talregev

Copy link
Copy Markdown
Contributor

can we try to be on bash shell and install it with:
sudo apt install stunnel4?
There is a wsl on that windows vm.

@vszakats

Copy link
Copy Markdown
Member

I wonder if bumping up the timeout on the test run step would improve the failures. Maybe adding a couple of minutes would give the new tests enough time?

The GnuTLS job finished, but the new tests look like this:

test 0300...[simple HTTPS GET]
  
   300: protocol FAILED!
   There was no content at all in the file log/9/server.input.
   Server glitch? Total curl failure? Returned: 127
  == Contents of files in the log/9/ dir after test 300
  === Start of file https_stunnel.log
   2024.08.17 05:45:15 LOG5[ui]: stunnel 5.72 on x64-pc-mingw32-gnu platform
   2024.08.17 05:45:15 LOG5[ui]: Compiled/running with OpenSSL 3.2.1 30 Jan 2024
   2024.08.17 05:45:15 LOG5[ui]: Threading:WIN32 Sockets:SELECT,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI
   2024.08.17 05:45:15 LOG5[ui]: Reading configuration from file D:/a/curl/curl/bld/tests/log/9/server/https_stunnel.conf
   2024.08.17 05:45:15 LOG5[ui]: UTF-8 byte order mark not detected
   2024.08.17 05:45:15 LOG5[ui]: FIPS mode disabled
   2024.08.17 05:45:15 LOG5[ui]: Configuration successful
   2024.08.17 05:45:16 LOG5[0]: Service [curltest] accepted connection from 127.0.0.1:56114
   2024.08.17 05:45:16 LOG3[0]: SSL_accept: Connection reset by peer (WSAECONNRESET) (10054)
   2024.08.17 05:45:16 LOG5[0]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket
  === End of file https_stunnel.log

https://github.com/curl/curl/actions/runs/10429888839/job/28887828725?pr=14488#step:13:2287

What is returning 127?

@github-actions github-actions Bot added the tests label Aug 25, 2024
@vszakats vszakats closed this in bc72a78 Aug 26, 2024
@vszakats

Copy link
Copy Markdown
Member

Thank you @AkiSakurai, merged!

vszakats added a commit to vszakats/curl that referenced this pull request Sep 10, 2024
vszakats added a commit that referenced this pull request Sep 10, 2024
Give more time for recently enabled TLS tests to complete.

Follow-up to bc72a78 #14488
Ref: #14849
Closes #14851
vszakats added a commit that referenced this pull request Sep 16, 2024
CI:

- GHA/windows: enable OpenSSH server, SysInternals `handle`, `impacket`.
  Skip `impacket` on MSYS2 due to install failure.
  Skip OpenSSH server for old/standalone mingw-w64 (building curl
  without SSH there.)
- GHA/windows: make test tool installs a separate step.
- GHA/cygwin: enable OpenSSH server.
  Skip `impacket`: it's compiling for 7 minutes then breaks.
  Skip `stunnel` due to sluggish test run performance.
  (This update is unrelated to Azure jobs.)
- GHA/linux: migrate Linux jobs from Azure CI.
- GHA/linux: migrate scanbuild job from Azure CI.
- GHA/linux: enable libssh2 in a job. Also enable valgrind.
- CI/windows: enable SSPI in two jobs.
- CI/windows: disable zlib in one more job.
- CI/windows: improve `if` condition checking GnuTLS.
- CI/windows: ignore SFTP/SCP tests as necessary.
  - universally ignore SCP tests, they fail everywhere.
  - ignore test 612.
  - ignore test 613 616 618 with MSYS2 mingw-w64.
  - ignore test 614 with libssh.
  - ignore all SFTP with MSYS2 native.
  - ignore all SFTP with vcpkg with `libssh2[core,zlib]`.
  - ignore a couple of SFTP tests with MSYS2 mingw-w64.
  (This matches settings on Azure CI.)
- GHA/windows: ignore failing 1451 'Basic SMB request' test for
  old mingw-w64 7.3.0 (but not for 9.5.0!):
  ```
  2024-09-11 21:45:59,738 ERROR smbComNegotiate: b'NT LM 0.12\x00' is not in list
  [...]
  curl: (7) Could not connect to server
  [...]
  FAIL 1451: 'Basic SMB request' SMB
  ```
  Ref: https://github.com/curl/curl/actions/runs/10816280746/job/30007130770#step:13:3546
- CI/Azure: delete, now moved to GHA.

sshserver:

- sshserver: fix permissions for SSH host key on Windows, allowing sshd
  to launch.
- sshserver: fix initializing config paths with Cygwin/MSYS2 sshd.
- sshserver: fix initializing config paths in parallel builds.
- sshserver: delete redundant `DenyUsers`. This also opens the way
  to allow multiple usernames.
- sshserver: fix `AllowUsers` for GHA/windows, by allowing the
  domainless username again.
  Follow-up to 3ee7c67 #5721
- sshserver: fix `Deprecated option` warnings in `sshd_config`:
  ```
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 7: Deprecated option AuthorizedKeysFile2
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 25: Deprecated option KeyRegenerationInterval
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 35: Deprecated option RhostsRSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 36: Deprecated option RSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 37: Deprecated option ServerKeyBits
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 41: Deprecated option UseLogin
  ```
- sshserver: fix `Deprecated option` warnings in `ssh_config` with
  Cygwin/MSYS2.
- sshserver: fix dumping config files due to the filenames missing their
  full paths.
- sshserver: add workaround to make `logmsg` messages visible.
  Before this patch they only went to a file and never shown.

runtests:

- runtests: log details when these Windows commands are called:
  `handle`, `taskkill`, `tasklist`.
- runtests: add documentation links to Windows tools:
  `handle`, `taskkill`, `tasklist`, `icacls`.
- runtests: add `-t` (kill whole tree) option to `taskkill` in
  `servers.pm`, syncing it with the other `taskkill` call.
  Follow-up to bc72a78 #14488
- runtests: show warning if Sysinternals `handle` tool is missing.
- runtests: drop Windows XP Home compatibility `tskill` call.
  The call was made on all Windows versions. It's possibly overkill to
  do this, because XP Home is probably rarely used for running curl
  tests these days. In case it's needed, it'd be better to put it under
  an explicit option.
- runtests: show Perl version and path.

Fix/silence fallouts:

- unit2603: fix building with disabled HTTP support.
- unit2604: silence `-Woverlength-strings` warnings in C89 mode.
- test437, test1614: fix to pass with no-IPv6 builds.

Closes #14859
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Give more time for recently enabled TLS tests to complete.

Follow-up to bc72a78 curl#14488
Ref: curl#14849
Closes curl#14851
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
CI:

- GHA/windows: enable OpenSSH server, SysInternals `handle`, `impacket`.
  Skip `impacket` on MSYS2 due to install failure.
  Skip OpenSSH server for old/standalone mingw-w64 (building curl
  without SSH there.)
- GHA/windows: make test tool installs a separate step.
- GHA/cygwin: enable OpenSSH server.
  Skip `impacket`: it's compiling for 7 minutes then breaks.
  Skip `stunnel` due to sluggish test run performance.
  (This update is unrelated to Azure jobs.)
- GHA/linux: migrate Linux jobs from Azure CI.
- GHA/linux: migrate scanbuild job from Azure CI.
- GHA/linux: enable libssh2 in a job. Also enable valgrind.
- CI/windows: enable SSPI in two jobs.
- CI/windows: disable zlib in one more job.
- CI/windows: improve `if` condition checking GnuTLS.
- CI/windows: ignore SFTP/SCP tests as necessary.
  - universally ignore SCP tests, they fail everywhere.
  - ignore test 612.
  - ignore test 613 616 618 with MSYS2 mingw-w64.
  - ignore test 614 with libssh.
  - ignore all SFTP with MSYS2 native.
  - ignore all SFTP with vcpkg with `libssh2[core,zlib]`.
  - ignore a couple of SFTP tests with MSYS2 mingw-w64.
  (This matches settings on Azure CI.)
- GHA/windows: ignore failing 1451 'Basic SMB request' test for
  old mingw-w64 7.3.0 (but not for 9.5.0!):
  ```
  2024-09-11 21:45:59,738 ERROR smbComNegotiate: b'NT LM 0.12\x00' is not in list
  [...]
  curl: (7) Could not connect to server
  [...]
  FAIL 1451: 'Basic SMB request' SMB
  ```
  Ref: https://github.com/curl/curl/actions/runs/10816280746/job/30007130770#step:13:3546
- CI/Azure: delete, now moved to GHA.

sshserver:

- sshserver: fix permissions for SSH host key on Windows, allowing sshd
  to launch.
- sshserver: fix initializing config paths with Cygwin/MSYS2 sshd.
- sshserver: fix initializing config paths in parallel builds.
- sshserver: delete redundant `DenyUsers`. This also opens the way
  to allow multiple usernames.
- sshserver: fix `AllowUsers` for GHA/windows, by allowing the
  domainless username again.
  Follow-up to 3ee7c67 curl#5721
- sshserver: fix `Deprecated option` warnings in `sshd_config`:
  ```
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 7: Deprecated option AuthorizedKeysFile2
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 25: Deprecated option KeyRegenerationInterval
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 35: Deprecated option RhostsRSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 36: Deprecated option RSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 37: Deprecated option ServerKeyBits
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 41: Deprecated option UseLogin
  ```
- sshserver: fix `Deprecated option` warnings in `ssh_config` with
  Cygwin/MSYS2.
- sshserver: fix dumping config files due to the filenames missing their
  full paths.
- sshserver: add workaround to make `logmsg` messages visible.
  Before this patch they only went to a file and never shown.

runtests:

- runtests: log details when these Windows commands are called:
  `handle`, `taskkill`, `tasklist`.
- runtests: add documentation links to Windows tools:
  `handle`, `taskkill`, `tasklist`, `icacls`.
- runtests: add `-t` (kill whole tree) option to `taskkill` in
  `servers.pm`, syncing it with the other `taskkill` call.
  Follow-up to bc72a78 curl#14488
- runtests: show warning if Sysinternals `handle` tool is missing.
- runtests: drop Windows XP Home compatibility `tskill` call.
  The call was made on all Windows versions. It's possibly overkill to
  do this, because XP Home is probably rarely used for running curl
  tests these days. In case it's needed, it'd be better to put it under
  an explicit option.
- runtests: show Perl version and path.

Fix/silence fallouts:

- unit2603: fix building with disabled HTTP support.
- unit2604: silence `-Woverlength-strings` warnings in C89 mode.
- test437, test1614: fix to pass with no-IPv6 builds.

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

Labels

CI Continuous Integration tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants