From 07496729c58dd58316b01c8bb81aa21a925ae006 Mon Sep 17 00:00:00 2001 From: David Chase Date: Mon, 15 Apr 2024 17:53:14 -0400 Subject: [PATCH] runtime/pprof: test for Darwin flake in TestVMInfo If it contains "No process corpse slots currently available, waiting to get one" skip the test in short mode, so that run.bash works reliably on developer laptops, but the flake is still recorded on builders. The problem also seems to get better after a laptop reboot? Updates #62352. Change-Id: I12e8f594f0b830bacda5d8bfa594782345764c4a Reviewed-on: https://go-review.googlesource.com/c/go/+/579295 LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui --- src/runtime/pprof/vminfo_darwin_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/pprof/vminfo_darwin_test.go b/src/runtime/pprof/vminfo_darwin_test.go index ac180826b1..641587200c 100644 --- a/src/runtime/pprof/vminfo_darwin_test.go +++ b/src/runtime/pprof/vminfo_darwin_test.go @@ -79,6 +79,9 @@ func useVMMap(t *testing.T) (hi, lo uint64, retryable bool, err error) { t.Logf("vmmap output: %s", out) if ee, ok := cmdErr.(*exec.ExitError); ok && len(ee.Stderr) > 0 { t.Logf("%v: %v\n%s", cmd, cmdErr, ee.Stderr) + if testing.Short() && strings.Contains(string(ee.Stderr), "No process corpse slots currently available, waiting to get one") { + t.Skipf("Skipping knwn flake in short test mode") + } retryable = bytes.Contains(ee.Stderr, []byte("resource shortage")) } t.Logf("%v: %v\n", cmd, cmdErr) -- 2.48.1