rocksdb/db_stress_tool
Cheng Chang 0a77617820 Disable O_DIRECT in stress test when db directory does not support direct IO (#6727)
Summary:
In crash test, the db directory might be set to /dev/shm or /tmp, in certain environments such as internal testing infrastructure, neither of these directories support direct IO, so direct IO is never enabled in crash test.

This PR sets up SyncPoints in direct IO related code paths to disable O_DIRECT flag in calls to `open`, so the direct IO code paths will be executed, all direct IO related assertions will be checked, but no real direct IO request will be issued to the file system.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6727

Test Plan:
export CRASH_TEST_EXT_ARGS="--use_direct_reads=1 --mmap_read=0"
make -j24 crash_test

Reviewed By: zhichao-cao

Differential Revision: D21139250

Pulled By: cheng-chang

fbshipit-source-id: db9adfe78d91aa4759835b1af91c5db7b27b62ee
2020-04-25 00:01:03 -07:00
..
batched_ops_stress.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
cf_consistency_stress.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
CMakeLists.txt Add an option to the CMake build to disable building shared libraries (#6122) 2019-12-10 15:20:50 -08:00
db_stress_common.cc Fault injection in db_stress (#6538) 2020-04-10 17:21:26 -07:00
db_stress_common.h Disable O_DIRECT in stress test when db directory does not support direct IO (#6727) 2020-04-25 00:01:03 -07:00
db_stress_driver.cc Add env_fault_injection argument to db_stress (#6687) 2020-04-16 11:13:44 -07:00
db_stress_driver.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_stress_env_wrapper.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_stress_gflags.cc Disable O_DIRECT in stress test when db directory does not support direct IO (#6727) 2020-04-25 00:01:03 -07:00
db_stress_listener.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_stress_shared_state.cc Silence false alarms in db_stress fault injection (#6741) 2020-04-24 13:06:12 -07:00
db_stress_shared_state.h Silence false alarms in db_stress fault injection (#6741) 2020-04-24 13:06:12 -07:00
db_stress_stat.h Remove a printf from db_stress that's not useful info (#6705) 2020-04-15 12:13:35 -07:00
db_stress_test_base.cc crash_test to cover options.avoid_flush_during_recovery (#6712) 2020-04-16 12:11:45 -07:00
db_stress_test_base.h Remove GetSortedWalFiles/GetCurrentWalFile from the crash test (#6491) 2020-03-18 17:14:15 -07:00
db_stress_tool.cc Disable O_DIRECT in stress test when db directory does not support direct IO (#6727) 2020-04-25 00:01:03 -07:00
db_stress.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
no_batched_ops_stress.cc Silence false alarms in db_stress fault injection (#6741) 2020-04-24 13:06:12 -07:00