]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
test/librbd: add DiffIterateTest.DiffIterateDeterministic{,PP}
authorIlya Dryomov <idryomov@gmail.com>
Wed, 29 Nov 2023 11:28:51 +0000 (12:28 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 11 Dec 2023 11:56:09 +0000 (12:56 +0100)
commit07be0851675be06d3d7e8f60c1d739a126ceef95
treed0d8599f71c3bf3a749107c6ca9502e77fe6c062
parent71b88b5875a5d5caa28e52ddff9d4ea718865095
test/librbd: add DiffIterateTest.DiffIterateDeterministic{,PP}

scribble()-based DiffIterate tests are too weak: at least two
regressions that should been caught by DiffIterate.DiffIterate or
DiffIterate.DiffIterateStress were missed [1][2].  Aside from the
randomness which can be both a good and a bad thing, asserts there
ensure only that the returned diff covers all changes that were made.
If the returned diff is too excessive or otherwise bogus, this isn't
detected [3].

Add a deterministic test to systematically cover the most common cases
that don't involve discards.  A similar test for discards will be added
with the fix for [4].

Comment out debug log in vector_iterate_cb() like it's done in
iterate_cb().

[1] https://tracker.ceph.com/issues/50787
[2] https://tracker.ceph.com/issues/63654
[3] https://tracker.ceph.com/issues/63719
[4] https://tracker.ceph.com/issues/53897

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit f5e3f263724d04be181225d9e24cbe2f4669e8bc)
src/test/librbd/test_librbd.cc