]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: don't unmount when no store is created 5679/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 27 Aug 2015 04:27:52 +0000 (12:27 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 27 Aug 2015 04:27:52 +0000 (12:27 +0800)
When store is not created in SetUp for some reasons, unmounting it would
lead to segment fault.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/test/objectstore/store_test.cc

index 94c4bb3ce7cb353038a690118ea73299b8af91c7..7cb07664e1fd02cb986fa1fe33ea909e5b838804 100644 (file)
@@ -65,7 +65,8 @@ public:
   }
 
   virtual void TearDown() {
-    store->umount();
+    if (store)
+      store->umount();
   }
 };