fixed tests.

This commit is contained in:
doujiang24 2022-09-24 19:11:09 +08:00
parent a9a4e06dd3
commit 7bbfddb81b
2 changed files with 10 additions and 3 deletions

View file

@ -713,7 +713,10 @@ func TestCgoTracebackGoroutineProfile(t *testing.T) {
func TestCgoTraceParser(t *testing.T) {
// Test issue 29707.
testenv.MustHaveCGO(t)
switch runtime.GOOS {
case "plan9", "windows":
t.Skipf("no pthreads on %s", runtime.GOOS)
}
output := runTestProg(t, "testprogcgo", "CgoTraceParser")
want := "OK\n"
if output != want {
@ -723,7 +726,10 @@ func TestCgoTraceParser(t *testing.T) {
func TestCgoTraceParserWithOneProc(t *testing.T) {
// Test issue 29707.
testenv.MustHaveCGO(t)
switch runtime.GOOS {
case "plan9", "windows":
t.Skipf("no pthreads on %s", runtime.GOOS)
}
output := runTestProg(t, "testprogcgo", "CgoTraceParser", "GOMAXPROCS=1")
want := "OK\n"
if output != want {

View file

@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build unix
//go:build !plan9 && !windows
// +build !plan9,!windows
// This is for issue #29707