mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: check TestUsingVDSO ExitError type assertion
Currently this test panics if the error is not an ExitError. We aren't expecting other errors, but we want to continue to the t.Fatal so the error contents actually get logged. For #74672. Change-Id: I6a6a636cee5ddac500ed7ec549340b02944101ab Reviewed-on: https://go-review.googlesource.com/c/go/+/689956 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
6bb42997c8
commit
98a031193b
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ func TestUsingVDSO(t *testing.T) {
|
||||||
t.Logf("%s", out)
|
t.Logf("%s", out)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err := err.(*exec.ExitError); err != nil && err.Sys().(syscall.WaitStatus).Signaled() {
|
if err, ok := err.(*exec.ExitError); ok && err.Sys().(syscall.WaitStatus).Signaled() {
|
||||||
if !bytes.Contains(out, []byte("+++ killed by")) {
|
if !bytes.Contains(out, []byte("+++ killed by")) {
|
||||||
// strace itself occasionally crashes.
|
// strace itself occasionally crashes.
|
||||||
// Here, it exited with a signal, but
|
// Here, it exited with a signal, but
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue