Skip to content

Commit

Permalink
ceph_test_objectstore: test unprintable chars
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Oct 17, 2016
1 parent d620aad commit 91c1a22
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/test/objectstore/store_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,37 @@ TEST_P(StoreTest, IORemount) {
}
}

TEST_P(StoreTest, UnprintableCharsName) {
ObjectStore::Sequencer osr("test");
coll_t cid;
string name = "funnychars_";
for (unsigned i = 0; i < 256; ++i) {
name.push_back(i);
}
ghobject_t oid(hobject_t(sobject_t(name, CEPH_NOSNAP)));
int r;
{
cerr << "create collection + object" << std::endl;
ObjectStore::Transaction t;
t.create_collection(cid, 0);
t.touch(cid, oid);
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
}
r = store->umount();
ASSERT_EQ(0, r);
r = store->mount();
ASSERT_EQ(0, r);
{
cout << "removing" << std::endl;
ObjectStore::Transaction t;
t.remove(cid, oid);
t.remove_collection(cid);
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
}
}

TEST_P(StoreTest, FiemapEmpty) {
ObjectStore::Sequencer osr("test");
coll_t cid;
Expand Down

0 comments on commit 91c1a22

Please sign in to comment.