Test / test (push) Successful in 2m4s
Release / gates (push) Successful in 2m5s
Release / build (amd64, freebsd) (push) Successful in 1m27s
Release / build (amd64, linux) (push) Successful in 1m22s
Release / build (amd64, netbsd) (push) Successful in 1m19s
Release / build (amd64, openbsd) (push) Successful in 1m20s
Release / build (arm64, darwin) (push) Successful in 1m21s
Release / build (arm64, freebsd) (push) Successful in 1m26s
Release / build (arm64, linux) (push) Successful in 1m25s
Release / build (arm64, netbsd) (push) Successful in 1m31s
Release / build (arm64, openbsd) (push) Successful in 1m27s
Release / build (loong64, linux) (push) Successful in 1m37s
Release / build (riscv64, linux) (push) Successful in 1m21s
Release / release (push) Successful in 40s
Assisted-by: GLM 5.3 Flash
23 lines
603 B
Go
23 lines
603 B
Go
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package rdma
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// FuzzDecodeFrame feeds arbitrary frames through the decoder: no input
|
|
// may panic or read past the declared segments.
|
|
func FuzzDecodeFrame(f *testing.F) {
|
|
f.Add([]byte{})
|
|
f.Add([]byte{0, 0, 0, 1})
|
|
f.Add(make([]byte, 64))
|
|
f.Fuzz(func(t *testing.T, data []byte) {
|
|
// The property under test is that neither decoder panics; a
|
|
// malformed frame is an ordinary error.
|
|
_, _ = DecodeFrame(data)
|
|
_, _, _, _ = ReadStreamFrame(data)
|
|
})
|
|
}
|