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


##########
src/tests/containerizer/cgroups2_tests.cpp:
##########
@@ -59,6 +63,30 @@ TEST_F(Cgroups2Test, ROOT_CGROUPS2_AvailableSubsystems)
   }
 }
 
+
+TEST_F(Cgroups2Test, ROOT_CGROUPS2_DeviceController)
+{
+  namespace devices = cgroups2::devices;
+
+  // Deny all access.
+  devices::Entry entry = devices::Entry::parse("a *:* rwm").get();
+
+  EXPECT_SOME(devices::configure(cgroups2::ROOT_CGROUP, {}, {entry}));
+  Try<vector<uint32_t>> attached = ebpf::cgroups2::attached(
+      cgroups2::ROOT_CGROUP);
+
+  ASSERT_SOME(attached);
+  EXPECT_EQ(1, (int) attached->size());

Review Comment:
   The error message it produces is not very telling, but yeah the cast is 
required. I'll use `1u` instead :+1:



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