]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/bufferlist: assert the rebuild in rebuild_aligned_size_and_memory() actually...
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 19 Jan 2022 21:56:05 +0000 (21:56 +0000)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Tue, 10 May 2022 12:28:03 +0000 (14:28 +0200)
commit420aea6b38be36ff4f401cdb76bd108b5ab49538
treeafffb6ddcbd8a3d6b90d39c52202abada9be1f3a
parent73636a1b00037ff974bcdc969b009c5ecec626cc
test/bufferlist: assert the rebuild in rebuild_aligned_size_and_memory() actually happens.

For the investigation of failures like the following one:

```
[ RUN      ] BufferList.rebuild_aligned_size_and_memory
../src/test/bufferlist.cc:1865: Failure
Expected equality of these values:
  bl.get_num_buffers()
    Which is: 2
  1
[  FAILED  ] BufferList.rebuild_aligned_size_and_memory (0 ms)
```

The test case assumes the rebuild before the failed clause **always**
happens while `bufferlist::rebuild_aligned_size_and_memory()` skips it
if buffers are already aligned.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit 2de5f17647437d8f67adfe79becbb0e280f7f26f)
src/test/bufferlist.cc