Skip to content

Commit

Permalink
Add missing tests, fix db_sanity
Browse files Browse the repository at this point in the history
 Add heap_test, merge_helper_test
 Fix uninitialized pointers in db_sanity_test that cause SIGSEV when DB::Open fails in case compression is not linked.
  • Loading branch information
yuslepukhin committed Jul 22, 2015
1 parent 66a3cbc commit 31b35c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ set(TESTS
db/log_test.cc
db/memtable_list_test.cc
db/merge_test.cc
db/merge_helper_test.cc
db/perf_context_test.cc
db/plain_table_db_test.cc
db/prefix_test.cc
Expand Down Expand Up @@ -307,6 +308,7 @@ set(TESTS
util/event_logger_test.cc
util/filelock_test.cc
util/file_reader_writer_test.cc
util/heap_test.cc
util/histogram_test.cc
util/manual_compaction_test.cc
util/memenv_test.cc
Expand Down
4 changes: 2 additions & 2 deletions tools/db_sanity_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SanityTest {
options.create_if_missing = true;
std::string dbname = path_ + Name();
DestroyDB(dbname, options);
DB* db;
DB* db = nullptr;
Status s = DB::Open(options, dbname, &db);
std::unique_ptr<DB> db_guard(db);
if (!s.ok()) {
Expand All @@ -55,7 +55,7 @@ class SanityTest {
return db->Flush(FlushOptions());
}
Status Verify() {
DB* db;
DB* db = nullptr;
std::string dbname = path_ + Name();
Status s = DB::Open(GetOptions(), dbname, &db);
std::unique_ptr<DB> db_guard(db);
Expand Down

0 comments on commit 31b35c9

Please sign in to comment.