From: Ilya Dryomov Date: Sun, 10 Dec 2023 16:01:24 +0000 (+0100) Subject: test/pybind/rbd: don't ignore from_snapshot in check_diff() X-Git-Tag: v17.2.8~615^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F54950%2Fhead;p=ceph.git test/pybind/rbd: don't ignore from_snapshot in check_diff() Despite the test in test_diff_iterate() being correct, it started failing: > check_diff(self.image, 0, IMG_SIZE, 'snap1', [(0, 512, False)]) ... a = [], b = [(0, 512, False)] ... > assert a == b E AssertionError This is because check_diff() drops 'snap1' argument on the floor and passes None to image.diff_iterate() instead. This goes back to 2013, see commit e88fe3cbbc8f ("rbd.py: add some missing functions"). Signed-off-by: Ilya Dryomov (cherry picked from commit f8ced6d1fe667864bee224104c23b62a2c1c0bfc) --- diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py index d1f4d70ecbd2..9752e9424a91 100644 --- a/src/test/pybind/test_rbd.py +++ b/src/test/pybind/test_rbd.py @@ -1437,7 +1437,7 @@ def check_diff(image, offset, length, from_snapshot, expected): extents = [] def cb(offset, length, exists): extents.append((offset, length, exists)) - image.diff_iterate(0, IMG_SIZE, None, cb) + image.diff_iterate(0, IMG_SIZE, from_snapshot, cb) eq(extents, expected) class TestClone(object):