From aac1ed45d8e3eee8b7b4f6dc1c4fa089ddbe7338 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Thu, 7 Apr 2022 10:17:36 -0400 Subject: [PATCH] http2: skip "write: broken pipe" failures in TestServer on OpenBSD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This failure mode has been observed on openbsd/mips64 and openbsd/arm64. I have not diagnosed the precise root cause, but I suspect a platform bug — perhaps a bad interaction with the relatively weakly-ordered memory models on these CPUs. For golang/go#52208. Change-Id: I0ab0285cc395d22742ced8f28d5c9c3280fcd1e3 Reviewed-on: https://go-review.googlesource.com/c/net/+/398794 Trust: Bryan Mills Run-TryBot: Bryan Mills Reviewed-by: Ian Lance Taylor Auto-Submit: Bryan Mills TryBot-Result: Gopher Robot --- http2/server_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http2/server_test.go b/http2/server_test.go index 50cdcbd62..a1b1b2b91 100644 --- a/http2/server_test.go +++ b/http2/server_test.go @@ -346,6 +346,10 @@ func (st *serverTester) writePreface() { func (st *serverTester) writeInitialSettings() { if err := st.fr.WriteSettings(); err != nil { + if runtime.GOOS == "openbsd" && strings.HasSuffix(err.Error(), "write: broken pipe") { + st.t.Logf("Error writing initial SETTINGS frame from client to server: %v", err) + st.t.Skipf("Skipping test with known OpenBSD failure mode. (See https://go.dev/issue/52208.)") + } st.t.Fatalf("Error writing initial SETTINGS frame from client to server: %v", err) } }