test: check whether add_block_device success

Signed-off-by: shiqi <1454927420@qq.com>
This commit is contained in:
shiqi 2017-03-17 17:26:31 +08:00
parent 8be51d0c9e
commit 1a4314a445

View File

@ -48,9 +48,9 @@ TEST(BlueFS, mkfs) {
string fn = get_temp_bdev(size);
uuid_d fsid;
BlueFS fs(g_ceph_context);
fs.add_block_device(BlueFS::BDEV_DB, fn);
ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, fn));
fs.add_block_extent(BlueFS::BDEV_DB, 1048576, size - 1048576);
fs.mkfs(fsid);
ASSERT_EQ(0, fs.mkfs(fsid));
rm_temp_bdev(fn);
}