Skip to content

Run testssl.sh in WSL 2 with Ubuntu 24.04 on Windows CI - #542

Merged
lo-simon merged 3 commits into
sony:masterfrom
garethsb:bugfix/ci-windows-wsl2
Nov 18, 2026
Merged

lo-simon merged 3 commits into
sony:masterfrom
garethsb:bugfix/ci-windows-wsl2

Conversation

@garethsb

@garethsb garethsb commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • runs wsl --update on the windows-2022 runners, to install the WSL 2 kernel
  • imports the Ubuntu 24.04 WSL root filesystem from Canonical as a WSL 2 distribution
  • installs bind9-host in it, because testssl.sh requires a DNS lookup tool at startup, even when it is given the IP address
  • adds a Windows Firewall rule allowing inbound connections to the Node's port 1080
  • limits the WSL 2 VM to 2 GB of memory and 2 processors

A 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

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
garethsb force-pushed the bugfix/ci-windows-wsl2 branch from 79e1163 to 8f9f726 Compare November 17, 2026 23:30
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>

@lo-simon lo-simon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@lo-simon
lo-simon merged commit c49ea65 into sony:master Nov 18, 2026
12 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.

2 participants