MCPcopy Create free account
hub / github.com/apache/mesos / disable

Method disable

src/tests/environment.cpp:195–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 }
194
195 bool disable(const ::testing::TestInfo* test) const override
196 {
197 if (matches(test, "CGROUPS_") || matches(test, "Cgroups")) {
198#ifdef __linux__
199 Result<string> user = os::user();
200 CHECK_SOME(user);
201
202 if (matches(test, "NOHIERARCHY_")) {
203 return user.get() != "root" ||
204 !cgroups::enabled() ||
205 error.isSome();
206 }
207
208 return user.get() != "root" || !cgroups::enabled();
209#else
210 return true;
211#endif // __linux__
212 }
213
214 return false;
215 }
216
217private:
218 Option<Error> error;

Callers

nothing calls this directly

Calls 5

matchesFunction · 0.85
userFunction · 0.50
enabledFunction · 0.50
getMethod · 0.45
isSomeMethod · 0.45

Tested by

no test coverage detected