From 8a7994108262ea6c47a3e3e3602732d26ded88e7 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 29 Jul 2021 15:49:05 +0200 Subject: pkg/csource: don't enable HandleSegv in short tests HandleSegv can radically increase compilation time/memory consumption on large programs. For example, for one program captured from this test enabling HandleSegv increases compilation time from 1.94s to 104.73s and memory consumption from 136MB to 8116MB. This leads to CI failures on #2688. Don't enable HandleSegv in short tests. --- pkg/csource/csource_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index e2035b286..9e6fd1a59 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -71,6 +71,12 @@ func testTarget(t *testing.T, target *prog.Target, full bool) { opts = allOptionsPermutations(target.OS) } for opti, opts := range opts { + if testing.Short() && opts.HandleSegv { + // HandleSegv can radically increase compilation time/memory consumption on large programs. + // For example, for one program captured from this test enabling HandleSegv increases + // compilation time from 1.94s to 104.73s and memory consumption from 136MB to 8116MB. + continue + } opts := opts t.Run(fmt.Sprintf("%v", opti), func(t *testing.T) { t.Parallel() -- cgit mrf-deployment