Commit efa0d1f2 authored by Hana Kim's avatar Hana Kim Committed by Hyang-Ah Hana Kim

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/105821Reviewed-by: default avatarPeter Weinberger <pjw@google.com>
parent 1a677e03
...@@ -8,10 +8,10 @@ package main ...@@ -8,10 +8,10 @@ package main
import ( import (
"bytes" "bytes"
"internal/trace" traceparser "internal/trace"
"io/ioutil" "io/ioutil"
"runtime" "runtime"
rtrace "runtime/trace" "runtime/trace"
"sync" "sync"
"syscall" "syscall"
"testing" "testing"
...@@ -68,13 +68,15 @@ func TestGoroutineInSyscall(t *testing.T) { ...@@ -68,13 +68,15 @@ func TestGoroutineInSyscall(t *testing.T) {
// Collect and parse trace. // Collect and parse trace.
buf := new(bytes.Buffer) 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) t.Fatalf("failed to start tracing: %v", err)
} }
rtrace.Stop() trace.Stop()
res, err := trace.Parse(buf, "") res, err := traceparser.Parse(buf, "")
if err != nil { 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) t.Fatalf("failed to parse trace: %v", err)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment