Skip to content

libct/cg: add test for remove a non-existent dir in a ro mount point#4526

Merged
kolyshkin merged 1 commit into
opencontainers:mainfrom
lifubang:test-cgroup-removepath
Nov 15, 2024
Merged

libct/cg: add test for remove a non-existent dir in a ro mount point#4526
kolyshkin merged 1 commit into
opencontainers:mainfrom
lifubang:test-cgroup-removepath

Conversation

@lifubang

Copy link
Copy Markdown
Member

This is a unit test for the similar issue of #4518.

Comment thread libcontainer/cgroups/utils_test.go Outdated
Comment thread libcontainer/cgroups/utils_test.go Outdated
Comment thread libcontainer/cgroups/utils_test.go Outdated
@lifubang lifubang force-pushed the test-cgroup-removepath branch from 35800c8 to 11a33c5 Compare November 14, 2024 10:49
@lifubang lifubang changed the title libct/cg: add test for remove a non-exist dir in a ro mount point libct/cg: add test for remove a non-existent dir in a ro mount point Nov 14, 2024
@lifubang lifubang force-pushed the test-cgroup-removepath branch from 11a33c5 to cc74fd1 Compare November 14, 2024 10:50
Comment thread libcontainer/cgroups/utils_test.go Outdated
Comment on lines +679 to +681
defer func() {
_ = unix.Unmount(dirTo, 0)
}()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry I overlooked it the first time. This defer should be added after the first mount, not after the second one. Not very important though since the second one shouldn't fail.

@kolyshkin kolyshkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one nit, but overall lgtm

Signed-off-by: lfbzhm <lifubang@acmcoder.com>
@lifubang lifubang force-pushed the test-cgroup-removepath branch from cc74fd1 to 119111a Compare November 14, 2024 23:58

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

LGTM

@kolyshkin kolyshkin merged commit 9b3fe30 into opencontainers:main Nov 15, 2024
@kolyshkin kolyshkin added the backport/1.2-done A PR in main branch which has been backported to release-1.2 label Nov 15, 2024
@kolyshkin

Copy link
Copy Markdown
Contributor

1.2 backport: #4531

@lifubang lifubang deleted the test-cgroup-removepath branch November 15, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci backport/1.2-done A PR in main branch which has been backported to release-1.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants