]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/osd: Add scrub to osd test fixtures 68878/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Sun, 3 May 2026 16:46:00 +0000 (17:46 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Mon, 29 Jun 2026 15:27:15 +0000 (16:27 +0100)
commitd46aea099ef134fda8f26737d517ddc78886c76f
tree12da4f9ff93599f5d57dd03ba00416514e8c59dd
parent7163b736cd645c2b93ca446e6beb5905f14319d0
test/osd: Add scrub to osd test fixtures

Add scrubbing functionality to the OSD test fixtures to enable testing
of scrub behavior on erasure-coded pools. This implementation uses as
much of the scrub backend as possible, but avoids using pg_scrubber or
the interaction with peering due to the complexity of the dependency on
PG.

Changes:
- Add scrub_object() method to PGBackendTestFixture for testing scrub
  functionality on EC pools
- Add create_random_buffer() utility for generating random test data
- Add corrupt_shard_data() method to intentionally corrupt shard data
  for testing scrub detection
- Add MockScrubBeListener, MockPgScrubBeListener, MockSnapMapReader, and
  MockLoggerSinkSet mock classes to support scrub testing
- Add three new test cases: ScrubClean, ScrubDetectsCorruption, and
  ScrubPartialWrite to verify scrub behavior with clean data, corrupted
  data, and partial writes

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
# Conflicts:
# src/test/osd/TestECFailoverWithPeering.cc
src/test/osd/PGBackendTestFixture.cc
src/test/osd/PGBackendTestFixture.h
src/test/osd/ScrubTestFixture.h [new file with mode: 0644]
src/test/osd/TestBackendBasics.cc
src/test/osd/TestECFailoverWithPeering.cc