Skip to content

Add network namespace isolation, macOS CI, and Windows build support for fwTPM#486

Open
dgarske wants to merge 1 commit intowolfSSL:masterfrom
dgarske:ciports
Open

Add network namespace isolation, macOS CI, and Windows build support for fwTPM#486
dgarske wants to merge 1 commit intowolfSSL:masterfrom
dgarske:ciports

Conversation

@dgarske
Copy link
Copy Markdown
Contributor

@dgarske dgarske commented Apr 17, 2026

Summary

  • Eliminate flaky fwtpm-socket CI failures by running tests in a Linux network namespace (unshare --user --net) with fixed port 2321
  • Add macOS CI: remove *darwin* configure exclusion, fix CMake pthread/rt linking, add fwtpm-macos-socket matrix entry
  • Add Windows build-only support: Winsock2 portability in fwtpm_io.c, signal() fallback in fwtpm_main.c, ws2_32 linking, CMake CI entry

@dgarske dgarske self-assigned this Apr 17, 2026
Copilot AI review requested due to automatic review settings April 17, 2026 20:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR improves fwTPM portability and CI robustness by isolating socket-based tests in Linux network namespaces, expanding CI coverage to macOS, and adding Windows build-only support (Winsock + CMake linking).

Changes:

  • Run fwTPM socket tests under unshare --user --net and introduce a “fixed port” mode for CI stability.
  • Enable macOS CI for socket transport and adjust build/link flags for CMake.
  • Add Windows build-only support via Winsock initialization/cleanup, signal handling fallback, and ws2_32 linking.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/fwtpm_check.sh Adds “fixed port” mode vs. random port selection for fwTPM socket tests.
src/fwtpm/fwtpm_main.c Uses signal() on Windows and sigaction on POSIX for shutdown handling.
src/fwtpm/fwtpm_io.c Introduces Winsock send/recv paths, WSAStartup/WSACleanup, and closes via CloseSocket.
configure.ac Enables fwTPM default on macOS and blocks TIS/SHM transport on Windows with a clear error.
CMakeLists.txt Adjusts link libraries for UNIX/macOS and adds ws2_32 for Windows.
.github/workflows/sanitizer.yml Runs sanitizer job under network namespace and forces fixed port mode.
.github/workflows/fwtpm-test.yml Adds macOS test matrix entry; uses namespace isolation when available; tweaks package install/ldconfig behavior.
.github/workflows/cmake-build.yml Adds a Windows CMake build matrix entry and gates Linux-only package installation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/fwtpm_check.sh Outdated
Comment thread .github/workflows/fwtpm-test.yml
Comment thread src/fwtpm/fwtpm_io.c Outdated
Comment thread src/fwtpm/fwtpm_io.c Outdated
Comment thread CMakeLists.txt
Comment thread .github/workflows/sanitizer.yml
…for fwTPM

Use unshare --user --net to isolate fwtpm_check.sh TCP ports in CI, eliminating flaky port conflicts on shared runners. Add macOS CI with socket transport tests. Add Windows socket portability (Winsock2) and build-only CI via CMake.
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.

2 participants