Fix broken user_settings.h flip in windows-check workflow#1030
Draft
yosuke-wolfssl wants to merge 1 commit into
Draft
Fix broken user_settings.h flip in windows-check workflow#1030yosuke-wolfssl wants to merge 1 commit into
yosuke-wolfssl wants to merge 1 commit 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.
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.
Description
Fixes the wolfsshd "no log output" problem on the Windows (Visual Studio) CI build.
When wolfsshd is built from the
ide/winvssolution in thewindows-checkworkflow, it emits no log output at all — neither to a
-Elog file nor tostderr, even with
-d. The-Elog file is always 0 bytes.Root cause
wolfSSH_Login the wolfSSH library (src/log.c) only has a realimplementation under
#if defined(DEBUG_WOLFSSH) || defined(WOLFSSH_SSHD);otherwise it compiles to a no-op stub. In Release builds the library project
defines neither directly, so
WOLFSSH_SSHDmust arrive viaWOLFSSL_USER_SETTINGS→wolfssh/settings.h→ide/winvs/user_settings.h,where the SSHD block sits under
#if 0and is meant to be flipped to#if 1by CI.
The flip in
.github/workflows/windows-check.ymlwas broken:This PowerShell pipeline reads the file and prints the modified text to stdout —
it never writes the file back. So
#if 0was never flipped,WOLFSSH_SSHDwas never defined, and the library compiled the no-op
wolfSSH_Logstub →0-byte logs. The preceding
cpalso ran before the (broken) flip, so even thewolfSSL copy was un-flipped.
Fix
Replace the two broken steps with a single bash step that mirrors the already
working
windows-sftp.yml: flip in place withsed -i, then copy to thewolfSSL location.
With the flip persisted, both the wolfSSH library and the wolfsshd app are
compiled with
WOLFSSH_SSHD, restoring the realwolfSSH_Logimplementation.No C source changes are required.
Testing
grep -rn "get-content" .github/workflows/returns nothing.windows-sftp.ymlpattern (write-in-place, then copy).windows-checkworkflow builds Release/x64 with the SSHD/X509 blocks now actually enabled.wolfsshd.exe -D -d -E log.txt -f <conf> -p <port>now writes startup/auth[PID ...]: [SSHD] ...lines tolog.txtinstead of producing a 0-byte file.Scope / notes
user_settings.hdefaults touched.#if 0SSHD block inide/winvs/user_settings.h(the existing intended workflow).