From 3a6a034cd63e55f5ee00f9002e62204fa50f96bf Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Mon, 8 Dec 2025 16:05:53 +0000 Subject: [PATCH] runtime: disable TestNotInGoMetricCallback on FreeBSD + race cgo + race is not supported on FreeBSD. Change-Id: I38abeccaaabfcc104d1d5a077fb99646dc4be792 Reviewed-on: https://go-review.googlesource.com/c/go/+/728120 Auto-Submit: Michael Knyszek LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui --- src/runtime/metrics_test.go | 5 +++++ src/runtime/testdata/testprogcgo/notingo.go | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/runtime/metrics_test.go b/src/runtime/metrics_test.go index efd2c2adb9..278efdc69f 100644 --- a/src/runtime/metrics_test.go +++ b/src/runtime/metrics_test.go @@ -9,6 +9,7 @@ import ( "internal/abi" "internal/goexperiment" "internal/profile" + "internal/race" "internal/testenv" "os" "reflect" @@ -1589,6 +1590,10 @@ func TestNotInGoMetricCallback(t *testing.T) { switch runtime.GOOS { case "windows", "plan9": t.Skip("unsupported on Windows and Plan9") + case "freebsd": + if race.Enabled { + t.Skipf("race + cgo freebsd not supported. See https://go.dev/issue/73788.") + } } // This test is run in a subprocess to prevent other tests from polluting the metrics diff --git a/src/runtime/testdata/testprogcgo/notingo.go b/src/runtime/testdata/testprogcgo/notingo.go index 6e78126358..5af4c00e1f 100644 --- a/src/runtime/testdata/testprogcgo/notingo.go +++ b/src/runtime/testdata/testprogcgo/notingo.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !plan9 && !windows -// +build !plan9,!windows package main -- 2.52.0