Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion internal/snapshot/snapshot_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ func checkDescriptorDecode(t *testing.T, sector []byte, idx uint64) {
if err != nil {
t.Fatalf("decoding a re-encoded descriptor: %v", err)
}
// Bytes only some formats use, such as the birth generation without
// FlagHasTargetBirth, re-encode as zero and change the checksum.
again.Checksum = desc.Checksum
if *again != *desc {
t.Fatalf("descriptor changed after an encode/decode round trip")
t.Fatalf("descriptor changed after an encode/decode round trip: %+v != %+v", again, desc)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
go test fuzz v1
[]byte("0000000000000000000000000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
byte('\x00')
Loading