Repository navigation
Run testssl.sh in WSL 2 with Ubuntu 24.04 on Windows CI - #542
Merged
Merged
Conversation
On the windows-2025 runners, every BCP-003-01 test that runs testssl.sh reports "Test Disabled", so the suite fails, although the job passes. Those runners install the Ubuntu 18.04 distribution as WSL 2, whose NAT network reaches the Node at the host IP address through Windows Firewall, which drops the connections. The windows-2022 runners have only the inbox WSL, which installs the distribution as WSL 1, sharing the host network, so the suite passes there. Ubuntu 18.04 is long out of support, and WSL 1 is deprecated. Update WSL, which installs the WSL 2 kernel on the windows-2022 runners, and import the Ubuntu 24.04 WSL root filesystem from Canonical as a WSL 2 distribution. That root filesystem has none of the DNS lookup tools that testssl.sh requires at startup, so install bind9-host. Add a Windows Firewall rule that allows inbound connections to the Node's port. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
On both the windows-2022 and windows-2025 runners, netsh reports "No more data is available." and the adapter stays up, so the AMWA tests already run with it enabled. The host IP address comes from the default route, not from the list of adapters. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
garethsb
force-pushed
the
bugfix/ci-windows-wsl2
branch
from
November 17, 2026 23:30
79e1163 to
8f9f726
Compare
The windows-2025 runners sometimes lose communication with GitHub while the WSL 2 VM runs, both in the "install wsl" step and in the AMWA test suite. The cause is unknown. By default, the WSL 2 VM may use half the memory and all the processors, which the Node, the Registry and the testing tool also need, so limit it to 2 GB and 2 processors. Run wsl --update only on the windows-2022 runners, which have the inbox WSL. The windows-2025 runners already have a current WSL, and updating it reinstalls the WSL package during the job. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
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.
On the windows-2025 runners, every BCP-003-01 test that runs testssl.sh reports "Test Disabled" ("8 tests disabled, expected max 0"), so the suite fails, although the job passes. This started with the windows-2025 jobs added in #507; the windows-2022 job still passes.
The windows-2025 runners install the Ubuntu 18.04 distribution as WSL 2. Its NAT network reaches the Node at the host IP address through Windows Firewall, which drops the connections. The windows-2022 runners have only the inbox WSL, which installs it as WSL 1, sharing the host network.
Ubuntu 18.04 is long out of support and WSL 1 is deprecated, so this PR:
wsl --updateon the windows-2022 runners, to install the WSL 2 kernelbind9-hostin it, because testssl.sh requires a DNS lookup tool at startup, even when it is given the IP addressA probe on both runner images showed that connections from WSL 2 to the host IP address time out until that firewall rule is added. Mirrored networking mode does not help: it is unsupported on windows-2022, and on windows-2025 the host IP address is unreachable in that mode.
With this PR, BCP-003-01 passes on every Windows job. On the windows-2025 jobs, the AMWA test suite step also takes about 19 minutes instead of about 36, because each testssl.sh run no longer waits for the connection to time out.
The windows-2025 runners occasionally lose communication with GitHub while the WSL 2 VM is running, both before and after this PR. The cause is unknown. Limiting the WSL 2 VM, and not updating the current WSL that the windows-2025 runners already have, reduce what WSL does during the job.
It also removes the step that disables the vEthernet (nat) adapter. On both images netsh reports "No more data is available." and the adapter stays up, so the tests already run with it enabled.
Co-authored-by: Gareth's 🤖 buddy