DevinLeamy commented on code in PR #531:
URL: https://github.com/apache/mesos/pull/531#discussion_r1539865155


##########
src/tests/containerizer/cgroups2_tests.cpp:
##########
@@ -62,6 +62,26 @@ class Cgroups2Test : public TemporaryDirectoryTest
 };
 
 
+// Enables the "cpu" controller in the TEST_CGROUP.
+class Cgroups2CpuTest : public Cgroups2Test
+{
+protected:
+  void SetUp() override
+  {
+    Cgroups2Test::SetUp();
+
+    ASSERT_SOME(cgroups2::create(TEST_CGROUP));
+
+    // Enable "cpu" in the root cgroup, so it's available to the test cgroup.
+    // TODO(dleamy): Disable "cpu" on tear down, if it wasn't initially 
enabled.
+    ASSERT_SOME(cgroups2::controllers::enable(cgroups2::ROOT_CGROUP, {"cpu"}));

Review Comment:
   Happy to introduce a `cgroups2::controllers::disable` before landing 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to