From: David Chase Date: Mon, 15 Apr 2024 21:53:14 +0000 (-0400) Subject: runtime/pprof: test for Darwin flake in TestVMInfo X-Git-Tag: go1.23rc1~607 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=07496729c58dd58316b01c8bb81aa21a925ae006;p=gostls13.git 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 --- 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)