]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm/internal/asm: abort end to end test if assembly failed
authorJoel Sing <joel@sing.id.au>
Sun, 21 Dec 2025 03:39:20 +0000 (14:39 +1100)
committerGopher Robot <gobot@golang.org>
Tue, 23 Dec 2025 18:45:44 +0000 (10:45 -0800)
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 <cherryyz@google.com>
Auto-Submit: Joel Sing <joel@sing.id.au>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/asm/internal/asm/endtoend_test.go

index e53263356d167b1757f0f5da6f8b82f0675f70f4..0610a2d192910b6b63b588aa7ca8f03fd05a068b 100644 (file)
@@ -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