Context
Audit on 2026-05-25 found that the *Block* production code is clean —
BlockStore / BlockDevice / BlockSequence consistently use block-layer
nouns, with FileBlockDevice correctly isolated as the one file-backed
adapter.
The BlockStore tests, however, leak file / File naming at the
fixture surface, in test names, and in inline comments. This perpetuates
the smell flagged in the project memory and makes readers think the tests
are exercising file I/O when they're verifying the BlockStore abstraction
over an injected BlockDevice.
Parent epic: #254
Scope
Three test files, no production changes:
-
Tests/SolidSyslogBlockStoreTest.cpp (~97 occurrences)
- Fixture member
struct SolidSyslogFile* file in BlockDeviceTestBase
(L70) → rename to device / blockDevice.
- ~13 test names containing
File/Files in the Rotation, Discard,
and Resume groups (L122, L407, L731, L739, L755, L773, L795, L813,
L877, L995, L1006, L1034, etc.) → rename to use Block.
- ~30
/* file 00 */ … /* file 02 */ block-index comments across
rotation/discard/resume tests → /* block NN */.
/* Resume from existing file */ (L310), /* File rotation */ (L684)
comment headers.
-
Tests/SolidSyslogBlockStorePosixTest.cpp
- Fixture member
file (L40) → device / blockDevice.
- Test name
DiscardOldestWhenReadIsPartwayThroughOldestFile (L112)
→ …OldestBlock.
- ~10
/* file NN */ block-index comments (L87, 91, 93, 126, 130, 134,
141, 144) → /* block NN */.
- Leave
CleanStoreFiles() (L15) and the L29–31 "real POSIX files"
doc-comment alone — those describe what the integration test actually
does on disk.
-
Tests/SolidSyslogBlockStoreDrainOrderingTest.cpp
- Fixture member
file and fileStorage (L116, L123).
- Comment header
/* Shared file / block-device / … */ (L107).
Out of scope: production code (already clean), FileBlockDevice tests
(file is the right noun there), and BlockSequence/BlockDevice/NullBlockDevice
tests (already clean).
Done when
- All
*Block* test files use block-layer nouns at the fixture surface
and in test names; file survives only where the concrete SolidSyslogFile
handle is being constructed.
- Block-index comments say
block not file.
- All tests still green under
cmake --build --preset debug --target junit.
Context
Audit on 2026-05-25 found that the
*Block*production code is clean —BlockStore / BlockDevice / BlockSequence consistently use block-layer
nouns, with
FileBlockDevicecorrectly isolated as the one file-backedadapter.
The BlockStore tests, however, leak
file/Filenaming at thefixture surface, in test names, and in inline comments. This perpetuates
the smell flagged in the project memory and makes readers think the tests
are exercising file I/O when they're verifying the BlockStore abstraction
over an injected BlockDevice.
Parent epic: #254
Scope
Three test files, no production changes:
Tests/SolidSyslogBlockStoreTest.cpp(~97 occurrences)struct SolidSyslogFile* fileinBlockDeviceTestBase(L70) → rename to
device/blockDevice.File/Filesin the Rotation, Discard,and Resume groups (L122, L407, L731, L739, L755, L773, L795, L813,
L877, L995, L1006, L1034, etc.) → rename to use
Block./* file 00 */ … /* file 02 */block-index comments acrossrotation/discard/resume tests →
/* block NN */./* Resume from existing file */(L310),/* File rotation */(L684)comment headers.
Tests/SolidSyslogBlockStorePosixTest.cppfile(L40) →device/blockDevice.DiscardOldestWhenReadIsPartwayThroughOldestFile(L112)→
…OldestBlock./* file NN */block-index comments (L87, 91, 93, 126, 130, 134,141, 144) →
/* block NN */.CleanStoreFiles()(L15) and the L29–31 "real POSIX files"doc-comment alone — those describe what the integration test actually
does on disk.
Tests/SolidSyslogBlockStoreDrainOrderingTest.cppfileandfileStorage(L116, L123)./* Shared file / block-device / … */(L107).Out of scope: production code (already clean), FileBlockDevice tests
(
fileis the right noun there), and BlockSequence/BlockDevice/NullBlockDevicetests (already clean).
Done when
*Block*test files use block-layer nouns at the fixture surfaceand in test names;
filesurvives only where the concreteSolidSyslogFilehandle is being constructed.
blocknotfile.cmake --build --preset debug --target junit.