Skip to content

test: skip overlay tests when overlayfs mounts are unavailable#6799

Open
immanuwell wants to merge 1 commit into
moby:masterfrom
immanuwell:test/skip-overlay-tests-without-mount-perms
Open

test: skip overlay tests when overlayfs mounts are unavailable#6799
immanuwell wants to merge 1 commit into
moby:masterfrom
immanuwell:test/skip-overlay-tests-without-mount-perms

Conversation

@immanuwell
Copy link
Copy Markdown

What

go test ./util/... can blow up for non-root users because util/overlay hard fails when overlayfs mounts are blocked.

This adds a tiny one-shot probe and skips those tests when the host cant do the mount. If overlay mounts work, test behavior stays the same.

Repro

go test -v ./util/overlay -run TestSimpleDiff -count=1

Before, it dies with operation not permitted.
After this patch it skips cleanly, which is way less noisy.

Related-ish: #4667 #879

Signed-off-by: immanuwell <pchpr.00@list.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants