Skip to content

Commit efa0d1f

Browse files
committed
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 <[email protected]>
1 parent 1a677e0 commit efa0d1f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/cmd/trace/trace_unix_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ package main
88

99
import (
1010
"bytes"
11-
"internal/trace"
11+
traceparser "internal/trace"
1212
"io/ioutil"
1313
"runtime"
14-
rtrace "runtime/trace"
14+
"runtime/trace"
1515
"sync"
1616
"syscall"
1717
"testing"
@@ -68,13 +68,15 @@ func TestGoroutineInSyscall(t *testing.T) {
6868

6969
// Collect and parse trace.
7070
buf := new(bytes.Buffer)
71-
if err := rtrace.Start(buf); err != nil {
71+
if err := trace.Start(buf); err != nil {
7272
t.Fatalf("failed to start tracing: %v", err)
7373
}
74-
rtrace.Stop()
74+
trace.Stop()
7575

76-
res, err := trace.Parse(buf, "")
77-
if err != nil {
76+
res, err := traceparser.Parse(buf, "")
77+
if err == traceparser.ErrTimeOrder {
78+
t.Skipf("skipping due to golang.org/issue/16755 (timestamps are unreliable): %v", err)
79+
} else if err != nil {
7880
t.Fatalf("failed to parse trace: %v", err)
7981
}
8082

0 commit comments

Comments
 (0)