Merge pull request #14013 from ShiqiCooperation/newshiqi

test/unittest_bluefs: check whether add_block_device success

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-03-24 13:12:16 -05:00 committed by GitHub
commit 3283b284f8

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);
}