From 8254d66eab23bf334d619d888dc98630c1c5c5fd Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sun, 21 Dec 2025 14:39:20 +1100 Subject: [PATCH] cmd/asm/internal/asm: abort end to end test if assembly failed If errors are encountered during assembly, do not attempt to perform verification. In this case the output is unlikely to be correct and all verification fails, which means the real issue gets lost in the noise. Change-Id: I62c1bf09fa025b0df4c06f0bfa424fb5d328184b Reviewed-on: https://go-review.googlesource.com/c/go/+/731920 Reviewed-by: Cherry Mui Auto-Submit: Joel Sing LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Knyszek --- src/cmd/asm/internal/asm/endtoend_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cmd/asm/internal/asm/endtoend_test.go b/src/cmd/asm/internal/asm/endtoend_test.go index e53263356d..0610a2d192 100644 --- a/src/cmd/asm/internal/asm/endtoend_test.go +++ b/src/cmd/asm/internal/asm/endtoend_test.go @@ -199,6 +199,11 @@ Diff: } obj.Flushplist(ctxt, pList, nil) + if !ok { + // If we've encountered errors, the output is unlikely to be sane. + t.FailNow() + } + for p := top; p != nil; p = p.Link { if p.As == obj.ATEXT { text = p.From.Sym -- 2.52.0