mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/trace: skip GoroutineInSyscall in case time order err
All tests involving trace collection and parsing still need handling of failures caused by #16755 (Timestamp issue) Fixes #24738 Change-Id: I6cd0f9c6f49854a22fad6fce1a00964c168aa614 Reviewed-on: https://go-review.googlesource.com/105821 Reviewed-by: Peter Weinberger <pjw@google.com>
This commit is contained in:
parent
1a677e03c8
commit
efa0d1f214
1 changed files with 8 additions and 6 deletions
|
|
@ -8,10 +8,10 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"internal/trace"
|
||||
traceparser "internal/trace"
|
||||
"io/ioutil"
|
||||
"runtime"
|
||||
rtrace "runtime/trace"
|
||||
"runtime/trace"
|
||||
"sync"
|
||||
"syscall"
|
||||
"testing"
|
||||
|
|
@ -68,13 +68,15 @@ func TestGoroutineInSyscall(t *testing.T) {
|
|||
|
||||
// Collect and parse trace.
|
||||
buf := new(bytes.Buffer)
|
||||
if err := rtrace.Start(buf); err != nil {
|
||||
if err := trace.Start(buf); err != nil {
|
||||
t.Fatalf("failed to start tracing: %v", err)
|
||||
}
|
||||
rtrace.Stop()
|
||||
trace.Stop()
|
||||
|
||||
res, err := trace.Parse(buf, "")
|
||||
if err != nil {
|
||||
res, err := traceparser.Parse(buf, "")
|
||||
if err == traceparser.ErrTimeOrder {
|
||||
t.Skipf("skipping due to golang.org/issue/16755 (timestamps are unreliable): %v", err)
|
||||
} else if err != nil {
|
||||
t.Fatalf("failed to parse trace: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue