Skip to content

test: de-parallelize TestRunQuiet so it stops GC'ing the shared image#4998

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
mayur-tolexo:fix/run-image-tests-pull-setup
Jun 25, 2026
Merged

test: de-parallelize TestRunQuiet so it stops GC'ing the shared image#4998
AkihiroSuda merged 1 commit into
containerd:mainfrom
mayur-tolexo:fix/run-image-tests-pull-setup

Conversation

@mayur-tolexo

@mayur-tolexo mayur-tolexo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

TestRunUmask was failing on the almalinux-8 rootless lane with:

nerdctl run --rm --umask 0200 ghcr.io/stargz-containers/alpine:3.13-org sh -c umask
level=fatal msg="content digest sha256:ec14c7992a97fc11425907e908340c6c3d6ff602f5f13d899e6b7027c9b4133a: not found"
--- FAIL: TestRunUmask (0.17s)

The cause is TestRunQuiet: it rmi -fs the shared CommonImage (== AlpineImage) in both setup and cleanup to exercise a fresh pull, but it runs in parallel. containerd's content store is global across namespaces, so that removal GCs the Alpine layer blobs out from under another test that is mid-run with --pull missing — the manifest is still present so it skips the fetch, then cannot find the blob.

Rather than pull the image in every consumer's setup, this marks TestRunQuiet NoParallel so it no longer races. That fixes it at the source for all tests sharing the image.

Comment thread cmd/nerdctl/container/container_run_user_linux_test.go Outdated
@mayur-tolexo mayur-tolexo marked this pull request as draft June 24, 2026 04:47
TestRunQuiet force-removes the shared CommonImage (== AlpineImage) in its
setup and cleanup to exercise a fresh pull, but it ran in parallel. The
containerd content store is global across namespaces, so that rmi GCs the
Alpine layer blobs out from under concurrent tests mid-run, which then fail
with "content digest <sha> not found" (observed in TestRunUmask).

Mark TestRunQuiet NoParallel so it no longer races other tests using the
shared image, instead of pulling the image in each consumer's setup.

Signed-off-by: Mayur Das <mayur.das@neevcloud.com>
@mayur-tolexo mayur-tolexo force-pushed the fix/run-image-tests-pull-setup branch from af83de3 to 490d284 Compare June 25, 2026 06:42
@mayur-tolexo mayur-tolexo changed the title test: pull image in setup for TestRunUmask and TestRunUserGID test: de-parallelize TestRunQuiet so it stops GC'ing the shared image Jun 25, 2026
@mayur-tolexo mayur-tolexo marked this pull request as ready for review June 25, 2026 07:21
@AkihiroSuda AkihiroSuda added this to the v2.3.4 milestone Jun 25, 2026

@AkihiroSuda AkihiroSuda 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

@AkihiroSuda AkihiroSuda merged commit 9a04285 into containerd:main Jun 25, 2026
46 of 52 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