mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
test: F1 blocks are exactly 4096 bytes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
76cf29e7e0
commit
ce2ca830ae
1 file changed
+8
-1
@@ -236,8 +236,15 @@ func f1Restore(t *testing.T, env *handoffEnv, src, snap, target string) *daemon
|
||||
return d
|
||||
}
|
||||
|
||||
// f1Block is one deterministic 4096-byte block (pattern needs a length that
|
||||
// divides 4096; these labels do not, so the block is filled explicitly).
|
||||
func f1Block(vol string, round int, kind string, lba uint64) []byte {
|
||||
return pattern(fmt.Sprintf("%s r%d %s %08d|", vol, round, kind, lba))
|
||||
s := fmt.Sprintf("%s r%d %s %08d|", vol, round, kind, lba)
|
||||
b := make([]byte, 4096)
|
||||
for i := range b {
|
||||
b[i] = s[i%len(s)]
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func f1LedgerBase(cfg f1Config, round int) uint64 {
|
||||
|
||||
Reference in new issue
Block a user