From: qmuntal Date: Thu, 5 Oct 2023 10:02:43 +0000 (+0200) Subject: runtime: normalize line endings in TestGdbPython X-Git-Tag: go1.22rc1~647 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5da31049a633e225c2fc9d3500c162f87651ceef;p=gostls13.git runtime: normalize line endings in TestGdbPython TestGdbPython fails on some Windows setups because the line endings in the output of the gdb command can potentially be CRLF, but the test expects LF. This CL changes the test to normalize the line endings. Change-Id: Iada9c37dc98249ac3c5f1edca4a657c51d4382a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/532816 Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Pratt LUCI-TryBot-Result: Go LUCI TryBot-Result: Gopher Robot Run-TryBot: Quim Muntal Auto-Submit: Quim Muntal --- diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go index 8c759bf406..ced71ca476 100644 --- a/src/runtime/runtime-gdb_test.go +++ b/src/runtime/runtime-gdb_test.go @@ -275,6 +275,7 @@ func testGdbPython(t *testing.T, cgo bool) { t.Fatalf("gdb exited with error: %v", err) } + got = bytes.ReplaceAll(got, []byte("\r\n"), []byte("\n")) // normalize line endings firstLine, _, _ := bytes.Cut(got, []byte("\n")) if string(firstLine) != "Loading Go Runtime support." { // This can happen when using all.bash with