From 92d7169a36709a689736c893994b42938d3270e7 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 17 Jan 2024 14:24:06 -0500 Subject: [PATCH] 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 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI --- src/runtime/vdso_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) } -- 2.48.1