mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
e2ae3910c39e8c5148c863b2132a51edabf9f0bb
Per "make sure all test works for regular/smart wal" follow-up:
existing T3a/T3b tests exercise the adapter + provider against
both walstore and smartwal, but the iSCSI/NVMe wire tests (added
in 29e3d0d) only verify that `backend.Sync` is CALLED using
testback.RecordingBackend. They don't verify that real I/O
round-trips through the SCSI/NVMe command path when the backend
is durable-storage-backed.
This commit closes that gap with 4 matrix tests (8 subtests
total) that build a DurableProvider, open + recover the volume,
wrap it in the iSCSI / NVMe handlers, and issue real SCSI /
NVMe commands end-to-end against both impls.
## New files
core/frontend/durable/integration_iscsi_test.go (~135 LOC)
- TestT3b_Integration_ISCSI_WriteReadSync_Matrix
Write → SYNC_CACHE → Read round-trip at 512 B LBA; zero-
read on unwritten LBA. Both impls.
- TestT3b_Integration_ISCSI_MultiBlockWriteAcrossBoundary
8-block (4 KiB) WRITE(10) + READ(10) round-trip; pins the
adapter's byte↔LBA fast-path. Both impls.
- Shared openDurableBackend helper (used by NVMe file too).
core/frontend/durable/integration_nvme_test.go (~95 LOC)
- TestT3b_Integration_NVMe_WriteReadFlush_Matrix
NVMe Write → Flush → Read round-trip at 4 KiB LBA; zero-
read on unwritten LBA. Both impls.
- TestT3b_Integration_NVMe_MultiBlockWrite
4-block NLB Write → Flush → Read round-trip. Both impls.
## Coverage after this commit
core/frontend/durable: 60 subtests, 0 FAIL
- T3a: 16 tests × 2 impls = 32 subtests
- T3b provider/recovery: 10 tests × 2 impls + 3 solo = 23 subtests
- T3b integration (this commit): 4 tests × 2 impls = 8 subtests
- matrix canary: 1
Total matrix-parameterized subtests per impl: 24 walstore + 24 smartwal
## Scope classification
These are L1 integration tests (real handler + real adapter +
real LogicalStorage; in-process; no subprocess / no YAML / no
perf measurement). NOT T3c scenarios — T3c still owns:
- YAML scenario replay
- L2 subprocess continuity smoke
- m01 fs-workload
- Perf baseline
Consistent with Addendum A #1: "every adapter unit/integration
test runs walstore + smartwal" — this extends that discipline to
the SCSI/NVMe wire layer, which is still L1.
## Regression
go test ./core/... -count=1 → 17/17 packages ok
- core/frontend/durable: 0.6s (60 subtests; was 0.5s before)
- No regression elsewhere
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Languages
Go
84.8%
Rust
7.6%
Shell
2.7%
templ
1.5%
Java
0.9%
Other
2.3%