Skip to content

Commit

Permalink
Merge pull request #10910 from liewegas/wip-bluestore-statfs
Browse files Browse the repository at this point in the history
os/bluestore: fix statfs tests

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
  • Loading branch information
Igor Fedotov committed Aug 30, 2016
2 parents 3c5e021 + 128b95a commit 5a7b9ee
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/test/objectstore/store_test.cc
Expand Up @@ -1123,6 +1123,7 @@ TEST_P(StoreTest, BluestoreStatFSTest) {
if(string(GetParam()) != "bluestore")
return;
g_conf->set_val("bluestore_compression", "force");
g_conf->set_val("bluestore_min_alloc_size", "65536");
g_ceph_context->_conf->apply_changes(NULL);

ObjectStore::Sequencer osr("test");
Expand Down Expand Up @@ -1154,7 +1155,6 @@ TEST_P(StoreTest, BluestoreStatFSTest) {
exists = store->exists(cid, hoid);
ASSERT_EQ(true, exists);
}
uint64_t available0 = 0;
{
struct store_statfs_t statfs;
int r = store->statfs(&statfs);
Expand All @@ -1166,7 +1166,6 @@ TEST_P(StoreTest, BluestoreStatFSTest) {
//force fsck
EXPECT_EQ(store->umount(), 0);
EXPECT_EQ(store->mount(), 0);
available0 = statfs.available;
}
{
ObjectStore::Transaction t;
Expand All @@ -1182,7 +1181,6 @@ TEST_P(StoreTest, BluestoreStatFSTest) {
ASSERT_EQ(r, 0);
ASSERT_EQ(5, statfs.stored);
ASSERT_EQ(0x10000, statfs.allocated);
ASSERT_EQ(available0 - 0x10000, statfs.available);
ASSERT_EQ(0, statfs.compressed);
ASSERT_EQ(0, statfs.compressed_original);
ASSERT_EQ(0, statfs.compressed_allocated);
Expand All @@ -1205,7 +1203,6 @@ TEST_P(StoreTest, BluestoreStatFSTest) {
ASSERT_EQ(r, 0);
ASSERT_EQ(0x30005, statfs.stored);
ASSERT_EQ(0x20000, statfs.allocated);
ASSERT_EQ(available0 - 0x20000, statfs.available);
ASSERT_LE(statfs.compressed, 0x10000);
ASSERT_EQ(0x30000, statfs.compressed_original);
ASSERT_EQ(statfs.compressed_allocated, 0x10000);
Expand All @@ -1226,7 +1223,6 @@ TEST_P(StoreTest, BluestoreStatFSTest) {
ASSERT_EQ(r, 0);
ASSERT_EQ(0x30005 - 3 - 9, statfs.stored);
ASSERT_EQ(0x20000, statfs.allocated);
ASSERT_EQ(available0 - 0x20000, statfs.available);
ASSERT_LE(statfs.compressed, 0x10000);
ASSERT_EQ(0x30000 - 9, statfs.compressed_original);
ASSERT_EQ(statfs.compressed_allocated, 0x10000);
Expand All @@ -1250,7 +1246,6 @@ TEST_P(StoreTest, BluestoreStatFSTest) {
ASSERT_EQ(r, 0);
ASSERT_EQ(0x30001 - 9 + 0x1000, statfs.stored);
ASSERT_EQ(0x30000, statfs.allocated);
ASSERT_EQ(available0 - 0x30000, statfs.available);
ASSERT_LE(statfs.compressed, 0x10000);
ASSERT_EQ(0x30000 - 9 - 0x1000, statfs.compressed_original);
ASSERT_EQ(statfs.compressed_allocated, 0x10000);
Expand Down

0 comments on commit 5a7b9ee

Please sign in to comment.