From: Samuel Just Date: Thu, 16 May 2013 20:00:32 +0000 (-0700) Subject: test_filestore_idempotent_sequence: unmount prior to deleting store X-Git-Tag: v0.63~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b9d322c20e4d3cfa5d40023cd28c020068178f1;p=ceph.git 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 Reviewed-by: David Zafman --- diff --git a/src/test/filestore/test_idempotent_sequence.cc b/src/test/filestore/test_idempotent_sequence.cc index d8f8c33ab516..3ef2c79987d8 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; }