----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/75096/#review226698 -----------------------------------------------------------
src/linux/cgroups.hpp Lines 937 (patched) <https://reviews.apache.org/r/75096/#comment314959> s/is_improper_subset_of/encompasses/ (and flip it) s/entry_to_be_matched_with/other/ src/linux/cgroups.hpp Lines 937-939 (patched) <https://reviews.apache.org/r/75096/#comment314960> Mind adding one-liner docs on these? src/linux/cgroups.hpp Lines 938 (patched) <https://reviews.apache.org/r/75096/#comment314961> Insteaed of Entry::no_accesses_specified() -> Entry::Access::none() src/linux/cgroups.hpp Lines 939 (patched) <https://reviews.apache.org/r/75096/#comment314962> Instead of Entry::has_wildcard(), how about Entry::Selector::has_wildcard() src/linux/cgroups.cpp Lines 2923-2932 (patched) <https://reviews.apache.org/r/75096/#comment314963> this could be simplified with Option's == operator? encompasses = major.isNone() || major == other.major; src/tests/containerizer/cgroups_tests.cpp Line 1409 (original), 1409 (patched) <https://reviews.apache.org/r/75096/#comment314964> nit: extra newline src/tests/containerizer/cgroups_tests.cpp Lines 1410 (patched) <https://reviews.apache.org/r/75096/#comment314965> nit: brace on next line src/tests/containerizer/cgroups_tests.cpp Lines 1411-1412 (patched) <https://reviews.apache.org/r/75096/#comment314966> `` cgroups::devices::Entry> subset = CHECK_NOTERROR( cgroups::devices::Entry::parse("c 3:1 rwm")); ``` src/tests/containerizer/cgroups_tests.cpp Lines 1416 (patched) <https://reviews.apache.org/r/75096/#comment314958> use `subset->...` rather than `(*subset).` - Benjamin Mahler On July 18, 2024, 8:19 p.m., Jason Zhou wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/75096/ > ----------------------------------------------------------- > > (Updated July 18, 2024, 8:19 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > Currently, the Entry class does not have readable helper functions for > determining whether the device accesses represented by one Entry would > be a subset of that of another. In addition, we want more readable ways > to determine if a device has wildcards present and if it has any > accesses specified. > > These additions will streamline the logic in the DeviceManager > DeviceManager, which will heavily utilize the Entry class, improving > code readability. > > > Diffs > ----- > > src/linux/cgroups.hpp eaa4cdf9fd0fe6dd848a6626c4c42ccab070e232 > src/linux/cgroups.cpp c4289493315eb4765192f90099c5b632c6d7f9d1 > src/tests/containerizer/cgroups_tests.cpp > 0f4967ff1754fcf54e9363e2bc62c7bc44ac4a56 > > > Diff: https://reviews.apache.org/r/75096/diff/1/ > > > Testing > ------- > > Tests added for `is_improper_subset_of`, tests passed. > > > Thanks, > > Jason Zhou > >
