Skip to content

fix: avoid rlimit side effect in docs example#2016

Open
immanuwell wants to merge 1 commit into
cilium:mainfrom
immanuwell:fix-docs-rlimit-init
Open

fix: avoid rlimit side effect in docs example#2016
immanuwell wants to merge 1 commit into
cilium:mainfrom
immanuwell:fix-docs-rlimit-init

Conversation

@immanuwell
Copy link
Copy Markdown
Contributor

@immanuwell immanuwell commented May 24, 2026

What

Move the rlimit docs snippet out of package init. Importing docs/examples should not try to raise RLIMIT_MEMLOCK.

Repro

On an unprivileged shell:

go test ./... -run TestDoesNotExist

Before: docs/examples panics in init with failed to set memlock rlimit: operation not permitted.

After: passes, no test is selected. Small papercut

Checks

go test ./docs/examples -run TestDoesNotExist
go test ./... -run TestDoesNotExist
go build ./...
go test -c -o /dev/null ./...

Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell immanuwell requested a review from ti-mo as a code owner May 24, 2026 04:24
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.

1 participant