aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2024-01-17 14:24:06 -0500
committerGopher Robot <gobot@golang.org>2024-01-17 19:47:47 +0000
commit92d7169a36709a689736c893994b42938d3270e7 (patch)
tree3fb0c2058ee67e34ab29b9fcd96ea84257a88113
parent3c1155ee2d0e2e9bfb907faa61a46e0b4dd509a3 (diff)
downloadgo-92d7169a36709a689736c893994b42938d3270e7.tar.gz
go-92d7169a36709a689736c893994b42938d3270e7.zip
runtime: skip test if strace crashes
Very occasionally, at least on linux/386, strace itself will crash in TestUsingVDSO. Detect these crashes and just skip the test. Fixes #63734. Change-Id: I050494459d47dd96c0b8dc0b16353cb532fba93e Reviewed-on: https://go-review.googlesource.com/c/go/+/556357 Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
-rw-r--r--src/runtime/vdso_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/vdso_test.go b/src/runtime/vdso_test.go
index 126fd8d199..d025ba50c2 100644
--- a/src/runtime/vdso_test.go
+++ b/src/runtime/vdso_test.go
@@ -12,6 +12,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "syscall"
"testing"
"time"
)
@@ -56,6 +57,16 @@ func TestUsingVDSO(t *testing.T) {
t.Logf("%s", out)
}
if err != nil {
+ if err := err.(*exec.ExitError); err != nil && err.Sys().(syscall.WaitStatus).Signaled() {
+ if !bytes.Contains(out, []byte("+++ killed by")) {
+ // strace itself occasionally crashes.
+ // Here, it exited with a signal, but
+ // the strace log didn't report any
+ // signal from the child process.
+ t.Log(err)
+ testenv.SkipFlaky(t, 63734)
+ }
+ }
t.Fatal(err)
}