From 1c8c8cd830af4deee250ad11f1613d1d9a62ca0b Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Fri, 17 Oct 2025 15:10:52 +0200 Subject: pkg/csource: run testPseudoSyscalls() for all targets Previously in the -short configuration testPseudoSyscalls() was only executed for the first supported target, which in most cases ended up being linux/386 (the least popular configuration). As a result, platform-specific pseudo-syscalls were never executed on the CI. Fix this by testing the pseudo-syscalls on all available platforms. This increases the execution time of TestGenerate from 18s to 36s, but also helps to discover bugs in pseudo-syscalls quicker. As a result of this change, 3 distinct latent bugs were found on amd64, arm64 and ppc64. --- pkg/csource/csource_test.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'pkg/csource/csource_test.go') diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index e48f197c3..f4cfe40a4 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -44,15 +44,14 @@ func TestGenerate(t *testing.T) { } t.Run(target.OS+"/"+target.Arch, func(t *testing.T) { full := !checked[target.OS] - if !full && testing.Short() { - return + if full || !testing.Short() { + if err := sysTarget.BrokenCompiler; err != "" { + t.Skipf("target compiler is broken: %v", err) + } + checked[target.OS] = true + t.Parallel() + testTarget(t, target, full) } - if err := sysTarget.BrokenCompiler; err != "" { - t.Skipf("target compiler is broken: %v", err) - } - checked[target.OS] = true - t.Parallel() - testTarget(t, target, full) testPseudoSyscalls(t, target) }) } -- cgit mrf-deployment