From: Jianpeng Ma Date: Tue, 15 Mar 2016 09:11:38 +0000 (+0800) Subject: test/objectstore: add test cache "offset=length=0". X-Git-Tag: v10.1.0~53^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1785f917cd6d95b50f60e664c2c874ce3a379dec;p=ceph.git test/objectstore: add test cache "offset=length=0". Signed-off-by: Jianpeng Ma --- diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 36cb2aeb8089..f9396c439d17 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -525,6 +525,17 @@ TEST_P(StoreTest, SimpleObjectTest) { in.hexdump(cout); ASSERT_TRUE(in.contents_equal(bl)); } + { + bufferlist bl; + bl.append("abcde01234012340123401234abcde01234012340123401234abcde01234012340123401234abcde01234012340123401234"); + + //test: offset=len=0 mean read all data + bufferlist in; + r = store->read(cid, hoid, 0, 0, in); + ASSERT_EQ((int)bl.length(), r); + in.hexdump(cout); + ASSERT_TRUE(in.contents_equal(bl)); + } { ObjectStore::Transaction t; t.remove(cid, hoid);