Skip to content

tests: guard WOLFSSH_LOCAL calls on Windows - #1303

Closed
ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:winvs-local-symbol-guards
Closed

ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:winvs-local-symbol-guards

Conversation

@ejohnstown

@ejohnstown ejohnstown commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The winvs test projects link the wolfssh.dll import library, which does not carry WOLFSSH_LOCAL symbols. Three tests/api.c tests call library internals directly and relied on the autotools build linking libwolfssh_test.la; they now sit behind !defined(USE_WINDOWS_API) with empty stubs, the same guard test_wolfSSH_SCP_SendSymlinkReject() already uses.

  • test_wolfSSH_SCP_SendRecursiveEntry(): the unresolved wsScpSendCallback failing the nightly-QNX-tests DLL Release link.
  • The OsshCert_* tests and test_wolfSSH_KeyboardInteractive_emptyPrompt(): same pattern, latent until a winvs config enables WOLFSSH_OSSH_CERTS or keyboard-interactive.

The winvs test projects link the wolfssh.dll import library, which does
not carry WOLFSSH_LOCAL symbols, so api.c tests that call library
internals compile only where the autotools build links them in through
libwolfssh_test.la. Stubs keep the call list in wolfSSH_ApiTest() flat.

- test_wolfSSH_SCP_SendRecursiveEntry() drops out on USE_WINDOWS_API,
  matching its symlink sibling; this was the unresolved
  wsScpSendCallback in the nightly-QNX-tests DLL Release link.
- The OsshCert_* tests, which drive OsshCertParse() and friends
  directly, take the same guard.
- test_wolfSSH_KeyboardInteractive_emptyPrompt() takes it for
  SendUserAuthKeyboardRequest().
Copilot AI balanced review requested due to automatic review settings October 8, 2026 00:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The guards consistently prevent unavailable private-symbol references while preserving existing test registration.

0 open findings

What changed in this PR

Guards tests that call private WOLFSSH_LOCAL symbols from Windows DLL builds, preventing unresolved linker symbols.

Changes:

  • Disables affected SCP, OpenSSH certificate, and keyboard-interactive tests under USE_WINDOWS_API.
  • Provides empty test stubs so the test runner remains unchanged.
File Description
tests/​api.c Adds Windows guards and fallback stubs for tests calling private symbols.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #1303

Scan targets checked: wolfssh-bugs
Coverage: 1 of 1 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@ejohnstown

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1316, which now carries all three guards using WOLFSSH_TEST_INTERNAL instead of !USE_WINDOWS_API.

@ejohnstown ejohnstown closed this Oct 13, 2026
@ejohnstown
ejohnstown deleted the winvs-local-symbol-guards branch October 13, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants