Source file
src/runtime/metrics_cgo_test.go
1
2
3
4
5
6
7 package runtime_test
8
9 import (
10 "internal/race"
11 "runtime"
12 "testing"
13 )
14
15 func TestNotInGoMetricCallback(t *testing.T) {
16 switch runtime.GOOS {
17 case "windows", "plan9":
18 t.Skip("unsupported on Windows and Plan9")
19 case "freebsd":
20 if race.Enabled {
21 t.Skipf("race + cgo freebsd not supported. See https://go.dev/issue/73788.")
22 }
23 }
24
25
26
27 output := runTestProg(t, "testprogcgo", "NotInGoMetricCallback")
28 want := "OK\n"
29 if output != want {
30 t.Fatalf("output:\n%s\n\nwanted:\n%s", output, want)
31 }
32 }
33
View as plain text