]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/librados_test_stub: unbreak selfmanaged_snap_rollback()
authorIlya Dryomov <idryomov@gmail.com>
Sun, 16 Jun 2024 18:40:31 +0000 (20:40 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 12 Jul 2024 21:14:13 +0000 (23:14 +0200)
commit154cc19ae6581b4b29cd9f2e8e3edcfa004279c4
treee238a65e938b4d6282e46ed04e985f5065aa653e
parentbd807b2f65f98df7b7b5482563dd11e6f164f5ea
test/librados_test_stub: unbreak selfmanaged_snap_rollback()

After the rollback assert in TestGroup.add_snapshot{,PP} was made
meaningful in the previous commit, it fails in mock tests which means
that rollback has never been exercised properly...

While I confess to not following file->snap_id == CEPH_NOSNAP branch
especially given how file variable is shadowed, it's pretty clear that
get_snap_read() doesn't belong here -- the snapshot selected for reads
has nothing to do with rollback.  Replacing it with the rollback snap
ID makes sense of the other branches and makes the tests in question
pass.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 91a06323549c3c68aa56e79fec21d6a7dcb62cc9)
src/test/librados_test_stub/TestMemIoCtxImpl.cc