----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/10808/#review20622 -----------------------------------------------------------
src/linux/cgroups.hpp <https://reviews.apache.org/r/10808/#comment42508> why not hashmap? src/linux/cgroups.cpp <https://reviews.apache.org/r/10808/#comment42516> why not just subsystems() instead of internal::subsystems()? src/linux/cgroups.cpp <https://reviews.apache.org/r/10808/#comment42515> if you use hashmap, you can just do .contains() here src/tests/cgroups_tests.cpp <https://reviews.apache.org/r/10808/#comment42517> i think counting the number of cgroups before and after could likely be error prone right? the number could satisfy your expectations while there is a remnant cgroup(s) from the test (e.g., a non mesos-cgroup went away while the test was running) i think you should actually match the cgroups themselves? also, the awkward naming of the variables suggests that there could be better abstractions/functions for what we want. - Vinod Kone On May 6, 2013, 10:36 p.m., Thomas Marshall wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/10808/ > ----------------------------------------------------------- > > (Updated May 6, 2013, 10:36 p.m.) > > > Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler. > > > Description > ------- > > Previously, our the CgroupsAnyHierarchy*Tests were not waiting long enough > for the cgroups created to be cleaned up before the test finished, resulting > in failures when the next test was unable to create cgroups for itself. This > patch attempts to fix that by having CgroupsAnyHierarchy::TearDown wait until > the number of cgroups each subsystem is attached to, documented in > /proc/cgroups, is the same as it was before the test ran. > > > This addresses bug MESOS-449. > https://issues.apache.org/jira/browse/MESOS-449 > > > Diffs > ----- > > src/linux/cgroups.hpp 3e86828 > src/linux/cgroups.cpp cfdc3b2 > src/tests/cgroups_tests.cpp 3734315 > > Diff: https://reviews.apache.org/r/10808/diff/ > > > Testing > ------- > > On both Ubuntu and CentOS, on both clean installs and in the presence of > pre-existing cgroups on the system (such as those left behind by > BalloonFramework failing): > > bin/mesos-tests.sh --gtest_break_on_failure --gtest_repeat=1000 > --gtest_filter=*CgroupsAny* > > > Thanks, > > Thomas Marshall > >
