summaryrefslogtreecommitdiffstats
path: root/src/test/filestore
diff options
context:
space:
mode:
authorDavid Zafman <david.zafman@inktank.com>2013-06-11 03:18:59 +0200
committerDavid Zafman <david.zafman@inktank.com>2013-07-09 23:09:02 +0200
commite761e4e55f4b5ff32bde90a260d098add53da429 (patch)
treef1b8da33d90534b5aa8068b692e65430da98d755 /src/test/filestore
parentos: Add missing pool to hobject_t:::dump() and hobject_t::decode() (diff)
downloadceph-e761e4e55f4b5ff32bde90a260d098add53da429.tar.xz
ceph-e761e4e55f4b5ff32bde90a260d098add53da429.zip
librados, os, osd, osdc, test: Add support for client specified namespaces
Add rados_ioctx_namespace_set_key() and librados::IoCtx::namespace_set_key() Add namespace to admin-daemon operations Support namespace in osd map command Add namespace to object_locator_t and hobject_t Add random namespaces to psim program Feature: #4982 (OSD: namespaces pt 1 (librados/osd, not caps)) Signed-off-by: David Zafman <david.zafman@inktank.com>
Diffstat (limited to 'src/test/filestore')
-rw-r--r--src/test/filestore/store_test.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/test/filestore/store_test.cc b/src/test/filestore/store_test.cc
index abc5c5f1170..87482ef702d 100644
--- a/src/test/filestore/store_test.cc
+++ b/src/test/filestore/store_test.cc
@@ -283,7 +283,7 @@ public:
// hash
//boost::binomial_distribution<uint32_t> bin(0xFFFFFF, 0.5);
++seq;
- return hobject_t(name, string(), rand() & 2 ? CEPH_NOSNAP : rand(), rand() & 0xFF, 0);
+ return hobject_t(name, string(), rand() & 2 ? CEPH_NOSNAP : rand(), rand() & 0xFF, 0, "");
}
};
@@ -506,13 +506,16 @@ TEST_F(StoreTest, HashCollisionTest) {
string base = "";
for (int i = 0; i < 100; ++i) base.append("aaaaa");
set<hobject_t> created;
+ for (int n = 0; n < 10; ++n) {
+ char nbuf[100];
+ sprintf(nbuf, "n%d", n);
for (int i = 0; i < 1000; ++i) {
char buf[100];
sprintf(buf, "%d", i);
if (!(i % 5)) {
- cerr << "Object " << i << std::endl;
+ cerr << "Object n" << n << " "<< i << std::endl;
}
- hobject_t hoid(string(buf) + base, string(), CEPH_NOSNAP, 0, 0);
+ hobject_t hoid(string(buf) + base, string(), CEPH_NOSNAP, 0, 0, string(nbuf));
{
ObjectStore::Transaction t;
t.touch(cid, hoid);
@@ -521,6 +524,7 @@ TEST_F(StoreTest, HashCollisionTest) {
}
created.insert(hoid);
}
+ }
vector<hobject_t> objects;
r = store->collection_list(cid, objects);
ASSERT_EQ(r, 0);
@@ -572,7 +576,7 @@ TEST_F(StoreTest, HashCollisionTest) {
TEST_F(StoreTest, OMapTest) {
coll_t cid("blah");
- hobject_t hoid("tesomap", "", CEPH_NOSNAP, 0, 0);
+ hobject_t hoid("tesomap", "", CEPH_NOSNAP, 0, 0, "");
int r;
{
ObjectStore::Transaction t;
@@ -668,7 +672,7 @@ TEST_F(StoreTest, OMapTest) {
TEST_F(StoreTest, XattrTest) {
coll_t cid("blah");
- hobject_t hoid("tesomap", "", CEPH_NOSNAP, 0, 0);
+ hobject_t hoid("tesomap", "", CEPH_NOSNAP, 0, 0, "");
bufferlist big;
for (unsigned i = 0; i < 10000; ++i) {
big.append('\0');
@@ -770,7 +774,7 @@ void colsplittest(
"",
CEPH_NOSNAP,
i<<common_suffix_size,
- 0));
+ 0, ""));
}
r = store->apply_transaction(t);
ASSERT_EQ(r, 0);