remove binary testdata and fuzz corpus; restore regression tests
Go / build (push) Successful in 39s

This commit is contained in:
OpenCode
2026-08-06 15:54:37 +02:00
parent 44ec148be4
commit 1b2552492b
34 changed files with 251 additions and 36 deletions
File diff suppressed because one or more lines are too long
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacket0F8B37C94207F7BF(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x42, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacket6C9AD835672C5C51(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b, 0xde, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketA5D61E1C0F23E7FA(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x56, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketCAA58159889F7E8A(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x2e, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketD18FC4C0B2DF2972(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b, 0xf2, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketE81E82016DB04F28(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x6, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketFE935CF2E584C649(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x1a, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Decode regression: recipe_book_add (26.2) - SlotDisplay type fix
func TestRegressionPacket25D845B5D0023D22(t *testing.T) {
p := &generated.PlayToClientPacketRecipeBookAdd{}
b := bytes.NewReader([]byte{0x1, 0xbe, 0x2, 0x1, 0x2, 0x2, 0x4, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x5, 0xe8, 0x2, 0x1, 0x0, 0x0, 0x4, 0xe8, 0x2, 0x0, 0x3, 0x1, 0x4, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x2, 0x1})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,17 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Decode regression: declare_commands (26.2) - bitfield + extraNodeData fix
func TestRegressionPacket78C731784E6E834A(t *testing.T) {
p := &generated.PlayToClientPacketDeclareCommands{}
b := bytes.NewReader([]byte{0x1a, 0x0, 0xa, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0x1, 0x1, 0xb, 0x2, 0x6d, 0x65, 0x5, 0x1, 0xc, 0x4, 0x68, 0x65, 0x6c, 0x70, 0x5, 0x1, 0xd, 0x4, 0x6c, 0x69, 0x73, 0x74, 0x1, 0x1, 0xe, 0x3, 0x6d, 0x73, 0x67, 0x9, 0x0, 0x4, 0x4, 0x74, 0x65, 0x6c, 0x6c, 0x9, 0x0, 0x4, 0x1, 0x77, 0x1, 0x2, 0xf, 0x10, 0x6, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1, 0x1, 0x11, 0x7, 0x74, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x9, 0x0, 0x8, 0x2, 0x74, 0x6d, 0x1, 0x1, 0x12, 0x7, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x6, 0x0, 0x6, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x14, 0x6, 0x0, 0x7, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5, 0x2, 0x5, 0x0, 0x5, 0x75, 0x75, 0x69, 0x64, 0x73, 0x2, 0x1, 0x13, 0x7, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x6, 0x2, 0x1, 0x1, 0x14, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1, 0x1, 0x15, 0x4, 0x72, 0x6f, 0x6c, 0x6c, 0x6, 0x0, 0x7, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x14, 0x16, 0x2, 0x16, 0x17, 0x9, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x14, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x6, 0x0, 0x7, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x14, 0x6, 0x0, 0x5, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x27, 0x6, 0x0, 0x5, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x27, 0x1, 0x1, 0x18, 0x3, 0x61, 0x64, 0x64, 0x1, 0x1, 0x19, 0x3, 0x73, 0x65, 0x74, 0x6, 0x0, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3, 0x0, 0x6, 0x0, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3, 0x0, 0x0})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
)
// Decode regression: spawn_entity_living (1.8) - entityMetadata mergeCompareTo
func TestRegressionPacket2B76AF8B937B1E8F(t *testing.T) {
p := &generated.PlayToClientPacketSpawnEntityLiving{}
b := bytes.NewReader([]byte{0x4c, 0x65, 0xff, 0xff, 0xed, 0x66, 0x0, 0x0, 0x7, 0xe0, 0x0, 0x0, 0x29, 0xe6, 0x91, 0x0, 0x91, 0x0, 0x0, 0xfd, 0x8d, 0x0, 0x0, 0x0, 0x0, 0x21, 0x1, 0x2c, 0x82, 0x0, 0x12, 0x4, 0x3, 0x0, 0x4, 0x0, 0x66, 0x41, 0x20, 0x0, 0x0, 0x47, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x9, 0x0, 0xc, 0x0, 0xf, 0x0, 0x7f})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
)
// Decode regression: entity_equipment (1.8) - nbt TAG_End fix
func TestRegressionPacket0C20C77EA68496BD(t *testing.T) {
p := &generated.PlayToClientPacketEntityEquipment{}
b := bytes.NewReader([]byte{0x89, 0x16, 0x0, 0x0, 0x1, 0x5, 0x1, 0x0, 0x0, 0x0})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
)
// Decode regression: entity_metadata (1.8) - entityMetadataLoop mergeCompareTo
func TestRegressionPacketDF2DF88561529208(t *testing.T) {
p := &generated.PlayToClientPacketEntityMetadata{}
b := bytes.NewReader([]byte{0x69, 0x0, 0x0, 0x21, 0x1, 0x2c, 0x82, 0x0, 0x3, 0x0, 0x4, 0x0, 0x66, 0x40, 0x80, 0x0, 0x0, 0x47, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x9, 0x0, 0xc, 0x0, 0xf, 0x0, 0x7f})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Decode regression: entity_equipment (26.2) - topBitSetTerminatedArray
func TestRegressionPacket1D0089BBE86A1648(t *testing.T) {
p := &generated.PlayToClientPacketEntityEquipment{}
b := bytes.NewReader([]byte{0x81, 0x2, 0x0, 0x1, 0x9a, 0x7, 0x0, 0x0})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000\x000")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00A")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000\b0000000000000000000000000000000000000000000000000000000012789ABC")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000\b000000000\x9d0000000000000000000000000000000000000000000000012789AB")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x00\x00\x000")
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x0200000000000000000")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("000\xcf\xff\xff\xe88")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00A\x00")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000")
Binary file not shown.
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x05\x000000")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("0")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x040000")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x0400000")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x86\x00000000")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("80\x00\x01\x05\x01\x010\x01\x00")