aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
authordoujiang24 <doujiang24@gmail.com>2022-09-29 07:29:51 +0000
committerJoel Sing <joel@sing.id.au>2022-09-30 05:48:38 +0000
commitd7dbe0111ef2a6de80a20fef188db61d8fab5c96 (patch)
tree3133014e8c58ad479707c991450202726c739dc5 /src/runtime/testdata
parent9faf6b79297810f6c9418201c6a9fe7fe5a3695c (diff)
downloadgo-d7dbe0111ef2a6de80a20fef188db61d8fab5c96.tar.xz
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: 8e5f607e14f6a15ed6da5f205c4ca67a4adb6fc8 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>
Diffstat (limited to 'src/runtime/testdata')
-rw-r--r--src/runtime/testdata/testprogcgo/issue29707.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/testdata/testprogcgo/issue29707.go b/src/runtime/testdata/testprogcgo/issue29707.go
index 95964b111b..7d9299f131 100644
--- a/src/runtime/testdata/testprogcgo/issue29707.go
+++ b/src/runtime/testdata/testprogcgo/issue29707.go
@@ -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")