Fix a minor issue with initializing the test path (#8555)

Summary:
The PerThreadDBPath has already specified a slash. It does not need to be specified when initializing the test path.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8555

Reviewed By: ajkr

Differential Revision: D29758399

Pulled By: jay-zhuang

fbshipit-source-id: 6d2b878523e3e8580536e2829cb25489844d9011
main
Drewryz 3 years ago committed by Facebook GitHub Bot
parent c521a9ab2b
commit 3b27725245
  1. 2
      cache/lru_cache_test.cc
  2. 2
      db/blob/db_blob_basic_test.cc
  3. 2
      db/blob/db_blob_compaction_test.cc
  4. 2
      db/blob/db_blob_corruption_test.cc
  5. 3
      db/blob/db_blob_index_test.cc
  6. 4
      db/db_basic_test.cc
  7. 4
      db/db_block_cache_test.cc
  8. 6
      db/db_bloom_filter_test.cc
  9. 2
      db/db_compaction_filter_test.cc
  10. 8
      db/db_compaction_test.cc
  11. 2
      db/db_dynamic_level_test.cc
  12. 2
      db/db_encryption_test.cc
  13. 2
      db/db_flush_test.cc
  14. 2
      db/db_inplace_update_test.cc
  15. 3
      db/db_io_failure_test.cc
  16. 2
      db/db_iterator_test.cc
  17. 2
      db/db_kv_checksum_test.cc
  18. 2
      db/db_log_iter_test.cc
  19. 2
      db/db_memtable_test.cc
  20. 2
      db/db_merge_operand_test.cc
  21. 2
      db/db_merge_operator_test.cc
  22. 2
      db/db_options_test.cc
  23. 2
      db/db_properties_test.cc
  24. 2
      db/db_range_del_test.cc
  25. 2
      db/db_secondary_test.cc
  26. 4
      db/db_sst_test.cc
  27. 2
      db/db_statistics_test.cc
  28. 4
      db/db_table_properties_test.cc
  29. 2
      db/db_tailing_iter_test.cc
  30. 2
      db/db_test.cc
  31. 12
      db/db_test2.cc
  32. 2
      db/db_universal_compaction_test.cc
  33. 2
      db/db_wal_test.cc
  34. 2
      db/db_with_timestamp_compaction_test.cc
  35. 2
      db/db_write_buffer_manager_test.cc
  36. 2
      db/db_write_test.cc
  37. 2
      db/deletefile_test.cc
  38. 2
      db/error_handler_fs_test.cc
  39. 2
      db/external_sst_file_basic_test.cc
  40. 4
      db/external_sst_file_test.cc
  41. 2
      db/import_column_family_test.cc
  42. 2
      db/listener_test.cc
  43. 2
      db/obsolete_files_test.cc
  44. 2
      db/periodic_work_scheduler_test.cc
  45. 2
      db/repair_test.cc
  46. 2
      file/prefetch_test.cc
  47. 3
      monitoring/stats_history_test.cc
  48. 2
      util/file_reader_writer_test.cc
  49. 5
      utilities/option_change_migration/option_change_migration_test.cc
  50. 2
      utilities/persistent_cache/persistent_cache_test.cc
  51. 2
      utilities/simulator_cache/sim_cache_test.cc

@ -378,7 +378,7 @@ class TestSecondaryCache : public SecondaryCache {
class DBSecondaryCacheTest : public DBTestBase { class DBSecondaryCacheTest : public DBTestBase {
public: public:
DBSecondaryCacheTest() DBSecondaryCacheTest()
: DBTestBase("/db_secondary_cache_test", /*env_do_fsync=*/true) { : DBTestBase("db_secondary_cache_test", /*env_do_fsync=*/true) {
fault_fs_.reset(new FaultInjectionTestFS(env_->GetFileSystem())); fault_fs_.reset(new FaultInjectionTestFS(env_->GetFileSystem()));
fault_env_.reset(new CompositeEnvWrapper(env_, fault_fs_)); fault_env_.reset(new CompositeEnvWrapper(env_, fault_fs_));
} }

@ -16,7 +16,7 @@ namespace ROCKSDB_NAMESPACE {
class DBBlobBasicTest : public DBTestBase { class DBBlobBasicTest : public DBTestBase {
protected: protected:
DBBlobBasicTest() DBBlobBasicTest()
: DBTestBase("/db_blob_basic_test", /* env_do_fsync */ false) {} : DBTestBase("db_blob_basic_test", /* env_do_fsync */ false) {}
}; };
TEST_F(DBBlobBasicTest, GetBlob) { TEST_F(DBBlobBasicTest, GetBlob) {

@ -15,7 +15,7 @@ namespace ROCKSDB_NAMESPACE {
class DBBlobCompactionTest : public DBTestBase { class DBBlobCompactionTest : public DBTestBase {
public: public:
explicit DBBlobCompactionTest() explicit DBBlobCompactionTest()
: DBTestBase("/db_blob_compaction_test", /*env_do_fsync=*/false) {} : DBTestBase("db_blob_compaction_test", /*env_do_fsync=*/false) {}
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
const std::vector<InternalStats::CompactionStats>& GetCompactionStats() { const std::vector<InternalStats::CompactionStats>& GetCompactionStats() {

@ -12,7 +12,7 @@ namespace ROCKSDB_NAMESPACE {
class DBBlobCorruptionTest : public DBTestBase { class DBBlobCorruptionTest : public DBTestBase {
protected: protected:
DBBlobCorruptionTest() DBBlobCorruptionTest()
: DBTestBase("/db_blob_corruption_test", /* env_do_fsync */ false) {} : DBTestBase("db_blob_corruption_test", /* env_do_fsync */ false) {}
void Corrupt(FileType filetype, int offset, int bytes_to_corrupt) { void Corrupt(FileType filetype, int offset, int bytes_to_corrupt) {
// Pick file to corrupt // Pick file to corrupt

@ -41,8 +41,7 @@ class DBBlobIndexTest : public DBTestBase {
Tier::kImmutableMemtables, Tier::kImmutableMemtables,
Tier::kL0SstFile, Tier::kLnSstFile}; Tier::kL0SstFile, Tier::kLnSstFile};
DBBlobIndexTest() DBBlobIndexTest() : DBTestBase("db_blob_index_test", /*env_do_fsync=*/true) {}
: DBTestBase("/db_blob_index_test", /*env_do_fsync=*/true) {}
ColumnFamilyHandle* cfh() { return dbfull()->DefaultColumnFamily(); } ColumnFamilyHandle* cfh() { return dbfull()->DefaultColumnFamily(); }

@ -31,7 +31,7 @@ namespace ROCKSDB_NAMESPACE {
class DBBasicTest : public DBTestBase { class DBBasicTest : public DBTestBase {
public: public:
DBBasicTest() : DBTestBase("/db_basic_test", /*env_do_fsync=*/false) {} DBBasicTest() : DBTestBase("db_basic_test", /*env_do_fsync=*/false) {}
}; };
TEST_F(DBBasicTest, OpenWhenOpen) { TEST_F(DBBasicTest, OpenWhenOpen) {
@ -2576,7 +2576,7 @@ class DBBasicTestTrackWal : public DBTestBase,
public testing::WithParamInterface<bool> { public testing::WithParamInterface<bool> {
public: public:
DBBasicTestTrackWal() DBBasicTestTrackWal()
: DBTestBase("/db_basic_test_track_wal", /*env_do_fsync=*/false) {} : DBTestBase("db_basic_test_track_wal", /*env_do_fsync=*/false) {}
int CountWalFiles() { int CountWalFiles() {
VectorLogPtr log_files; VectorLogPtr log_files;

@ -39,7 +39,7 @@ class DBBlockCacheTest : public DBTestBase {
const size_t kValueSize = 100; const size_t kValueSize = 100;
DBBlockCacheTest() DBBlockCacheTest()
: DBTestBase("/db_block_cache_test", /*env_do_fsync=*/true) {} : DBTestBase("db_block_cache_test", /*env_do_fsync=*/true) {}
BlockBasedTableOptions GetTableOptions() { BlockBasedTableOptions GetTableOptions() {
BlockBasedTableOptions table_options; BlockBasedTableOptions table_options;
@ -1218,7 +1218,7 @@ class DBBlockCachePinningTest
std::tuple<bool, PinningTier, PinningTier, PinningTier>> { std::tuple<bool, PinningTier, PinningTier, PinningTier>> {
public: public:
DBBlockCachePinningTest() DBBlockCachePinningTest()
: DBTestBase("/db_block_cache_test", /*env_do_fsync=*/false) {} : DBTestBase("db_block_cache_test", /*env_do_fsync=*/false) {}
void SetUp() override { void SetUp() override {
partition_index_and_filters_ = std::get<0>(GetParam()); partition_index_and_filters_ = std::get<0>(GetParam());

@ -28,7 +28,7 @@ using BFP = BloomFilterPolicy;
class DBBloomFilterTest : public DBTestBase { class DBBloomFilterTest : public DBTestBase {
public: public:
DBBloomFilterTest() DBBloomFilterTest()
: DBTestBase("/db_bloom_filter_test", /*env_do_fsync=*/true) {} : DBTestBase("db_bloom_filter_test", /*env_do_fsync=*/true) {}
}; };
class DBBloomFilterTestWithParam : public DBTestBase, class DBBloomFilterTestWithParam : public DBTestBase,
@ -42,7 +42,7 @@ class DBBloomFilterTestWithParam : public DBTestBase,
public: public:
DBBloomFilterTestWithParam() DBBloomFilterTestWithParam()
: DBTestBase("/db_bloom_filter_tests", /*env_do_fsync=*/true) {} : DBTestBase("db_bloom_filter_tests", /*env_do_fsync=*/true) {}
~DBBloomFilterTestWithParam() override {} ~DBBloomFilterTestWithParam() override {}
@ -1094,7 +1094,7 @@ class DBBloomFilterTestVaryPrefixAndFormatVer
public: public:
DBBloomFilterTestVaryPrefixAndFormatVer() DBBloomFilterTestVaryPrefixAndFormatVer()
: DBTestBase("/db_bloom_filter_tests", /*env_do_fsync=*/true) {} : DBTestBase("db_bloom_filter_tests", /*env_do_fsync=*/true) {}
~DBBloomFilterTestVaryPrefixAndFormatVer() override {} ~DBBloomFilterTestVaryPrefixAndFormatVer() override {}

@ -22,7 +22,7 @@ static std::string NEW_VALUE = "NewValue";
class DBTestCompactionFilter : public DBTestBase { class DBTestCompactionFilter : public DBTestBase {
public: public:
DBTestCompactionFilter() DBTestCompactionFilter()
: DBTestBase("/db_compaction_filter_test", /*env_do_fsync=*/true) {} : DBTestBase("db_compaction_filter_test", /*env_do_fsync=*/true) {}
}; };
// Param variant of DBTestBase::ChangeCompactOptions // Param variant of DBTestBase::ChangeCompactOptions

@ -32,7 +32,7 @@ namespace ROCKSDB_NAMESPACE {
class DBCompactionTest : public DBTestBase { class DBCompactionTest : public DBTestBase {
public: public:
DBCompactionTest() DBCompactionTest()
: DBTestBase("/db_compaction_test", /*env_do_fsync=*/true) {} : DBTestBase("db_compaction_test", /*env_do_fsync=*/true) {}
}; };
class DBCompactionTestWithParam class DBCompactionTestWithParam
@ -40,7 +40,7 @@ class DBCompactionTestWithParam
public testing::WithParamInterface<std::tuple<uint32_t, bool>> { public testing::WithParamInterface<std::tuple<uint32_t, bool>> {
public: public:
DBCompactionTestWithParam() DBCompactionTestWithParam()
: DBTestBase("/db_compaction_test", /*env_do_fsync=*/true) { : DBTestBase("db_compaction_test", /*env_do_fsync=*/true) {
max_subcompactions_ = std::get<0>(GetParam()); max_subcompactions_ = std::get<0>(GetParam());
exclusive_manual_compaction_ = std::get<1>(GetParam()); exclusive_manual_compaction_ = std::get<1>(GetParam());
} }
@ -58,7 +58,7 @@ class DBCompactionTestWithBottommostParam
public testing::WithParamInterface<BottommostLevelCompaction> { public testing::WithParamInterface<BottommostLevelCompaction> {
public: public:
DBCompactionTestWithBottommostParam() DBCompactionTestWithBottommostParam()
: DBTestBase("/db_compaction_test", /*env_do_fsync=*/true) { : DBTestBase("db_compaction_test", /*env_do_fsync=*/true) {
bottommost_level_compaction_ = GetParam(); bottommost_level_compaction_ = GetParam();
} }
@ -5005,7 +5005,7 @@ class CompactionPriTest : public DBTestBase,
public testing::WithParamInterface<uint32_t> { public testing::WithParamInterface<uint32_t> {
public: public:
CompactionPriTest() CompactionPriTest()
: DBTestBase("/compaction_pri_test", /*env_do_fsync=*/true) { : DBTestBase("compaction_pri_test", /*env_do_fsync=*/true) {
compaction_pri_ = GetParam(); compaction_pri_ = GetParam();
} }

@ -22,7 +22,7 @@ namespace ROCKSDB_NAMESPACE {
class DBTestDynamicLevel : public DBTestBase { class DBTestDynamicLevel : public DBTestBase {
public: public:
DBTestDynamicLevel() DBTestDynamicLevel()
: DBTestBase("/db_dynamic_level_test", /*env_do_fsync=*/true) {} : DBTestBase("db_dynamic_level_test", /*env_do_fsync=*/true) {}
}; };
TEST_F(DBTestDynamicLevel, DynamicLevelMaxBytesBase) { TEST_F(DBTestDynamicLevel, DynamicLevelMaxBytesBase) {

@ -17,7 +17,7 @@ namespace ROCKSDB_NAMESPACE {
class DBEncryptionTest : public DBTestBase { class DBEncryptionTest : public DBTestBase {
public: public:
DBEncryptionTest() DBEncryptionTest()
: DBTestBase("/db_encryption_test", /*env_do_fsync=*/true) {} : DBTestBase("db_encryption_test", /*env_do_fsync=*/true) {}
Env* GetTargetEnv() { Env* GetTargetEnv() {
if (encrypted_env_ != nullptr) { if (encrypted_env_ != nullptr) {
return (static_cast<EnvWrapper*>(encrypted_env_))->target(); return (static_cast<EnvWrapper*>(encrypted_env_))->target();

@ -30,7 +30,7 @@ static std::string NEW_VALUE = "NewValue";
class DBFlushTest : public DBTestBase { class DBFlushTest : public DBTestBase {
public: public:
DBFlushTest() : DBTestBase("/db_flush_test", /*env_do_fsync=*/true) {} DBFlushTest() : DBTestBase("db_flush_test", /*env_do_fsync=*/true) {}
}; };
class DBFlushDirectIOTest : public DBFlushTest, class DBFlushDirectIOTest : public DBFlushTest,

@ -14,7 +14,7 @@ namespace ROCKSDB_NAMESPACE {
class DBTestInPlaceUpdate : public DBTestBase { class DBTestInPlaceUpdate : public DBTestBase {
public: public:
DBTestInPlaceUpdate() DBTestInPlaceUpdate()
: DBTestBase("/db_inplace_update_test", /*env_do_fsync=*/true) {} : DBTestBase("db_inplace_update_test", /*env_do_fsync=*/true) {}
}; };
TEST_F(DBTestInPlaceUpdate, InPlaceUpdate) { TEST_F(DBTestInPlaceUpdate, InPlaceUpdate) {

@ -15,8 +15,7 @@ namespace ROCKSDB_NAMESPACE {
class DBIOFailureTest : public DBTestBase { class DBIOFailureTest : public DBTestBase {
public: public:
DBIOFailureTest() DBIOFailureTest() : DBTestBase("db_io_failure_test", /*env_do_fsync=*/true) {}
: DBTestBase("/db_io_failure_test", /*env_do_fsync=*/true) {}
}; };
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE

@ -35,7 +35,7 @@ class DummyReadCallback : public ReadCallback {
class DBIteratorTest : public DBTestBase, class DBIteratorTest : public DBTestBase,
public testing::WithParamInterface<bool> { public testing::WithParamInterface<bool> {
public: public:
DBIteratorTest() : DBTestBase("/db_iterator_test", /*env_do_fsync=*/true) {} DBIteratorTest() : DBTestBase("db_iterator_test", /*env_do_fsync=*/true) {}
Iterator* NewIterator(const ReadOptions& read_options, Iterator* NewIterator(const ReadOptions& read_options,
ColumnFamilyHandle* column_family = nullptr) { ColumnFamilyHandle* column_family = nullptr) {

@ -29,7 +29,7 @@ class DbKvChecksumTest
public ::testing::WithParamInterface<std::tuple<WriteBatchOpType, char>> { public ::testing::WithParamInterface<std::tuple<WriteBatchOpType, char>> {
public: public:
DbKvChecksumTest() DbKvChecksumTest()
: DBTestBase("/db_kv_checksum_test", /*env_do_fsync=*/false) { : DBTestBase("db_kv_checksum_test", /*env_do_fsync=*/false) {
op_type_ = std::get<0>(GetParam()); op_type_ = std::get<0>(GetParam());
corrupt_byte_addend_ = std::get<1>(GetParam()); corrupt_byte_addend_ = std::get<1>(GetParam());
} }

@ -21,7 +21,7 @@ namespace ROCKSDB_NAMESPACE {
class DBTestXactLogIterator : public DBTestBase { class DBTestXactLogIterator : public DBTestBase {
public: public:
DBTestXactLogIterator() DBTestXactLogIterator()
: DBTestBase("/db_log_iter_test", /*env_do_fsync=*/true) {} : DBTestBase("db_log_iter_test", /*env_do_fsync=*/true) {}
std::unique_ptr<TransactionLogIterator> OpenTransactionLogIter( std::unique_ptr<TransactionLogIterator> OpenTransactionLogIter(
const SequenceNumber seq) { const SequenceNumber seq) {

@ -17,7 +17,7 @@ namespace ROCKSDB_NAMESPACE {
class DBMemTableTest : public DBTestBase { class DBMemTableTest : public DBTestBase {
public: public:
DBMemTableTest() : DBTestBase("/db_memtable_test", /*env_do_fsync=*/true) {} DBMemTableTest() : DBTestBase("db_memtable_test", /*env_do_fsync=*/true) {}
}; };
class MockMemTableRep : public MemTableRep { class MockMemTableRep : public MemTableRep {

@ -44,7 +44,7 @@ class LimitedStringAppendMergeOp : public StringAppendTESTOperator {
class DBMergeOperandTest : public DBTestBase { class DBMergeOperandTest : public DBTestBase {
public: public:
DBMergeOperandTest() DBMergeOperandTest()
: DBTestBase("/db_merge_operand_test", /*env_do_fsync=*/true) {} : DBTestBase("db_merge_operand_test", /*env_do_fsync=*/true) {}
}; };
TEST_F(DBMergeOperandTest, GetMergeOperandsBasic) { TEST_F(DBMergeOperandTest, GetMergeOperandsBasic) {

@ -37,7 +37,7 @@ class TestReadCallback : public ReadCallback {
class DBMergeOperatorTest : public DBTestBase { class DBMergeOperatorTest : public DBTestBase {
public: public:
DBMergeOperatorTest() DBMergeOperatorTest()
: DBTestBase("/db_merge_operator_test", /*env_do_fsync=*/false) {} : DBTestBase("db_merge_operator_test", /*env_do_fsync=*/false) {}
std::string GetWithReadCallback(SnapshotChecker* snapshot_checker, std::string GetWithReadCallback(SnapshotChecker* snapshot_checker,
const Slice& key, const Slice& key,

@ -27,7 +27,7 @@ namespace ROCKSDB_NAMESPACE {
class DBOptionsTest : public DBTestBase { class DBOptionsTest : public DBTestBase {
public: public:
DBOptionsTest() : DBTestBase("/db_options_test", /*env_do_fsync=*/true) {} DBOptionsTest() : DBTestBase("db_options_test", /*env_do_fsync=*/true) {}
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
std::unordered_map<std::string, std::string> GetMutableDBOptionsMap( std::unordered_map<std::string, std::string> GetMutableDBOptionsMap(

@ -27,7 +27,7 @@ namespace ROCKSDB_NAMESPACE {
class DBPropertiesTest : public DBTestBase { class DBPropertiesTest : public DBTestBase {
public: public:
DBPropertiesTest() DBPropertiesTest()
: DBTestBase("/db_properties_test", /*env_do_fsync=*/false) {} : DBTestBase("db_properties_test", /*env_do_fsync=*/false) {}
}; };
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE

@ -14,7 +14,7 @@ namespace ROCKSDB_NAMESPACE {
class DBRangeDelTest : public DBTestBase { class DBRangeDelTest : public DBTestBase {
public: public:
DBRangeDelTest() : DBTestBase("/db_range_del_test", /*env_do_fsync=*/false) {} DBRangeDelTest() : DBTestBase("db_range_del_test", /*env_do_fsync=*/false) {}
std::string GetNumericStr(int key) { std::string GetNumericStr(int key) {
uint64_t uint64_key = static_cast<uint64_t>(key); uint64_t uint64_key = static_cast<uint64_t>(key);

@ -20,7 +20,7 @@ namespace ROCKSDB_NAMESPACE {
class DBSecondaryTest : public DBTestBase { class DBSecondaryTest : public DBTestBase {
public: public:
DBSecondaryTest() DBSecondaryTest()
: DBTestBase("/db_secondary_test", /*env_do_fsync=*/true), : DBTestBase("db_secondary_test", /*env_do_fsync=*/true),
secondary_path_(), secondary_path_(),
handles_secondary_(), handles_secondary_(),
db_secondary_(nullptr) { db_secondary_(nullptr) {

@ -18,7 +18,7 @@ namespace ROCKSDB_NAMESPACE {
class DBSSTTest : public DBTestBase { class DBSSTTest : public DBTestBase {
public: public:
DBSSTTest() : DBTestBase("/db_sst_test", /*env_do_fsync=*/true) {} DBSSTTest() : DBTestBase("db_sst_test", /*env_do_fsync=*/true) {}
}; };
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
@ -757,7 +757,7 @@ class DBWALTestWithParam
public testing::WithParamInterface<std::tuple<std::string, bool>> { public testing::WithParamInterface<std::tuple<std::string, bool>> {
public: public:
explicit DBWALTestWithParam() explicit DBWALTestWithParam()
: DBTestBase("/db_wal_test_with_params", /*env_do_fsync=*/true) { : DBTestBase("db_wal_test_with_params", /*env_do_fsync=*/true) {
wal_dir_ = std::get<0>(GetParam()); wal_dir_ = std::get<0>(GetParam());
wal_dir_same_as_dbname_ = std::get<1>(GetParam()); wal_dir_same_as_dbname_ = std::get<1>(GetParam());
} }

@ -16,7 +16,7 @@ namespace ROCKSDB_NAMESPACE {
class DBStatisticsTest : public DBTestBase { class DBStatisticsTest : public DBTestBase {
public: public:
DBStatisticsTest() DBStatisticsTest()
: DBTestBase("/db_statistics_test", /*env_do_fsync=*/true) {} : DBTestBase("db_statistics_test", /*env_do_fsync=*/true) {}
}; };
TEST_F(DBStatisticsTest, CompressionStatsTest) { TEST_F(DBStatisticsTest, CompressionStatsTest) {

@ -52,7 +52,7 @@ class DBTablePropertiesTest : public DBTestBase,
public testing::WithParamInterface<std::string> { public testing::WithParamInterface<std::string> {
public: public:
DBTablePropertiesTest() DBTablePropertiesTest()
: DBTestBase("/db_table_properties_test", /*env_do_fsync=*/false) {} : DBTestBase("db_table_properties_test", /*env_do_fsync=*/false) {}
TablePropertiesCollection TestGetPropertiesOfTablesInRange( TablePropertiesCollection TestGetPropertiesOfTablesInRange(
std::vector<Range> ranges, std::size_t* num_properties = nullptr, std::vector<Range> ranges, std::size_t* num_properties = nullptr,
std::size_t* num_files = nullptr); std::size_t* num_files = nullptr);
@ -281,7 +281,7 @@ class DBTableHostnamePropertyTest
public ::testing::WithParamInterface<std::tuple<int, std::string>> { public ::testing::WithParamInterface<std::tuple<int, std::string>> {
public: public:
DBTableHostnamePropertyTest() DBTableHostnamePropertyTest()
: DBTestBase("/db_table_hostname_property_test", : DBTestBase("db_table_hostname_property_test",
/*env_do_fsync=*/false) {} /*env_do_fsync=*/false) {}
}; };

@ -21,7 +21,7 @@ namespace ROCKSDB_NAMESPACE {
class DBTestTailingIterator : public DBTestBase { class DBTestTailingIterator : public DBTestBase {
public: public:
DBTestTailingIterator() DBTestTailingIterator()
: DBTestBase("/db_tailing_iterator_test", /*env_do_fsync=*/true) {} : DBTestBase("db_tailing_iterator_test", /*env_do_fsync=*/true) {}
}; };
TEST_F(DBTestTailingIterator, TailingIteratorSingle) { TEST_F(DBTestTailingIterator, TailingIteratorSingle) {

@ -75,7 +75,7 @@ namespace ROCKSDB_NAMESPACE {
// If fsync needs to be covered in a test, put it in other places. // If fsync needs to be covered in a test, put it in other places.
class DBTest : public DBTestBase { class DBTest : public DBTestBase {
public: public:
DBTest() : DBTestBase("/db_test", /*env_do_fsync=*/false) {} DBTest() : DBTestBase("db_test", /*env_do_fsync=*/false) {}
}; };
class DBTestWithParam class DBTestWithParam

@ -25,7 +25,7 @@ namespace ROCKSDB_NAMESPACE {
class DBTest2 : public DBTestBase { class DBTest2 : public DBTestBase {
public: public:
DBTest2() : DBTestBase("/db_test2", /*env_do_fsync=*/true) {} DBTest2() : DBTestBase("db_test2", /*env_do_fsync=*/true) {}
}; };
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
@ -91,7 +91,7 @@ class TestReadOnlyWithCompressedCache
public testing::WithParamInterface<std::tuple<int, bool>> { public testing::WithParamInterface<std::tuple<int, bool>> {
public: public:
TestReadOnlyWithCompressedCache() TestReadOnlyWithCompressedCache()
: DBTestBase("/test_readonly_with_compressed_cache", : DBTestBase("test_readonly_with_compressed_cache",
/*env_do_fsync=*/true) { /*env_do_fsync=*/true) {
max_open_files_ = std::get<0>(GetParam()); max_open_files_ = std::get<0>(GetParam());
use_mmap_ = std::get<1>(GetParam()); use_mmap_ = std::get<1>(GetParam());
@ -193,7 +193,7 @@ class PrefixFullBloomWithReverseComparator
public ::testing::WithParamInterface<bool> { public ::testing::WithParamInterface<bool> {
public: public:
PrefixFullBloomWithReverseComparator() PrefixFullBloomWithReverseComparator()
: DBTestBase("/prefix_bloom_reverse", /*env_do_fsync=*/true) {} : DBTestBase("prefix_bloom_reverse", /*env_do_fsync=*/true) {}
void SetUp() override { if_cache_filter_ = GetParam(); } void SetUp() override { if_cache_filter_ = GetParam(); }
bool if_cache_filter_; bool if_cache_filter_;
}; };
@ -333,7 +333,7 @@ class DBTestSharedWriteBufferAcrossCFs
public testing::WithParamInterface<std::tuple<bool, bool>> { public testing::WithParamInterface<std::tuple<bool, bool>> {
public: public:
DBTestSharedWriteBufferAcrossCFs() DBTestSharedWriteBufferAcrossCFs()
: DBTestBase("/db_test_shared_write_buffer", /*env_do_fsync=*/true) {} : DBTestBase("db_test_shared_write_buffer", /*env_do_fsync=*/true) {}
void SetUp() override { void SetUp() override {
use_old_interface_ = std::get<0>(GetParam()); use_old_interface_ = std::get<0>(GetParam());
cost_cache_ = std::get<1>(GetParam()); cost_cache_ = std::get<1>(GetParam());
@ -1413,7 +1413,7 @@ class PresetCompressionDictTest
public testing::WithParamInterface<std::tuple<CompressionType, bool>> { public testing::WithParamInterface<std::tuple<CompressionType, bool>> {
public: public:
PresetCompressionDictTest() PresetCompressionDictTest()
: DBTestBase("/db_test2", false /* env_do_fsync */), : DBTestBase("db_test2", false /* env_do_fsync */),
compression_type_(std::get<0>(GetParam())), compression_type_(std::get<0>(GetParam())),
bottommost_(std::get<1>(GetParam())) {} bottommost_(std::get<1>(GetParam())) {}
@ -2041,7 +2041,7 @@ class PinL0IndexAndFilterBlocksTest
public testing::WithParamInterface<std::tuple<bool, bool>> { public testing::WithParamInterface<std::tuple<bool, bool>> {
public: public:
PinL0IndexAndFilterBlocksTest() PinL0IndexAndFilterBlocksTest()
: DBTestBase("/db_pin_l0_index_bloom_test", /*env_do_fsync=*/true) {} : DBTestBase("db_pin_l0_index_bloom_test", /*env_do_fsync=*/true) {}
void SetUp() override { void SetUp() override {
infinite_max_files_ = std::get<0>(GetParam()); infinite_max_files_ = std::get<0>(GetParam());
disallow_preload_ = std::get<1>(GetParam()); disallow_preload_ = std::get<1>(GetParam());

@ -45,7 +45,7 @@ class DBTestUniversalCompaction : public DBTestUniversalCompactionBase {
class DBTestUniversalCompaction2 : public DBTestBase { class DBTestUniversalCompaction2 : public DBTestBase {
public: public:
DBTestUniversalCompaction2() DBTestUniversalCompaction2()
: DBTestBase("/db_universal_compaction_test2", /*env_do_fsync=*/false) {} : DBTestBase("db_universal_compaction_test2", /*env_do_fsync=*/false) {}
}; };
namespace { namespace {

@ -119,7 +119,7 @@ class EnrichedSpecialEnv : public SpecialEnv {
class DBWALTestWithEnrichedEnv : public DBTestBase { class DBWALTestWithEnrichedEnv : public DBTestBase {
public: public:
DBWALTestWithEnrichedEnv() DBWALTestWithEnrichedEnv()
: DBTestBase("/db_wal_test", /*env_do_fsync=*/true) { : DBTestBase("db_wal_test", /*env_do_fsync=*/true) {
enriched_env_ = new EnrichedSpecialEnv(env_->target()); enriched_env_ = new EnrichedSpecialEnv(env_->target());
auto options = CurrentOptions(); auto options = CurrentOptions();
options.env = enriched_env_; options.env = enriched_env_;

@ -31,7 +31,7 @@ std::string Timestamp(uint64_t ts) {
class TimestampCompatibleCompactionTest : public DBTestBase { class TimestampCompatibleCompactionTest : public DBTestBase {
public: public:
TimestampCompatibleCompactionTest() TimestampCompatibleCompactionTest()
: DBTestBase("/ts_compatible_compaction_test", /*env_do_fsync=*/true) {} : DBTestBase("ts_compatible_compaction_test", /*env_do_fsync=*/true) {}
std::string Get(const std::string& key, uint64_t ts) { std::string Get(const std::string& key, uint64_t ts) {
ReadOptions read_opts; ReadOptions read_opts;

@ -17,7 +17,7 @@ class DBWriteBufferManagerTest : public DBTestBase,
public testing::WithParamInterface<bool> { public testing::WithParamInterface<bool> {
public: public:
DBWriteBufferManagerTest() DBWriteBufferManagerTest()
: DBTestBase("/db_write_buffer_manager_test", /*env_do_fsync=*/false) {} : DBTestBase("db_write_buffer_manager_test", /*env_do_fsync=*/false) {}
bool cost_cache_; bool cost_cache_;
}; };

@ -24,7 +24,7 @@ namespace ROCKSDB_NAMESPACE {
// Test variations of WriteImpl. // Test variations of WriteImpl.
class DBWriteTest : public DBTestBase, public testing::WithParamInterface<int> { class DBWriteTest : public DBTestBase, public testing::WithParamInterface<int> {
public: public:
DBWriteTest() : DBTestBase("/db_write_test", /*env_do_fsync=*/true) {} DBWriteTest() : DBTestBase("db_write_test", /*env_do_fsync=*/true) {}
Options GetOptions() { return DBTestBase::GetOptions(GetParam()); } Options GetOptions() { return DBTestBase::GetOptions(GetParam()); }

@ -35,7 +35,7 @@ class DeleteFileTest : public DBTestBase {
const std::string wal_dir_; const std::string wal_dir_;
DeleteFileTest() DeleteFileTest()
: DBTestBase("/deletefile_test", /*env_do_fsync=*/true), : DBTestBase("deletefile_test", /*env_do_fsync=*/true),
numlevels_(7), numlevels_(7),
wal_dir_(dbname_ + "/wal_files") {} wal_dir_(dbname_ + "/wal_files") {}

@ -25,7 +25,7 @@ namespace ROCKSDB_NAMESPACE {
class DBErrorHandlingFSTest : public DBTestBase { class DBErrorHandlingFSTest : public DBTestBase {
public: public:
DBErrorHandlingFSTest() DBErrorHandlingFSTest()
: DBTestBase("/db_error_handling_fs_test", /*env_do_fsync=*/true) { : DBTestBase("db_error_handling_fs_test", /*env_do_fsync=*/true) {
fault_fs_.reset(new FaultInjectionTestFS(env_->GetFileSystem())); fault_fs_.reset(new FaultInjectionTestFS(env_->GetFileSystem()));
fault_env_.reset(new CompositeEnvWrapper(env_, fault_fs_)); fault_env_.reset(new CompositeEnvWrapper(env_, fault_fs_));
} }

@ -22,7 +22,7 @@ class ExternalSSTFileBasicTest
public ::testing::WithParamInterface<std::tuple<bool, bool>> { public ::testing::WithParamInterface<std::tuple<bool, bool>> {
public: public:
ExternalSSTFileBasicTest() ExternalSSTFileBasicTest()
: DBTestBase("/external_sst_file_basic_test", /*env_do_fsync=*/true) { : DBTestBase("external_sst_file_basic_test", /*env_do_fsync=*/true) {
sst_files_dir_ = dbname_ + "/sst_files/"; sst_files_dir_ = dbname_ + "/sst_files/";
fault_injection_test_env_.reset(new FaultInjectionTestEnv(env_)); fault_injection_test_env_.reset(new FaultInjectionTestEnv(env_));
DestroyAndRecreateExternalSSTFilesDir(); DestroyAndRecreateExternalSSTFilesDir();

@ -45,7 +45,7 @@ class ExternSSTFileLinkFailFallbackTest
public ::testing::WithParamInterface<std::tuple<bool, bool>> { public ::testing::WithParamInterface<std::tuple<bool, bool>> {
public: public:
ExternSSTFileLinkFailFallbackTest() ExternSSTFileLinkFailFallbackTest()
: DBTestBase("/external_sst_file_test", /*env_do_fsync=*/true), : DBTestBase("external_sst_file_test", /*env_do_fsync=*/true),
test_env_(new ExternalSSTTestEnv(env_, true)) { test_env_(new ExternalSSTTestEnv(env_, true)) {
sst_files_dir_ = dbname_ + "/sst_files/"; sst_files_dir_ = dbname_ + "/sst_files/";
EXPECT_EQ(DestroyDir(env_, sst_files_dir_), Status::OK()); EXPECT_EQ(DestroyDir(env_, sst_files_dir_), Status::OK());
@ -74,7 +74,7 @@ class ExternalSSTFileTest
public ::testing::WithParamInterface<std::tuple<bool, bool>> { public ::testing::WithParamInterface<std::tuple<bool, bool>> {
public: public:
ExternalSSTFileTest() ExternalSSTFileTest()
: DBTestBase("/external_sst_file_test", /*env_do_fsync=*/true) { : DBTestBase("external_sst_file_test", /*env_do_fsync=*/true) {
sst_files_dir_ = dbname_ + "/sst_files/"; sst_files_dir_ = dbname_ + "/sst_files/";
DestroyAndRecreateExternalSSTFilesDir(); DestroyAndRecreateExternalSSTFilesDir();
} }

@ -14,7 +14,7 @@ namespace ROCKSDB_NAMESPACE {
class ImportColumnFamilyTest : public DBTestBase { class ImportColumnFamilyTest : public DBTestBase {
public: public:
ImportColumnFamilyTest() ImportColumnFamilyTest()
: DBTestBase("/import_column_family_test", /*env_do_fsync=*/true) { : DBTestBase("import_column_family_test", /*env_do_fsync=*/true) {
sst_files_dir_ = dbname_ + "/sst_files/"; sst_files_dir_ = dbname_ + "/sst_files/";
export_files_dir_ = test::PerThreadDBPath(env_, "export"); export_files_dir_ = test::PerThreadDBPath(env_, "export");
DestroyAndRecreateExternalSSTFilesDir(); DestroyAndRecreateExternalSSTFilesDir();

@ -38,7 +38,7 @@ namespace ROCKSDB_NAMESPACE {
class EventListenerTest : public DBTestBase { class EventListenerTest : public DBTestBase {
public: public:
EventListenerTest() : DBTestBase("/listener_test", /*env_do_fsync=*/true) {} EventListenerTest() : DBTestBase("listener_test", /*env_do_fsync=*/true) {}
static std::string BlobStr(uint64_t blob_file_number, uint64_t offset, static std::string BlobStr(uint64_t blob_file_number, uint64_t offset,
uint64_t size) { uint64_t size) {

@ -34,7 +34,7 @@ namespace ROCKSDB_NAMESPACE {
class ObsoleteFilesTest : public DBTestBase { class ObsoleteFilesTest : public DBTestBase {
public: public:
ObsoleteFilesTest() ObsoleteFilesTest()
: DBTestBase("/obsolete_files_test", /*env_do_fsync=*/true), : DBTestBase("obsolete_files_test", /*env_do_fsync=*/true),
wal_dir_(dbname_ + "/wal_files") {} wal_dir_(dbname_ + "/wal_files") {}
void AddKeys(int numkeys, int startkey) { void AddKeys(int numkeys, int startkey) {

@ -15,7 +15,7 @@ namespace ROCKSDB_NAMESPACE {
class PeriodicWorkSchedulerTest : public DBTestBase { class PeriodicWorkSchedulerTest : public DBTestBase {
public: public:
PeriodicWorkSchedulerTest() PeriodicWorkSchedulerTest()
: DBTestBase("/periodic_work_scheduler_test", /*env_do_fsync=*/true) { : DBTestBase("periodic_work_scheduler_test", /*env_do_fsync=*/true) {
mock_clock_ = std::make_shared<MockSystemClock>(env_->GetSystemClock()); mock_clock_ = std::make_shared<MockSystemClock>(env_->GetSystemClock());
mock_env_.reset(new CompositeEnvWrapper(env_, mock_clock_)); mock_env_.reset(new CompositeEnvWrapper(env_, mock_clock_));
} }

@ -22,7 +22,7 @@ namespace ROCKSDB_NAMESPACE {
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
class RepairTest : public DBTestBase { class RepairTest : public DBTestBase {
public: public:
RepairTest() : DBTestBase("/repair_test", /*env_do_fsync=*/true) {} RepairTest() : DBTestBase("repair_test", /*env_do_fsync=*/true) {}
Status GetFirstSstPath(std::string* first_sst_path) { Status GetFirstSstPath(std::string* first_sst_path) {
assert(first_sst_path != nullptr); assert(first_sst_path != nullptr);

@ -70,7 +70,7 @@ class PrefetchTest
: public DBTestBase, : public DBTestBase,
public ::testing::WithParamInterface<std::tuple<bool, bool>> { public ::testing::WithParamInterface<std::tuple<bool, bool>> {
public: public:
PrefetchTest() : DBTestBase("/prefetch_test", true) {} PrefetchTest() : DBTestBase("prefetch_test", true) {}
}; };
INSTANTIATE_TEST_CASE_P(PrefetchTest, PrefetchTest, INSTANTIATE_TEST_CASE_P(PrefetchTest, PrefetchTest,

@ -32,8 +32,7 @@ namespace ROCKSDB_NAMESPACE {
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
class StatsHistoryTest : public DBTestBase { class StatsHistoryTest : public DBTestBase {
public: public:
StatsHistoryTest() StatsHistoryTest() : DBTestBase("stats_history_test", /*env_do_fsync=*/true) {
: DBTestBase("/stats_history_test", /*env_do_fsync=*/true) {
mock_clock_ = std::make_shared<MockSystemClock>(env_->GetSystemClock()); mock_clock_ = std::make_shared<MockSystemClock>(env_->GetSystemClock());
mock_env_.reset(new CompositeEnvWrapper(env_, mock_clock_)); mock_env_.reset(new CompositeEnvWrapper(env_, mock_clock_));
} }

@ -237,7 +237,7 @@ TEST_F(WritableFileWriterTest, IncrementalBuffer) {
class DBWritableFileWriterTest : public DBTestBase { class DBWritableFileWriterTest : public DBTestBase {
public: public:
DBWritableFileWriterTest() DBWritableFileWriterTest()
: DBTestBase("/db_secondary_cache_test", /*env_do_fsync=*/true) { : DBTestBase("db_secondary_cache_test", /*env_do_fsync=*/true) {
fault_fs_.reset(new FaultInjectionTestFS(env_->GetFileSystem())); fault_fs_.reset(new FaultInjectionTestFS(env_->GetFileSystem()));
fault_env_.reset(new CompositeEnvWrapper(env_, fault_fs_)); fault_env_.reset(new CompositeEnvWrapper(env_, fault_fs_));
} }

@ -23,7 +23,7 @@ class DBOptionChangeMigrationTests
std::tuple<int, int, bool, int, int, bool>> { std::tuple<int, int, bool, int, int, bool>> {
public: public:
DBOptionChangeMigrationTests() DBOptionChangeMigrationTests()
: DBTestBase("/db_option_change_migration_test", /*env_do_fsync=*/true) { : DBTestBase("db_option_change_migration_test", /*env_do_fsync=*/true) {
level1_ = std::get<0>(GetParam()); level1_ = std::get<0>(GetParam());
compaction_style1_ = std::get<1>(GetParam()); compaction_style1_ = std::get<1>(GetParam());
is_dynamic1_ = std::get<2>(GetParam()); is_dynamic1_ = std::get<2>(GetParam());
@ -376,8 +376,7 @@ INSTANTIATE_TEST_CASE_P(
class DBOptionChangeMigrationTest : public DBTestBase { class DBOptionChangeMigrationTest : public DBTestBase {
public: public:
DBOptionChangeMigrationTest() DBOptionChangeMigrationTest()
: DBTestBase("/db_option_change_migration_test2", /*env_do_fsync=*/true) { : DBTestBase("db_option_change_migration_test2", /*env_do_fsync=*/true) {}
}
}; };
TEST_F(DBOptionChangeMigrationTest, CompactedSrcToUniversal) { TEST_F(DBOptionChangeMigrationTest, CompactedSrcToUniversal) {

@ -277,7 +277,7 @@ TEST_F(PersistentCacheTierTest, FactoryTest) {
} }
PersistentCacheDBTest::PersistentCacheDBTest() PersistentCacheDBTest::PersistentCacheDBTest()
: DBTestBase("/cache_test", /*env_do_fsync=*/true) { : DBTestBase("cache_test", /*env_do_fsync=*/true) {
#ifdef OS_LINUX #ifdef OS_LINUX
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing(); ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing();
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->SetCallBack( ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->SetCallBack(

@ -23,7 +23,7 @@ class SimCacheTest : public DBTestBase {
const size_t kNumBlocks = 5; const size_t kNumBlocks = 5;
const size_t kValueSize = 1000; const size_t kValueSize = 1000;
SimCacheTest() : DBTestBase("/sim_cache_test", /*env_do_fsync=*/true) {} SimCacheTest() : DBTestBase("sim_cache_test", /*env_do_fsync=*/true) {}
BlockBasedTableOptions GetTableOptions() { BlockBasedTableOptions GetTableOptions() {
BlockBasedTableOptions table_options; BlockBasedTableOptions table_options;

Loading…
Cancel
Save