You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2024/07/27 02:40:44 UTC
(mesos) 02/02: [style] Add newlines for readability.
This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 3aab3999d0d6a8da8fc23d2b5827e7d5986d9b1b
Author: Jason Zhou <ja...@gmail.com>
AuthorDate: Fri Jul 26 22:39:41 2024 -0400
[style] Add newlines for readability.
---
src/tests/device_manager_tests.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tests/device_manager_tests.cpp b/src/tests/device_manager_tests.cpp
index 3778eeff8..4f925f3ff 100644
--- a/src/tests/device_manager_tests.cpp
+++ b/src/tests/device_manager_tests.cpp
@@ -436,6 +436,7 @@ TEST(DeviceManagerCgroupDeviceAccessTest, IsAccessGrantedTest)
EXPECT_TRUE(
cgroup_device_access.is_access_granted(*devices::Entry::parse("c *:3 w"))
);
+
// Character devices with major number 5 can do write only:
cgroup_device_access = CHECK_NOTERROR(
DeviceManager::CgroupDeviceAccess::create(
@@ -447,14 +448,15 @@ TEST(DeviceManagerCgroupDeviceAccessTest, IsAccessGrantedTest)
EXPECT_TRUE(
cgroup_device_access.is_access_granted(*devices::Entry::parse("c 5:2 w"))
);
+
// All devices will match the catch-all and can perform all operations:
cgroup_device_access = CHECK_NOTERROR(
DeviceManager::CgroupDeviceAccess::create(
{*devices::Entry::parse("a *:* rwm")}, {}
));
-
EXPECT_TRUE(
cgroup_device_access.is_access_granted(*devices::Entry::parse("c 6:2 w")));
+
// Deny all accesses to character device with major and numbers 1:3.
cgroup_device_access = CHECK_NOTERROR(
DeviceManager::CgroupDeviceAccess::create(