From c8c15bb214509bafc8fe1a1e3abb8ccf90b3306e Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 13 Dec 2024 15:15:49 +0100 Subject: tools/syz-declextract: infer argument/field types Use data flow analysis to infer syscall argument, return value, and struct field types. See the comment in pkg/declextract/typing.go for more details. --- pkg/testutil/testutil.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkg/testutil') diff --git a/pkg/testutil/testutil.go b/pkg/testutil/testutil.go index 153584dd5..b2ec06afb 100644 --- a/pkg/testutil/testutil.go +++ b/pkg/testutil/testutil.go @@ -90,3 +90,12 @@ func randValue(t *testing.T, rnd *rand.Rand, typ reflect.Type) reflect.Value { } return v } + +type Writer struct { + testing.TB +} + +func (w *Writer) Write(data []byte) (int, error) { + w.TB.Logf("%s", data) + return len(data), nil +} -- cgit mrf-deployment