You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by "DevinLeamy (via GitHub)" <gi...@apache.org> on 2024/03/22 20:24:17 UTC
[PR] [cgroups2] Addressing comments from #532 [mesos]
DevinLeamy opened a new pull request, #533:
URL: https://github.com/apache/mesos/pull/533
Commit 60283dfed06a5fff4ecedaba4e67674dc01aa16e was merged before the PR comments were addressed. This commit address the comments.
- We remove `cgroups2::move_process` in favor of `cgroups2::assign`, which is consistent with the `cgroups` v1 function naming.
- We remove a duplicate test for assigning processes to cgroups.
- We remove a string copy when fetching the processes PIDs in a cgroup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cgroups2] Addressing comments from #532 [mesos]
Posted by "bmahler (via GitHub)" <gi...@apache.org>.
bmahler commented on code in PR #533:
URL: https://github.com/apache/mesos/pull/533#discussion_r1536201006
##########
src/tests/containerizer/cgroups2_tests.cpp:
##########
@@ -90,41 +90,7 @@ TEST_F(Cgroups2Test, ROOT_CGROUPS2_AvailableSubsystems)
}
-TEST_F(Cgroups2Test, ROOT_CGROUPS2_AssignProcessToCgroup)
-{
- ASSERT_SOME(cgroups2::create(TEST_CGROUP));
-
- pid_t pid = ::fork();
- ASSERT_NE(-1, pid);
-
- if (pid == 0) {
- // In child process, wait for kill signal.
- while (true) { sleep(1); }
-
- SAFE_EXIT(
- EXIT_FAILURE, "Error, child should be killed before reaching here");
- }
-
- // Add the forked child to the cgroup and check that its 'cgroup' membership
- // is correct.
- EXPECT_SOME(cgroups2::move_process(TEST_CGROUP, pid));
- EXPECT_SOME_EQ(TEST_CGROUP, cgroups2::cgroup(pid));
-
- // Kill the child process.
- ASSERT_NE(-1, ::kill(pid, SIGKILL));
- AWAIT_EXPECT_WTERMSIG_EQ(SIGKILL, process::reap(pid));
-}
-
-
-TEST_F(Cgroups2Test, CGROUPS2_Path)
-{
- EXPECT_EQ("/sys/fs/cgroup/", cgroups2::path(cgroups2::ROOT_CGROUP));
- EXPECT_EQ("/sys/fs/cgroup/foo", cgroups2::path("foo"));
- EXPECT_EQ("/sys/fs/cgroup/foo/bar", cgroups2::path("foo/bar"));
-}
Review Comment:
why remove this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cgroups2] Addressing comments from #532 [mesos]
Posted by "bmahler (via GitHub)" <gi...@apache.org>.
bmahler closed pull request #533: [cgroups2] Addressing comments from #532
URL: https://github.com/apache/mesos/pull/533
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org