]> git.apps.os.sepia.ceph.com Git - ceph.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>
Tue, 5 Dec 2023 15:58:32 +0000 (16:58 +0100)
commitf5e3f263724d04be181225d9e24cbe2f4669e8bc
tree76e3b4548707b4b13361b639a5bfd66b95807985
parent0a1f633e0240b4a7cfbcddd96d53fbf4b17f0b28
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>
src/test/librbd/test_librbd.cc