leveldb/util
Victor Costan 27dc99fb26 Fix EnvPosix tests on Travis CI.
The previous attempt of having EnvPosix use O_CLOEXEC (close-on-exec()) when opening file descriptors added tests that relied on procfs, which is Linux-specific. These tests failed on macOS. Unfortunately, the test failures were not caught due to a (since fixed) error in our Travis CI configuration.

This CL re-structures the tests to only rely on POSIX features. Since there is no POSIX-compliant way to get a file name/path out of a file descriptor, this CL breaks up the O_CLOEXEC test into multiple tests, where each Env method that creates an FD gets its own test. This is intended to make it easier to find and fix errors in Env implementations.

This CL also fixes the implementation of NewLogger() to use O_CLOEXEC on macOS. The current implementation passes "we" to fopen(), but the macOS standard C library does not implement the "e" flag yet.

PiperOrigin-RevId: 247088953
2019-05-07 14:20:31 -07:00
..
arena_test.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
arena.cc Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
arena.h Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
bloom_test.cc Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
bloom.cc Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
cache_test.cc Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
cache.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
coding_test.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
coding.cc Clean up util/coding.{h,cc}. 2019-05-06 11:23:02 -07:00
coding.h Clean up util/coding.{h,cc}. 2019-05-06 11:23:02 -07:00
comparator.cc Style cleanup. 2019-05-04 17:42:20 -07:00
crc32c_test.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
crc32c.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
crc32c.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
env_posix_test_helper.h Limit the number of read-only files the POSIX Env will have open. 2017-01-04 09:13:20 -08:00
env_posix_test.cc Fix EnvPosix tests on Travis CI. 2019-05-07 14:20:31 -07:00
env_posix.cc Fix EnvPosix tests on Travis CI. 2019-05-07 14:20:31 -07:00
env_test.cc Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
env_windows_test_helper.h Switch corruption_test to use InMemEnv. 2019-03-20 13:57:03 -07:00
env_windows_test.cc Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
env_windows.cc Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
env.cc Style cleanup. 2019-05-04 17:42:20 -07:00
filter_policy.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
hash_test.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
hash.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
hash.h Remove extern from function declarations. 2018-03-12 09:24:48 -07:00
histogram.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
histogram.h Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
logging_test.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
logging.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
logging.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
mutexlock.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
no_destructor_test.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
no_destructor.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
options.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
posix_logger.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
random.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
status_test.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
status.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
testharness.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
testharness.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
testutil.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
testutil.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
windows_logger.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00