mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
runtime/trace: skip tests if parsing fails with timestamp error
already skips tests in case of the timestamp error, eg. #97757
Change-Id: Ia696e83cba2e3ed50181a8100b964847092a7365
GitHub-Last-Rev: 8e5f607e14
GitHub-Pull-Request: golang/go#55918
Reviewed-on: https://go-review.googlesource.com/c/go/+/435855
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
9faf6b7929
commit
d7dbe0111e
|
@ -730,7 +730,10 @@ func TestCgoTraceParser(t *testing.T) {
|
|||
}
|
||||
output := runTestProg(t, "testprogcgo", "CgoTraceParser")
|
||||
want := "OK\n"
|
||||
if output != want {
|
||||
ErrTimeOrder := "ErrTimeOrder\n"
|
||||
if output == ErrTimeOrder {
|
||||
t.Skipf("skipping due to golang.org/issue/16755: %v", output)
|
||||
} else if output != want {
|
||||
t.Fatalf("want %s, got %s\n", want, output)
|
||||
}
|
||||
}
|
||||
|
@ -743,7 +746,10 @@ func TestCgoTraceParserWithOneProc(t *testing.T) {
|
|||
}
|
||||
output := runTestProg(t, "testprogcgo", "CgoTraceParser", "GOMAXPROCS=1")
|
||||
want := "OK\n"
|
||||
if output != want {
|
||||
ErrTimeOrder := "ErrTimeOrder\n"
|
||||
if output == ErrTimeOrder {
|
||||
t.Skipf("skipping due to golang.org/issue/16755: %v", output)
|
||||
} else if output != want {
|
||||
t.Fatalf("GOMAXPROCS=1, want %s, got %s\n", want, output)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,9 @@ func CgoTraceParser() {
|
|||
trace.Stop()
|
||||
|
||||
_, err := traceparser.Parse(buf, "")
|
||||
if err != nil {
|
||||
if err == traceparser.ErrTimeOrder {
|
||||
fmt.Println("ErrTimeOrder")
|
||||
} else if err != nil {
|
||||
fmt.Println("Parse error: ", err)
|
||||
} else {
|
||||
fmt.Println("OK")
|
||||
|
|
Loading…
Reference in a new issue