Skip to content

test: refactor container_run_cgroup_linux_test.go to use Tigron#5070

Open
papidb wants to merge 1 commit into
containerd:mainfrom
papidb:test/refactor-container-run-cgroup-linux-test-to-tigron
Open

test: refactor container_run_cgroup_linux_test.go to use Tigron#5070
papidb wants to merge 1 commit into
containerd:mainfrom
papidb:test/refactor-container-run-cgroup-linux-test-to-tigron

Conversation

@papidb

@papidb papidb commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Rewrite tests in container_cp_linux_test.go from testutil.NewBase to nerdtest.Setup (Tigron framework). Part of #4613.

@papidb
papidb force-pushed the test/refactor-container-run-cgroup-linux-test-to-tigron branch from 27aa011 to 1d639f9 Compare July 15, 2026 08:10
@AkihiroSuda AkihiroSuda added this to the v2.4.0 milestone Jul 16, 2026
Comment thread cmd/nerdctl/container/container_run_cgroup_linux_test.go
@AkihiroSuda

Copy link
Copy Markdown
Member

Marking the PR as a draft as the CI is failing. Please click Ready for review when ready.

@AkihiroSuda
AkihiroSuda marked this pull request as draft July 17, 2026 10:41
@papidb
papidb marked this pull request as ready for review July 18, 2026 10:58
addr := defaults.DefaultAddress
if rootlessutil.IsRootless() {
xdr, err := rootlessutil.XDGRuntimeDir()
if err != nil {

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.

You can assert nil error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair, will implement.

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.

Please squash the commits

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After I attend to the rootless comments, I will then squash the commits

if err != nil {
xdr = fmt.Sprintf("/run/user/%d", os.Geteuid())
}
pidFile := filepath.Join(xdr, "containerd-rootless", "child_pid")

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.

use

func RootlessKitChildPid(stateDir string) (int, error) {

cid := strings.TrimSpace(stdout)
addr := defaults.DefaultAddress
if rootlessutil.IsRootless() {
xdr, err := rootlessutil.XDGRuntimeDir()

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.

use

func RootlessKitStateDir() (string, error) {

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

see the comments

Signed-off-by: Daniel Benjamin <benjamindaniel706@gmail.com>
@papidb
papidb force-pushed the test/refactor-container-run-cgroup-linux-test-to-tigron branch from e9cba40 to 19b7895 Compare July 19, 2026 00:41
@papidb
papidb requested a review from AkihiroSuda July 19, 2026 00:42
if cgroups.Mode() != cgroups.Unified {
t.Skip("test requires cgroup v2")
}
testutil.DockerIncompatible(t) // Docker lacks --cgroup-conf

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.

Please retain the comment

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