From 8f574c3487990421d80fb1a248f5d9f8b27654bb Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 24 Nov 2025 12:25:46 +0100 Subject: pkg/csource: exclude auto-generated syscalls from tests Auto-generated syscall descriptions currently do not properly mark arch-specific syscalls like socketcall (which is only available on 32 bit systems), which leads to TestGenerate breakages. Until the syz-declextract tool is fixed and descriptions are re-generated, don't use such calls in TestGenerate tests. It has recently caused numerous syzkaller update erorrs on syzbot. Cc #5410. Closes #6468. --- prog/target.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'prog/target.go') diff --git a/prog/target.go b/prog/target.go index 300a86a32..b5d198f27 100644 --- a/prog/target.go +++ b/prog/target.go @@ -370,6 +370,17 @@ func (target *Target) DefaultChoiceTable() *ChoiceTable { return target.defaultChoiceTable } +func (target *Target) NoAutoChoiceTable() *ChoiceTable { + calls := map[*Syscall]bool{} + for _, c := range target.Syscalls { + if c.Attrs.Automatic { + continue + } + calls[c] = true + } + return target.BuildChoiceTable(nil, calls) +} + func (target *Target) RequiredGlobs() []string { globs := make(map[string]bool) ForeachType(target.Syscalls, func(typ Type, ctx *TypeCtx) { -- cgit mrf-deployment