]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Add unittests for safe sharing and make_shareable() 3123/head
authorMatt Benjamin <matt@cohortfs.com>
Wed, 10 Dec 2014 17:31:12 +0000 (12:31 -0500)
committerMatt Benjamin <matt@cohortfs.com>
Thu, 11 Dec 2014 00:13:08 +0000 (19:13 -0500)
commit370bb96773575c4b2b9cd1b341c52673d117cdc6
treec93765bc2f557377b32de8b2d94ed2453bfb6a80
parent6a45d7576b9957d8563d51c9354925b3d19320e2
Add unittests for safe sharing and make_shareable()

Checks the following assertions:

1. a bufferlist shared with buffer::list::share yields shared
raw memory

2. a bufferlist copied with buffer::list::list(const list&) yields
shared raw memory

3. an unshareable bufferlist (bufferlist with unshareable segments)
copied with buffer::list::list(const list&) yields unshared raw
memory

4. an unshareable bufferlist claimed with CLAIM_ALLOW_NONSHAREABLE
yields shared raw memory

Signed-off-by: Matt Benjamin <matt@cohortfs.com>
src/test/bufferlist.cc