Fix broken user_settings.h flip in windows-check workflow#1030
Draft
yosuke-wolfssl wants to merge 3 commits into
Draft
Fix broken user_settings.h flip in windows-check workflow#1030yosuke-wolfssl wants to merge 3 commits into
yosuke-wolfssl wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Windows CI (windows-check) build configuration so that ide/winvs/user_settings.h is actually modified in-place (enabling the #if 0 blocks for X509 + SSHD) before being copied into the wolfSSL build tree, restoring expected wolfsshd logging behavior in Release builds.
Changes:
- Replace the ineffective PowerShell “replace” pipeline (stdout-only) with an in-place
sed -iedit. - Reorder the operation so the flipped
user_settings.his then copied intowolfssl/IDE/WIN/user_settings.h. - Standardize the step to the same bash/sed approach already used successfully in
windows-sftp.yml.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e9131c8 to
75c66e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repairs Windows CI coverage that was silently broken, plus the two latent
test issues that surfaced once it started working. Three commits:
.github/workflows/windows-check.yml— fix the brokenuser_settings.hfeature flip in both the
buildandasan-testsjobs.tests/api.c— initialize Winsock inapi-test.tests/api.c— exclude the threaded echoserver tests fromapi-testonWindows.
Commits 2 and 3 are fallout the flip fix exposed: with the features finally
compiled in,
api-testran code on Windows CI that had never run there before.1. Fix the broken user_settings.h flip
The old step
pipes the modified text to the console and never writes the file back (no
Set-Content/Out-File). Both#if 0blocks inide/winvs/user_settings.h(X509 and SSHD) therefore stayed off, so the Windows build silently compiled the
library and app without
WOLFSSH_SSHD,WOLFSSH_CERTS,WOLFSSH_SFTP, orX509 — while staying green. The job stopped covering every feature it was named
for.
Replaced with the write-in-place pattern already proven in
windows-sftp.yml:ide/winvs/user_settings.hhas exactly two#if 0blocks and nothing else uses#if 0, so the anchored substitution flips precisely the two intended blocks.The
asan-testsjob (added tomasterafter this branch first forked) carriedan identical broken
get-contentflip, so the same fix is applied there.2. Initialize Winsock in api-test
With the flip repaired,
api-testcompiled in the SCP/SFTP rekey tests for thefirst time. The first one aborted at setup:
These tests resolve the loopback address via
gethostbyname()inbuild_addr(). On Windowsgethostbyname()returns NULL untilWSAStartup()has run, and
api-test's entry point calledwolfSSH_Init()without firstcalling
WSTARTTCP()(unliketestsuite.candkex.c). AddedWSTARTTCP()before
wolfSSH_Init(). The macro is empty off Windows.3. Exclude threaded echoserver tests on Windows
Past the Winsock fix, the SCP rekey test then failed with
ctx => NULLat thepost-connect assertion. The threaded echoserver tests synchronize with the
server via
SignalTcpReady/WaitTcpReady, which are POSIX-only and compile tono-ops on MSVC (no
_POSIX_THREADS). Without the readiness handshake the servernever reports its port and the client connects before the listener is up, so the
client context comes back NULL.
The block guards already excluded
SINGLE_THREADEDandWOLFSSH_ZEPHYR— theother cases where these primitives are no-ops — but omitted
USE_WINDOWS_API,an inconsistency that was harmless only because
api-testnever ran on WindowsCI. Added
!defined(USE_WINDOWS_API)to both block guards so the tests compileto their existing stubs on Windows, matching the guard the same functions
already use on their networked subsections.
Testing
grep -rn "get-content" .github/workflows/returns nothing — no broken flipsremain.
buildandasan-testsjobs green.