[
https://issues.apache.org/jira/browse/MESOS-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yan Xu closed MESOS-1083.
-------------------------
Resolution: Won't Fix
OK it could have been implemented [this
way|https://github.com/apache/mesos/blob/4c3217829fba7b19f5188148c505dde76c8dc539/src/tests/mesos.cpp#L287]
but the code is probably fine as is because in SetUpTestCase() and
TearDownTestCase() if the path given to cgroups::clean() is the parent of the
hierarchies it still recursively deletes all them if they are already properly
destroyed.
The error I saw was because my {{make check}} was running on stale
{{/tmp/mesos_test_cgroup}} directory left by pre-0.18 cgroups/isolator tests.
> Error in CgroupsTest::SetUpTestCase() and TearDownTestCase()
> ------------------------------------------------------------
>
> Key: MESOS-1083
> URL: https://issues.apache.org/jira/browse/MESOS-1083
> Project: Mesos
> Issue Type: Bug
> Components: test
> Affects Versions: 0.18.0
> Environment: Linux
> Reporter: Yan Xu
> Assignee: Yan Xu
> Fix For: 0.19.0
>
>
> The
> [SetUpTestCase()|https://github.com/apache/mesos/blob/1a141e684dcb1ddfb0fe13e89dfccca24770e59a/src/tests/cgroups_tests.cpp#L64]
> and
> [TearDownTestCase()|https://github.com/apache/mesos/blob/1a141e684dcb1ddfb0fe13e89dfccca24770e59a/src/tests/cgroups_tests.cpp#L69]
> methods in CgroupsTest weren't updated for the contrainerizer change, after
> which {{TEST_CGROUPS_HIERARCHY}} is no longer a hierarchy but the parent dir
> of multiple hierarchies. ({{TEST_CGROUPS_HIERARCHY}} should probably be more
> aptly named {{TEST_CGROUPS_BASE_HIERARCHY}} or
> {{TEST_CGROUPS_HIERARCHY_BASE}})
> Therefore {{cgroups::cleanup(TEST_CGROUPS_HIERARCHY)}} no longer makes sense
> and it causes the following error:
> {code}
> [ OK ] CgroupsAnyHierarchyWithCpuMemoryFreezerTest.ROOT_CGROUPS_Freeze
> (13 ms)
> // Tearing down CgroupsAnyHierarchyWithCpuMemoryFreezerTest
> ../../src/tests/cgroups_tests.cpp:69: Failure
> (cgroups::cleanup(TEST_CGROUPS_HIERARCHY)).failure(): Operation not permitted
> {code}
> The error "Operation not permitted" is due to cleanup() being confused when
> the argument isn't actually a hierarchy.
--
This message was sent by Atlassian JIRA
(v6.2#6252)