]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test/bufferlist: do not expect !is_page_aligned() after unaligned rebuild 8272/head
authorKefu Chai <kchai@redhat.com>
Thu, 3 Sep 2015 17:23:31 +0000 (01:23 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Wed, 23 Mar 2016 06:24:02 +0000 (14:24 +0800)
commit744e9f837a94f95c5e877f074fd1479f8da64e3c
tree42ef9a13a989ea1f0c9df53207ff2ca89441360c
parent0418943c6ef8c9649a58003444daeb4b6224fbab
test/bufferlist: do not expect !is_page_aligned() after unaligned rebuild

if the size of a bufferlist is page aligned we allocate page aligned
memory chunk for it when rebuild() is called. otherwise we just call
the plain new() to allocate new memory chunk for holding the continuous
buffer. but we should not expect that `new` allocator always returns
unaligned memory chunks. instead, it *could* return page aligned
memory chunk as long as the allocator feels appropriate. so, the
`EXPECT_FALSE(bl.is_page_aligned())` after the `rebuild()` call is
removed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 8ed724222651812c2ee8cc3804dc1f54c973897d)
src/test/bufferlist.cc