Changeset View
Changeset View
Standalone View
Standalone View
src/test/util_tests.cpp
Show First 20 Lines • Show All 1,273 Lines • ▼ Show 20 Lines | while (true) { | ||||
case UnlockCommand: | case UnlockCommand: | ||||
ReleaseDirectoryLocks(); | ReleaseDirectoryLocks(); | ||||
ch = true; // Always succeeds | ch = true; // Always succeeds | ||||
rv = write(fd, &ch, 1); | rv = write(fd, &ch, 1); | ||||
assert(rv == 1); | assert(rv == 1); | ||||
break; | break; | ||||
case ExitCommand: | case ExitCommand: | ||||
close(fd); | close(fd); | ||||
exit(0); | // As an alternative to exit() which runs the exit handlers | ||||
// (which seem to be flakey with Boost test suite with JUNIT | |||||
// logging in a forked process), just vanish this process as | |||||
// fast as possible. | |||||
std::quick_exit(0); | |||||
default: | default: | ||||
assert(0); | assert(0); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
BOOST_AUTO_TEST_CASE(test_LockDirectory) { | BOOST_AUTO_TEST_CASE(test_LockDirectory) { | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |