diff options
author | Samuel Just <sam.just@inktank.com> | 2013-05-16 13:00:32 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-05-16 15:46:11 -0700 |
commit | 9b9d322c20e4d3cfa5d40023cd28c020068178f1 (patch) | |
tree | 208388fe986ec1c0b9ebe22f8febed87d218b854 | |
parent | 5a27e85cf1b4af6e3ae5a276ad866d04e0b8f812 (diff) | |
download | ceph-9b9d322c20e4d3cfa5d40023cd28c020068178f1.tar.gz |
test_filestore_idempotent_sequence: unmount prior to deleting store
FileStoreDiff umounts the stores in its destructor.
Also, DeterministicOpSequence handles deletes its passed
object store.
Fixes: #5076
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
-rw-r--r-- | src/test/filestore/test_idempotent_sequence.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/test/filestore/test_idempotent_sequence.cc b/src/test/filestore/test_idempotent_sequence.cc index d8f8c33ab51..3ef2c79987d 100644 --- a/src/test/filestore/test_idempotent_sequence.cc +++ b/src/test/filestore/test_idempotent_sequence.cc @@ -82,13 +82,15 @@ int run_diff(std::string& a_path, std::string& a_journal, FileStore *a = new FileStore(a_path, a_journal, "a"); FileStore *b = new FileStore(b_path, b_journal, "b"); - FileStoreDiff fsd(a, b); int ret = 0; - if (fsd.diff()) { - dout(0) << "diff found an difference" << dendl; - ret = -1; - } else { - dout(0) << "no diff" << dendl; + { + FileStoreDiff fsd(a, b); + if (fsd.diff()) { + dout(0) << "diff found an difference" << dendl; + ret = -1; + } else { + dout(0) << "no diff" << dendl; + } } delete a; @@ -102,6 +104,7 @@ int run_get_last_op(std::string& filestore_path, std::string& journal_path) int err = store->mount(); if (err) { + store->umount(); delete store; return err; } @@ -139,6 +142,7 @@ int run_sequence_to(int val, std::string& filestore_path, err = ::mkdir(filestore_path.c_str(), 0755); if (err) { cerr << filestore_path << " already exists" << std::endl; + store->umount(); delete store; return err; } @@ -153,8 +157,6 @@ int run_sequence_to(int val, std::string& filestore_path, op_sequence.init(num_colls, num_objs); op_sequence.generate(seed, num_txs); store->umount(); - - delete store; return 0; } |