From 4837bcc92c27e72c157e2c7b7e098dd91fa36fd3 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Mon, 8 Dec 2025 17:48:53 +0000 Subject: [PATCH] internal/trace: skip tests for alloc/free experiment by default These tests are just too flaky and I don't have the time to fix them right now. I also am thinking to just change how trace experiments work, so it may not be worth taking the time to fix them. For #70838. Change-Id: Ia896215a0cbeccac99b73fefc836088f43530849 Reviewed-on: https://go-review.googlesource.com/c/go/+/728122 Reviewed-by: Michael Pratt Auto-Submit: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/internal/trace/reader_test.go | 1 + src/internal/trace/trace_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/internal/trace/reader_test.go b/src/internal/trace/reader_test.go index c03d0676a0..264cc51569 100644 --- a/src/internal/trace/reader_test.go +++ b/src/internal/trace/reader_test.go @@ -20,6 +20,7 @@ import ( var ( logEvents = flag.Bool("log-events", false, "whether to log high-level events; significantly slows down tests") dumpTraces = flag.Bool("dump-traces", false, "dump traces even on success") + allocFree = flag.Bool("alloc-free", false, "run alloc/free trace experiment tests") ) func TestReaderGolden(t *testing.T) { diff --git a/src/internal/trace/trace_test.go b/src/internal/trace/trace_test.go index 479411548f..bfbd531511 100644 --- a/src/internal/trace/trace_test.go +++ b/src/internal/trace/trace_test.go @@ -697,6 +697,9 @@ func testTraceProg(t *testing.T, progName string, extra func(t *testing.T, trace runTest(t, true, "") }) t.Run("AllocFree", func(t *testing.T) { + if !*allocFree { + t.Skip("skipping trace alloc/free tests by default; too flaky (see go.dev/issue/70838)") + } if testing.Short() { t.Skip("skipping trace alloc/free tests in short mode") } -- 2.52.0