Remove tests from ROCKSDB_VALGRIND_RUN
Summary: In order to make valgrind check test to pass in a day, remove some tests that run prohibitively slow under valgrind. Closes https://github.com/facebook/rocksdb/pull/3924 Differential Revision: D8210184 Pulled By: siying fbshipit-source-id: 5b06fb08f3cf57571d422d05a0dbddc9f9376f7a
This commit is contained in:
parent
a736255de8
commit
4dd80debd0
@ -45,6 +45,7 @@ class DBTestCompactionFilterWithCompactParam
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
DBTestCompactionFilterWithCompactOption,
|
DBTestCompactionFilterWithCompactOption,
|
||||||
DBTestCompactionFilterWithCompactParam,
|
DBTestCompactionFilterWithCompactParam,
|
||||||
@ -53,6 +54,12 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
DBTestBase::OptionConfig::kUniversalCompactionMultiLevel,
|
DBTestBase::OptionConfig::kUniversalCompactionMultiLevel,
|
||||||
DBTestBase::OptionConfig::kLevelSubcompactions,
|
DBTestBase::OptionConfig::kLevelSubcompactions,
|
||||||
DBTestBase::OptionConfig::kUniversalSubcompactions));
|
DBTestBase::OptionConfig::kUniversalSubcompactions));
|
||||||
|
#else
|
||||||
|
// Run fewer cases in valgrind
|
||||||
|
INSTANTIATE_TEST_CASE_P(DBTestCompactionFilterWithCompactOption,
|
||||||
|
DBTestCompactionFilterWithCompactParam,
|
||||||
|
::testing::Values(DBTestBase::OptionConfig::kDefault));
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
class KeepFilter : public CompactionFilter {
|
class KeepFilter : public CompactionFilter {
|
||||||
public:
|
public:
|
||||||
|
@ -251,6 +251,7 @@ const SstFileMetaData* PickFileRandomly(
|
|||||||
}
|
}
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
// All the TEST_P tests run once with sub_compactions disabled (i.e.
|
// All the TEST_P tests run once with sub_compactions disabled (i.e.
|
||||||
// options.max_subcompactions = 1) and once with it enabled
|
// options.max_subcompactions = 1) and once with it enabled
|
||||||
TEST_P(DBCompactionTestWithParam, CompactionDeletionTrigger) {
|
TEST_P(DBCompactionTestWithParam, CompactionDeletionTrigger) {
|
||||||
@ -293,6 +294,7 @@ TEST_P(DBCompactionTestWithParam, CompactionDeletionTrigger) {
|
|||||||
ASSERT_GT(db_size[0] / 3, db_size[1]);
|
ASSERT_GT(db_size[0] / 3, db_size[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_P(DBCompactionTestWithParam, CompactionsPreserveDeletes) {
|
TEST_P(DBCompactionTestWithParam, CompactionsPreserveDeletes) {
|
||||||
// For each options type we test following
|
// For each options type we test following
|
||||||
|
@ -2561,6 +2561,7 @@ class ModelDB : public DB {
|
|||||||
std::string name_ = "";
|
std::string name_ = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
static std::string RandomKey(Random* rnd, int minimum = 0) {
|
static std::string RandomKey(Random* rnd, int minimum = 0) {
|
||||||
int len;
|
int len;
|
||||||
do {
|
do {
|
||||||
@ -2717,6 +2718,7 @@ TEST_P(DBTestRandomized, Randomized) {
|
|||||||
if (model_snap != nullptr) model.ReleaseSnapshot(model_snap);
|
if (model_snap != nullptr) model.ReleaseSnapshot(model_snap);
|
||||||
if (db_snap != nullptr) db_->ReleaseSnapshot(db_snap);
|
if (db_snap != nullptr) db_->ReleaseSnapshot(db_snap);
|
||||||
}
|
}
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_F(DBTest, BlockBasedTablePrefixIndexTest) {
|
TEST_F(DBTest, BlockBasedTablePrefixIndexTest) {
|
||||||
// create a DB with block prefix index
|
// create a DB with block prefix index
|
||||||
|
@ -662,7 +662,7 @@ TEST_P(DBTestUniversalCompaction, UniversalCompactionTargetLevel) {
|
|||||||
ASSERT_EQ("0,0,0,0,1", FilesPerLevel(0));
|
ASSERT_EQ("0,0,0,0,1", FilesPerLevel(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
class DBTestUniversalCompactionMultiLevels
|
class DBTestUniversalCompactionMultiLevels
|
||||||
: public DBTestUniversalCompactionBase {
|
: public DBTestUniversalCompactionBase {
|
||||||
public:
|
public:
|
||||||
@ -698,6 +698,7 @@ TEST_P(DBTestUniversalCompactionMultiLevels, UniversalCompactionMultiLevels) {
|
|||||||
ASSERT_EQ(Get(1, Key(i % num_keys)), Key(i));
|
ASSERT_EQ(Get(1, Key(i % num_keys)), Key(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests universal compaction with trivial move enabled
|
// Tests universal compaction with trivial move enabled
|
||||||
TEST_P(DBTestUniversalCompactionMultiLevels, UniversalCompactionTrivialMove) {
|
TEST_P(DBTestUniversalCompactionMultiLevels, UniversalCompactionTrivialMove) {
|
||||||
int32_t trivial_move = 0;
|
int32_t trivial_move = 0;
|
||||||
@ -940,6 +941,7 @@ INSTANTIATE_TEST_CASE_P(DBTestUniversalCompactionParallel,
|
|||||||
DBTestUniversalCompactionParallel,
|
DBTestUniversalCompactionParallel,
|
||||||
::testing::Combine(::testing::Values(1, 10),
|
::testing::Combine(::testing::Values(1, 10),
|
||||||
::testing::Values(false)));
|
::testing::Values(false)));
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_P(DBTestUniversalCompaction, UniversalCompactionOptions) {
|
TEST_P(DBTestUniversalCompaction, UniversalCompactionOptions) {
|
||||||
Options options = CurrentOptions();
|
Options options = CurrentOptions();
|
||||||
@ -1155,6 +1157,7 @@ TEST_P(DBTestUniversalCompaction, UniversalCompactionCompressRatio2) {
|
|||||||
ASSERT_LT(TotalSize(), 120000U * 12 * 0.8 + 120000 * 2);
|
ASSERT_LT(TotalSize(), 120000U * 12 * 0.8 + 120000 * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
// Test that checks trivial move in universal compaction
|
// Test that checks trivial move in universal compaction
|
||||||
TEST_P(DBTestUniversalCompaction, UniversalCompactionTrivialMoveTest1) {
|
TEST_P(DBTestUniversalCompaction, UniversalCompactionTrivialMoveTest1) {
|
||||||
int32_t trivial_move = 0;
|
int32_t trivial_move = 0;
|
||||||
@ -1247,6 +1250,7 @@ TEST_P(DBTestUniversalCompaction, UniversalCompactionTrivialMoveTest2) {
|
|||||||
|
|
||||||
rocksdb::SyncPoint::GetInstance()->DisableProcessing();
|
rocksdb::SyncPoint::GetInstance()->DisableProcessing();
|
||||||
}
|
}
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_P(DBTestUniversalCompaction, UniversalCompactionFourPaths) {
|
TEST_P(DBTestUniversalCompaction, UniversalCompactionFourPaths) {
|
||||||
Options options = CurrentOptions();
|
Options options = CurrentOptions();
|
||||||
|
@ -309,6 +309,7 @@ TEST_F(InlineSkipTest, InsertWithHint_CompatibleWithInsertWithoutHint) {
|
|||||||
Validate(&list);
|
Validate(&list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
// We want to make sure that with a single writer and multiple
|
// We want to make sure that with a single writer and multiple
|
||||||
// concurrent readers (with no synchronization other than when a
|
// concurrent readers (with no synchronization other than when a
|
||||||
// reader's iterator is created), the reader always observes all the
|
// reader's iterator is created), the reader always observes all the
|
||||||
@ -635,6 +636,7 @@ TEST_F(InlineSkipTest, ConcurrentInsert1) { RunConcurrentInsert(1); }
|
|||||||
TEST_F(InlineSkipTest, ConcurrentInsert2) { RunConcurrentInsert(2); }
|
TEST_F(InlineSkipTest, ConcurrentInsert2) { RunConcurrentInsert(2); }
|
||||||
TEST_F(InlineSkipTest, ConcurrentInsert3) { RunConcurrentInsert(3); }
|
TEST_F(InlineSkipTest, ConcurrentInsert3) { RunConcurrentInsert(3); }
|
||||||
|
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
@ -157,7 +157,7 @@ TEST_F(PersistentCacheTierTest, DISABLED_BlockCacheInsertWithFileCreateError) {
|
|||||||
rocksdb::SyncPoint::GetInstance()->ClearAllCallBacks();
|
rocksdb::SyncPoint::GetInstance()->ClearAllCallBacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRAVIS
|
#if defined(TRAVIS) || defined(ROCKSDB_VALGRIND_RUN)
|
||||||
// Travis is unable to handle the normal version of the tests running out of
|
// Travis is unable to handle the normal version of the tests running out of
|
||||||
// fds, out of space and timeouts. This is an easier version of the test
|
// fds, out of space and timeouts. This is an easier version of the test
|
||||||
// specifically written for Travis
|
// specifically written for Travis
|
||||||
@ -435,7 +435,7 @@ void PersistentCacheDBTest::RunTest(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRAVIS
|
#if defined(TRAVIS) || defined(ROCKSDB_VALGRIND_RUN)
|
||||||
// Travis is unable to handle the normal version of the tests running out of
|
// Travis is unable to handle the normal version of the tests running out of
|
||||||
// fds, out of space and timeouts. This is an easier version of the test
|
// fds, out of space and timeouts. This is an easier version of the test
|
||||||
// specifically written for Travis
|
// specifically written for Travis
|
||||||
|
@ -50,6 +50,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
StackableDBAsBaseDB, TransactionTest,
|
StackableDBAsBaseDB, TransactionTest,
|
||||||
::testing::Values(std::make_tuple(true, true, WRITE_COMMITTED),
|
::testing::Values(std::make_tuple(true, true, WRITE_COMMITTED),
|
||||||
std::make_tuple(true, true, WRITE_PREPARED)));
|
std::make_tuple(true, true, WRITE_PREPARED)));
|
||||||
|
|
||||||
|
// MySQLStyleTransactionTest takes far too long for valgrind to run.
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MySQLStyleTransactionTest, MySQLStyleTransactionTest,
|
MySQLStyleTransactionTest, MySQLStyleTransactionTest,
|
||||||
::testing::Values(std::make_tuple(false, false, WRITE_COMMITTED),
|
::testing::Values(std::make_tuple(false, false, WRITE_COMMITTED),
|
||||||
@ -60,6 +63,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
std::make_tuple(false, true, WRITE_PREPARED),
|
std::make_tuple(false, true, WRITE_PREPARED),
|
||||||
std::make_tuple(true, false, WRITE_PREPARED),
|
std::make_tuple(true, false, WRITE_PREPARED),
|
||||||
std::make_tuple(true, true, WRITE_PREPARED)));
|
std::make_tuple(true, true, WRITE_PREPARED)));
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_P(TransactionTest, DoubleEmptyWrite) {
|
TEST_P(TransactionTest, DoubleEmptyWrite) {
|
||||||
WriteOptions write_options;
|
WriteOptions write_options;
|
||||||
@ -4803,6 +4807,7 @@ TEST_P(TransactionTest, ExpiredTransactionDataRace1) {
|
|||||||
rocksdb::SyncPoint::GetInstance()->DisableProcessing();
|
rocksdb::SyncPoint::GetInstance()->DisableProcessing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
namespace {
|
namespace {
|
||||||
Status TransactionStressTestInserter(TransactionDB* db,
|
Status TransactionStressTestInserter(TransactionDB* db,
|
||||||
const size_t num_transactions,
|
const size_t num_transactions,
|
||||||
@ -4890,6 +4895,7 @@ TEST_P(MySQLStyleTransactionTest, TransactionStressTest) {
|
|||||||
!TAKE_SNAPSHOT);
|
!TAKE_SNAPSHOT);
|
||||||
ASSERT_OK(s);
|
ASSERT_OK(s);
|
||||||
}
|
}
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_P(TransactionTest, MemoryLimitTest) {
|
TEST_P(TransactionTest, MemoryLimitTest) {
|
||||||
TransactionOptions txn_options;
|
TransactionOptions txn_options;
|
||||||
|
@ -521,6 +521,7 @@ class WritePreparedTransactionTest
|
|||||||
std::get<2>(GetParam())){};
|
std::get<2>(GetParam())){};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
class SnapshotConcurrentAccessTest
|
class SnapshotConcurrentAccessTest
|
||||||
: public WritePreparedTransactionTestBase,
|
: public WritePreparedTransactionTestBase,
|
||||||
virtual public ::testing::WithParamInterface<
|
virtual public ::testing::WithParamInterface<
|
||||||
@ -539,6 +540,7 @@ class SnapshotConcurrentAccessTest
|
|||||||
size_t split_id_;
|
size_t split_id_;
|
||||||
size_t split_cnt_;
|
size_t split_cnt_;
|
||||||
};
|
};
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
class SeqAdvanceConcurrentTest
|
class SeqAdvanceConcurrentTest
|
||||||
: public WritePreparedTransactionTestBase,
|
: public WritePreparedTransactionTestBase,
|
||||||
@ -564,6 +566,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
::testing::Values(std::make_tuple(false, false, WRITE_PREPARED),
|
::testing::Values(std::make_tuple(false, false, WRITE_PREPARED),
|
||||||
std::make_tuple(false, true, WRITE_PREPARED)));
|
std::make_tuple(false, true, WRITE_PREPARED)));
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
TwoWriteQueues, SnapshotConcurrentAccessTest,
|
TwoWriteQueues, SnapshotConcurrentAccessTest,
|
||||||
::testing::Values(std::make_tuple(false, true, WRITE_PREPARED, 0, 20),
|
::testing::Values(std::make_tuple(false, true, WRITE_PREPARED, 0, 20),
|
||||||
@ -635,6 +638,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
std::make_tuple(false, false, WRITE_PREPARED, 7, 10),
|
std::make_tuple(false, false, WRITE_PREPARED, 7, 10),
|
||||||
std::make_tuple(false, false, WRITE_PREPARED, 8, 10),
|
std::make_tuple(false, false, WRITE_PREPARED, 8, 10),
|
||||||
std::make_tuple(false, false, WRITE_PREPARED, 9, 10)));
|
std::make_tuple(false, false, WRITE_PREPARED, 9, 10)));
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
|
|
||||||
TEST_P(WritePreparedTransactionTest, CommitMapTest) {
|
TEST_P(WritePreparedTransactionTest, CommitMapTest) {
|
||||||
WritePreparedTxnDB* wp_db = dynamic_cast<WritePreparedTxnDB*>(db);
|
WritePreparedTxnDB* wp_db = dynamic_cast<WritePreparedTxnDB*>(db);
|
||||||
@ -841,6 +845,7 @@ TEST_P(WritePreparedTransactionTest, CheckAgainstSnapshotsTest) {
|
|||||||
|
|
||||||
// This test is too slow for travis
|
// This test is too slow for travis
|
||||||
#ifndef TRAVIS
|
#ifndef TRAVIS
|
||||||
|
#ifndef ROCKSDB_VALGRIND_RUN
|
||||||
// Test that CheckAgainstSnapshots will not miss a live snapshot if it is run in
|
// Test that CheckAgainstSnapshots will not miss a live snapshot if it is run in
|
||||||
// parallel with UpdateSnapshots.
|
// parallel with UpdateSnapshots.
|
||||||
TEST_P(SnapshotConcurrentAccessTest, SnapshotConcurrentAccessTest) {
|
TEST_P(SnapshotConcurrentAccessTest, SnapshotConcurrentAccessTest) {
|
||||||
@ -919,6 +924,7 @@ TEST_P(SnapshotConcurrentAccessTest, SnapshotConcurrentAccessTest) {
|
|||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
#endif // ROCKSDB_VALGRIND_RUN
|
||||||
#endif // TRAVIS
|
#endif // TRAVIS
|
||||||
|
|
||||||
// This test clarifies the contract of AdvanceMaxEvictedSeq method
|
// This test clarifies the contract of AdvanceMaxEvictedSeq method
|
||||||
|
Loading…
Reference in New Issue
Block a user