Skip to content

windows ci speedup#249

Merged
cconlon merged 1 commit into
wolfSSL:mainfrom
aidankeefe2022:windows-ci-speedup
Jun 10, 2026
Merged

windows ci speedup#249
cconlon merged 1 commit into
wolfSSL:mainfrom
aidankeefe2022:windows-ci-speedup

Conversation

@aidankeefe2022

@aidankeefe2022 aidankeefe2022 commented Jun 10, 2026

Copy link
Copy Markdown
Member

The largest gain was from causing the large files that are created for large file tests to be sparse. This means they are not written to disk and read from disk but effectively mocked. Posix does this automatically it took some windows Syscalls to get the same behavior on windows. We also now run the files in parallel thanks to not actually writing the files to disk this is no problem. we now have test run times down from ~5 mins to ~1:30 mins. There is also a change to make sure there are no issues with hard coded ports so we have out tests choose free ports at run time.

@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 #249

No scan targets match the changed files in this PR. Review skipped.

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.

Pull request overview

This PR speeds up Windows CI for wolfCLU by avoiding physical writes for multi‑GB large-file tests (via sparse files on Windows), running Python test modules in parallel, and reducing port-collision issues by selecting ports at runtime.

Changes:

  • Add Windows sparse-file helpers and use them for large-file hash/dgst tests.
  • Replace the serial Windows Python test runner with a parallel per-file runner.
  • Switch server/OCSP tests away from hard-coded ports to OS-assigned free ports.

Reviewed changes

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

Show a summary per file
File Description
tests/wolfclu_test.py Adds find_free_port() plus Windows sparse-file helpers (make_sparse, truncate_sparse).
tests/server/server-test.py Uses find_free_port() for s_server/s_client instead of a hard-coded port.
tests/ocsp/ocsp-test.py Reuses shared find_free_port() helper (removes local implementation).
tests/hash/hash-test.py Uses truncate_sparse() when creating large test files.
tests/dgst/dgst-test.py Uses truncate_sparse() when creating large test files.
tests/run_tests.py Removes the old serial Windows test runner.
tests/run_tests_parallel.py Adds a parallel per-test-file runner (spawns each *-test.py in its own process).
.github/workflows/windows-check.yml Uses the new parallel test runner and increases CI timeout.
Comments suppressed due to low confidence (1)

tests/server/server-test.py:41

  • When s_server fails to bind (e.g., port race due to find_free_port() under parallel runs), the current readiness loop will still wait the full timeout and then report a generic "did not become ready". Checking server.poll() lets the test fail fast with a more actionable error (and avoids hiding immediate bind failures).
            [WOLFSSL_BIN, "s_server", "-port", str(port),
             "-key", os.path.join(CERTS_DIR, "server-key.pem"),
             "-cert", os.path.join(CERTS_DIR, "server-cert.pem"),
             "-noVerify", "-readyFile", readyfile],
            stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,

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

Comment thread tests/wolfclu_test.py
Comment thread tests/run_tests_parallel.py Outdated
Comment thread tests/ocsp/ocsp-test.py
@cconlon
cconlon merged commit f2e768d into wolfSSL:main Jun 10, 2026
17 checks passed
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