]> 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)
committerCasey Bodley <cbodley@redhat.com>
Thu, 3 Feb 2022 19:06:35 +0000 (14:06 -0500)
commit853922056e898b5e7d12fcd3ee2df30d3172de50
tree8570371b296f8030e327e2f535348e9807d667ba
parent77865d8d813febfd90921cf43ca83d09657faa1c
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