Skip to content

ci: load the tls kernel module before running tests - #79

Merged
cpu merged 1 commit into
rustls:mainfrom
ArniDagur:ci-modprobe-tls
Dec 3, 2026
Merged

cpu merged 1 commit into
rustls:mainfrom
ArniDagur:ci-modprobe-tls

Conversation

@ArniDagur

Copy link
Copy Markdown
Contributor

Fixes the UlpError(NotFound) (ENOENT) CI test failure seen in the merge queue for #78 (https://github.com/rustls/ktls/actions/runs/47003012249/job/143900494986).

On Ubuntu's linux-azure kernel, CONFIG_TLS=m is built as a loadable module. In Linux (net/ipv4/tcp_ulp.c), __tcp_ulp_find_autoload() only calls request_module("tcp-ulp-tls") when the caller has CAP_NET_ADMIN, which the unprivileged GitHub Actions runner user lacks. On runners where nothing else pulled in tls at boot (e.g. VMs without Mellanox mlx5_core, whose CONFIG_MLX5_EN_TLS=y depends on tls), setsockopt(SOL_TCP, TCP_ULP, "tls") fails with ENOENT.

Explicitly run sudo modprobe tls before running the tests.

On Ubuntu's linux-azure kernel, CONFIG_TLS=m is built as a loadable
module. The kernel only auto-loads tcp-ulp-tls on setsockopt(TCP_ULP)
when the caller has CAP_NET_ADMIN, which the unprivileged GitHub
Actions runner user lacks. If nothing else loaded the module at boot
(e.g. on runners without Mellanox mlx5_core), setsockopt fails with
ENOENT (UlpError(NotFound)).

Run `sudo modprobe tls` explicitly before executing the test suite.

@cpu cpu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@cpu
cpu added this pull request to the merge queue Dec 3, 2026
Merged via the queue into rustls:main with commit c0d089c Dec 3, 2026
4 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