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

Function foreach

src/tests/environment.cpp:1189–1206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1187 const testing::TestInfo&)
1188{
1189 foreach (const string& directory, directories) {
1190#ifdef __linux__
1191 // Try to remove any mounts under 'directory'.
1192 if (::geteuid() == 0) {
1193 Try<Nothing> unmount = fs::unmountAll(directory, MNT_DETACH);
1194 if (unmount.isError()) {
1195 LOG(ERROR) << "Failed to umount for directory '" << directory
1196 << "': " << unmount.error();
1197 }
1198 }
1199#endif
1200
1201 Try<Nothing> rmdir = os::rmdir(directory);
1202 if (rmdir.isError()) {
1203 LOG(ERROR) << "Failed to remove '" << directory
1204 << "': " << rmdir.error();
1205 }
1206 }
1207
1208 directories.clear();
1209}

Callers

nothing calls this directly

Calls 4

unmountAllFunction · 0.85
errorMethod · 0.65
rmdirFunction · 0.50
isErrorMethod · 0.45

Tested by

no test coverage detected