[go] testing: escape framing markers only in test2json mode

10 views
Skip to first unread message

Andrey Deryabin (Gerrit)

unread,
Sep 17, 2026, 12:42:07 PM (10 days ago) Sep 17
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Andrey Deryabin has uploaded the change for review

Commit message

testing: escape framing markers only in test2json mode

CL 751940 made chatty (-test.v) output escape the framing markers ^V,
^O, ^N and ^[ by prefixing them with ^[, so that a test printing one of
them cannot corrupt the test2json parse of the run. The escaping was
applied in plain -test.v=true mode as well, where nothing decodes it
again: every ESC (0x1b) logged through t.Log, t.Error or t.Output
arrives doubled in the output of go test -v, which corrupts ANSI escape
sequences on terminals that do not tolerate a stray ESC, kitty among
them. Go 1.26 printed the logged bytes unchanged.

Escape only in -test.v=test2json mode, as writeLine already does for
the ^O and ^N error markers.

Fixes #81577.
Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf

Change diff

diff --git a/src/cmd/go/testdata/script/test_chatty_ascii.txt b/src/cmd/go/testdata/script/test_chatty_ascii.txt
new file mode 100644
index 0000000..e2ddea9
--- /dev/null
+++ b/src/cmd/go/testdata/script/test_chatty_ascii.txt
@@ -0,0 +1,26 @@
+# Control characters logged by a test reach the -v output unchanged.
+# The escaping of the test2json framing markers (^V, ^O, ^N, ^[) applies
+# to -json output only, where test2json decodes it; see test_json_ascii.txt.
+! go test -v
+
+stdout ' x_test.go:11: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\n \x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\n'
+stdout ' x_test.go:12: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\n \x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\n'
+! stdout '\x1b\x1b'
+
+-- go.mod --
+module p
+
+-- x_test.go --
+package p
+
+import "testing"
+
+func Test(t *testing.T) {
+ var s string
+ for i := rune(0); i < ' '; i++ {
+ s += string(i)
+ }
+
+ t.Log(s)
+ t.Error(s)
+}
diff --git a/src/testing/sub_test.go b/src/testing/sub_test.go
index cad14be..4fa26c1 100644
--- a/src/testing/sub_test.go
+++ b/src/testing/sub_test.go
@@ -195,12 +195,18 @@
=== RUN chatty with recursion
=== RUN chatty with recursion/#00
=== RUN chatty with recursion/#00/#00
+=== RUN chatty with recursion/#00/#01
+ sub_test.go:NNN: ^V^O^N^[
--- PASS: chatty with recursion (N.NNs)
--- PASS: chatty with recursion/#00 (N.NNs)
- --- PASS: chatty with recursion/#00/#00 (N.NNs)`,
+ --- PASS: chatty with recursion/#00/#00 (N.NNs)
+ --- PASS: chatty with recursion/#00/#01 (N.NNs)`,
f: func(t *T) {
t.Run("", func(t *T) {
t.Run("", func(t *T) {})
+ t.Run("", func(t *T) {
+ t.Log(string(markFraming) + string(markErrBegin) + string(markErrEnd) + string(markEscape))
+ })
})
},
}, {
diff --git a/src/testing/testing.go b/src/testing/testing.go
index 467fd91..ab4a433 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -1261,8 +1261,12 @@
return
}

- // Escape the framing marker.
- b = escapeMarkers(b)
+ // Escape the framing markers when the output goes to test2json, which
+ // decodes them again. Plain -v output reproduces the test's output as
+ // written.
+ if o.c.chatty.json {
+ b = escapeMarkers(b)
+ }

// If this is the start of an error, add ^O to the start of the output.
var strErrBegin, strErrEnd string

Change information

Files:
  • A src/cmd/go/testdata/script/test_chatty_ascii.txt
  • M src/testing/sub_test.go
  • M src/testing/testing.go
Change size: S
Delta: 3 files changed, 39 insertions(+), 3 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
Gerrit-Change-Number: 834264
Gerrit-PatchSet: 1
Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
unsatisfied_requirement
satisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
Sep 17, 2026, 12:46:30 PM (10 days ago) Sep 17
to Andrey Deryabin, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Message from Gopher Robot

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
Gerrit-Change-Number: 834264
Gerrit-PatchSet: 1
Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Comment-Date: Thu, 17 Sep 2026 16:46:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Sean Liao (Gerrit)

unread,
Sep 17, 2026, 12:54:03 PM (10 days ago) Sep 17
to Andrey Deryabin, goph...@pubsubhelper.golang.org, Alan Donovan, Damien Neil, Michael Matloob, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Alan Donovan, Andrey Deryabin, Damien Neil and Michael Matloob

Sean Liao added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Sean Liao . unresolved

clean up the comments and commit message.
do not use a llm for it

Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
  • Andrey Deryabin
  • Damien Neil
  • Michael Matloob
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
    Gerrit-Change-Number: 834264
    Gerrit-PatchSet: 1
    Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
    Gerrit-CC: Sean Liao <se...@liao.dev>
    Gerrit-Attention: Michael Matloob <mat...@golang.org>
    Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Comment-Date: Thu, 17 Sep 2026 16:53:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Andrey Deryabin (Gerrit)

    unread,
    Sep 17, 2026, 1:39:21 PM (10 days ago) Sep 17
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Andrey Deryabin, Damien Neil and Michael Matloob

    Andrey Deryabin uploaded new patchset

    Andrey Deryabin uploaded patch set #2 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Andrey Deryabin
    • Damien Neil
    • Michael Matloob
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
    Gerrit-Change-Number: 834264
    Gerrit-PatchSet: 2
    unsatisfied_requirement
    open
    diffy

    Andrey Deryabin (Gerrit)

    unread,
    Sep 17, 2026, 2:47:29 PM (10 days ago) Sep 17
    to goph...@pubsubhelper.golang.org, Alan Donovan, Damien Neil, Michael Matloob, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Damien Neil, Michael Matloob and Sean Liao

    Andrey Deryabin added 1 comment

    Patchset-level comments

    clean up the comments and commit message.
    do not use a llm for it

    Andrey Deryabin

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Damien Neil
    • Michael Matloob
    • Sean Liao
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
      Gerrit-Change-Number: 834264
      Gerrit-PatchSet: 2
      Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Reviewer: Damien Neil <dn...@google.com>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
      Gerrit-CC: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Damien Neil <dn...@google.com>
      Gerrit-Attention: Alan Donovan <adon...@google.com>
      Gerrit-Comment-Date: Thu, 17 Sep 2026 18:47:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Sean Liao <se...@liao.dev>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Damien Neil (Gerrit)

      unread,
      Sep 17, 2026, 3:42:16 PM (10 days ago) Sep 17
      to Andrey Deryabin, goph...@pubsubhelper.golang.org, Alan Donovan, Michael Matloob, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Alan Donovan, Andrey Deryabin, Michael Matloob and Sean Liao

      Damien Neil voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alan Donovan
      • Andrey Deryabin
      • Michael Matloob
      • Sean Liao
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
      Gerrit-Change-Number: 834264
      Gerrit-PatchSet: 2
      Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Reviewer: Damien Neil <dn...@google.com>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
      Gerrit-CC: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
      Gerrit-Attention: Alan Donovan <adon...@google.com>
      Gerrit-Comment-Date: Thu, 17 Sep 2026 19:42:08 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Damien Neil (Gerrit)

      unread,
      Sep 17, 2026, 5:20:27 PM (10 days ago) Sep 17
      to Andrey Deryabin, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, Michael Matloob, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Alan Donovan, Andrey Deryabin, Michael Matloob and Sean Liao

      Damien Neil voted and added 1 comment

      Votes added by Damien Neil

      Code-Review+2

      1 comment

      Patchset-level comments
      File-level comment, Patchset 2 (Latest):
      Damien Neil . resolved

      Thanks!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alan Donovan
      • Andrey Deryabin
      • Michael Matloob
      • Sean Liao
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
      Gerrit-Change-Number: 834264
      Gerrit-PatchSet: 2
      Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Reviewer: Damien Neil <dn...@google.com>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
      Gerrit-CC: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
      Gerrit-Attention: Alan Donovan <adon...@google.com>
      Gerrit-Comment-Date: Thu, 17 Sep 2026 21:20:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Damien Neil (Gerrit)

      unread,
      Sep 17, 2026, 5:20:37 PM (10 days ago) Sep 17
      to Andrey Deryabin, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, Michael Matloob, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Alan Donovan, Andrey Deryabin, Michael Matloob and Sean Liao

      Damien Neil voted Auto-Submit+1

      Auto-Submit+1
      Gerrit-Comment-Date: Thu, 17 Sep 2026 21:20:31 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sean Liao (Gerrit)

      unread,
      Sep 18, 2026, 2:06:13 PM (9 days ago) Sep 18
      to Andrey Deryabin, goph...@pubsubhelper.golang.org, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, Michael Matloob, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Alan Donovan, Andrey Deryabin and Michael Matloob

      Sean Liao voted Code-Review+2

      Code-Review+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alan Donovan
      • Andrey Deryabin
      • Michael Matloob
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
      Gerrit-Change-Number: 834264
      Gerrit-PatchSet: 2
      Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Reviewer: Damien Neil <dn...@google.com>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
      Gerrit-Attention: Alan Donovan <adon...@google.com>
      Gerrit-Comment-Date: Fri, 18 Sep 2026 18:06:04 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Cherry Mui (Gerrit)

      unread,
      Sep 18, 2026, 2:59:02 PM (9 days ago) Sep 18
      to Andrey Deryabin, goph...@pubsubhelper.golang.org, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, Michael Matloob, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Alan Donovan, Andrey Deryabin and Michael Matloob

      Cherry Mui voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alan Donovan
      • Andrey Deryabin
      • Michael Matloob
      Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        • requirement satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
        Gerrit-Change-Number: 834264
        Gerrit-PatchSet: 2
        Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Reviewer: Alan Donovan <adon...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
        Gerrit-Reviewer: Sean Liao <se...@liao.dev>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
        Gerrit-Attention: Michael Matloob <mat...@golang.org>
        Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Attention: Alan Donovan <adon...@google.com>
        Gerrit-Comment-Date: Fri, 18 Sep 2026 18:58:57 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Gopher Robot (Gerrit)

        unread,
        Sep 18, 2026, 3:01:36 PM (9 days ago) Sep 18
        to Andrey Deryabin, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, Michael Matloob, Marcel van Lohuizen, golang-co...@googlegroups.com

        Gopher Robot submitted the change

        Change information

        Commit message:
        testing: escape framing markers only in test2json mode

        Fix ANSI escape sequence corruption (ESC doubling) in t.Log output
        in plain (-test.v) mode introduced by CL 751940.

        Fixes #81577.
        Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
        Reviewed-by: Damien Neil <dn...@google.com>
        Reviewed-by: Cherry Mui <cher...@google.com>
        Auto-Submit: Damien Neil <dn...@google.com>
        Reviewed-by: Sean Liao <se...@liao.dev>
        Files:
        • A src/cmd/go/testdata/script/test_chatty_ascii.txt
        • M src/testing/sub_test.go
        • M src/testing/testing.go
        Change size: S
        Delta: 3 files changed, 34 insertions(+), 2 deletions(-)
        Branch: refs/heads/master
        Submit Requirements:
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
        Gerrit-Change-Number: 834264
        Gerrit-PatchSet: 3
        Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Reviewer: Alan Donovan <adon...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
        open
        diffy
        satisfied_requirement

        Andrey Deryabin (Gerrit)

        unread,
        Sep 23, 2026, 6:42:53 AM (4 days ago) Sep 23
        to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

        Andrey Deryabin has uploaded the change for review

        Commit message

        [release-branch.go1.27] testing: escape framing markers only in test2json mode


        Fix ANSI escape sequence corruption (ESC doubling) in t.Log output
        in plain (-test.v) mode introduced by CL 751940.

        For #81577
        Fixes #81580
        Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
        Reviewed-by: Damien Neil <dn...@google.com>
        Reviewed-by: Cherry Mui <cher...@google.com>
        Auto-Submit: Damien Neil <dn...@google.com>
        Reviewed-by: Sean Liao <se...@liao.dev>

        Change diff

        diff --git a/src/cmd/go/testdata/script/test_chatty_ascii.txt b/src/cmd/go/testdata/script/test_chatty_ascii.txt
        new file mode 100644
        index 0000000..6d2570f
        --- /dev/null
        +++ b/src/cmd/go/testdata/script/test_chatty_ascii.txt
        @@ -0,0 +1,24 @@
        +# Make sure the ESC character isn't doubled.
        index 832d9e5..c7431e5 100644
        --- a/src/testing/testing.go
        +++ b/src/testing/testing.go
        @@ -1260,7 +1260,9 @@

        }

        // Escape the framing marker.
        - b = escapeMarkers(b)
        +	if o.c.chatty.json {
        + b = escapeMarkers(b)
        + }

        // If this is the start of an error, add ^O to the start of the output.
        var strErrBegin, strErrEnd string

        Change information

        Files:
        • A src/cmd/go/testdata/script/test_chatty_ascii.txt
        • M src/testing/sub_test.go
        • M src/testing/testing.go
        Change size: S
        Delta: 3 files changed, 34 insertions(+), 2 deletions(-)
        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newchange
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.27
        Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
        Gerrit-Change-Number: 837405
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Michael Matloob (Gerrit)

        unread,
        Sep 24, 2026, 1:38:17 PM (3 days ago) Sep 24
        to Andrey Deryabin, goph...@pubsubhelper.golang.org, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Alan Donovan, Andrey Deryabin and Damien Neil

        Michael Matloob voted Code-Review+2

        Code-Review+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alan Donovan
        • Andrey Deryabin
        • Damien Neil
        Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.27
        Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
        Gerrit-Change-Number: 837405
        Gerrit-PatchSet: 1
        Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Reviewer: Alan Donovan <adon...@google.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
        Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Attention: Damien Neil <dn...@google.com>
        Gerrit-Attention: Alan Donovan <adon...@google.com>
        Gerrit-Comment-Date: Thu, 24 Sep 2026 17:38:11 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mark Freeman (Gerrit)

        unread,
        Sep 24, 2026, 3:16:43 PM (3 days ago) Sep 24
        to Andrey Deryabin, goph...@pubsubhelper.golang.org, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Alan Donovan, Andrey Deryabin and Damien Neil

        Mark Freeman voted

        Code-Review+1
        Commit-Queue+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alan Donovan
        • Andrey Deryabin
        • Damien Neil
        Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.27
        Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
        Gerrit-Change-Number: 837405
        Gerrit-PatchSet: 1
        Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Reviewer: Alan Donovan <adon...@google.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Mark Freeman <ma...@golang.org>
        Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
        Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Attention: Damien Neil <dn...@google.com>
        Gerrit-Attention: Alan Donovan <adon...@google.com>
        Gerrit-Comment-Date: Thu, 24 Sep 2026 19:16:39 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mark Freeman (Gerrit)

        unread,
        Sep 24, 2026, 3:17:17 PM (3 days ago) Sep 24
        to Andrey Deryabin, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Alan Donovan, Andrey Deryabin and Damien Neil

        Mark Freeman voted

        Code-Review+2
        Commit-Queue+0
        Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
        Gerrit-Attention: Damien Neil <dn...@google.com>
        Gerrit-Attention: Alan Donovan <adon...@google.com>
        Gerrit-Comment-Date: Thu, 24 Sep 2026 19:17:10 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Michael Matloob (Gerrit)

        unread,
        Sep 24, 2026, 3:33:12 PM (3 days ago) Sep 24
        to Andrey Deryabin, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Mark Freeman, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Alan Donovan, Andrey Deryabin and Damien Neil

        Michael Matloob voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alan Donovan
        • Andrey Deryabin
        • Damien Neil
        Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.27
          Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
          Gerrit-Change-Number: 837405
          Gerrit-PatchSet: 1
          Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
          Gerrit-Reviewer: Damien Neil <dn...@google.com>
          Gerrit-Reviewer: Mark Freeman <ma...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
          Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
          Gerrit-Attention: Damien Neil <dn...@google.com>
          Gerrit-Attention: Alan Donovan <adon...@google.com>
          Gerrit-Comment-Date: Thu, 24 Sep 2026 19:33:06 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Mark Freeman (Gerrit)

          unread,
          Sep 24, 2026, 4:21:57 PM (3 days ago) Sep 24
          to Andrey Deryabin, goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Alan Donovan, Andrey Deryabin and Damien Neil

          Mark Freeman voted

          Code-Review+1
          Commit-Queue+1
          Gerrit-Comment-Date: Thu, 24 Sep 2026 20:21:50 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Andrey Deryabin (Gerrit)

          unread,
          Sep 25, 2026, 7:55:35 AM (2 days ago) Sep 25
          to goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, Mark Freeman, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Alan Donovan, Damien Neil and Mark Freeman

          Andrey Deryabin added 1 comment

          Patchset-level comments
          File-level comment, Patchset 1 (Latest):
          Andrey Deryabin . unresolved
          ```
          === RUN TestDialerFallbackDelay
          dial_test.go:380: #1: got 308.5507ms; want <= 295ms
          --- FAIL: TestDialerFallbackDelay (0.61s)
          ```

          Looks like an accidental failure in busy environment. Please restart.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alan Donovan
          • Damien Neil
          • Mark Freeman
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.27
          Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
          Gerrit-Change-Number: 837405
          Gerrit-PatchSet: 1
          Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
          Gerrit-Reviewer: Damien Neil <dn...@google.com>
          Gerrit-Reviewer: Mark Freeman <ma...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@google.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
          Gerrit-Attention: Damien Neil <dn...@google.com>
          Gerrit-Attention: Alan Donovan <adon...@google.com>
          Gerrit-Attention: Mark Freeman <ma...@golang.org>
          Gerrit-Comment-Date: Fri, 25 Sep 2026 11:55:24 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Mark Freeman (Gerrit)

          unread,
          Sep 25, 2026, 1:01:24 PM (2 days ago) Sep 25
          to Andrey Deryabin, goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Alan Donovan and Damien Neil

          Mark Freeman voted Commit-Queue+1

          Commit-Queue+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alan Donovan
          • Damien Neil
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.27
          Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
          Gerrit-Change-Number: 837405
          Gerrit-PatchSet: 1
          Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
          Gerrit-Reviewer: Damien Neil <dn...@google.com>
          Gerrit-Reviewer: Mark Freeman <ma...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@google.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
          Gerrit-Attention: Damien Neil <dn...@google.com>
          Gerrit-Attention: Alan Donovan <adon...@google.com>
          Gerrit-Comment-Date: Fri, 25 Sep 2026 17:01:17 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Mark Freeman (Gerrit)

          unread,
          Sep 25, 2026, 1:34:03 PM (2 days ago) Sep 25
          to Andrey Deryabin, goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Alan Donovan, Andrey Deryabin and Damien Neil

          Mark Freeman voted Commit-Queue+1

          Commit-Queue+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alan Donovan
          • Andrey Deryabin
          • Damien Neil
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.27
          Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
          Gerrit-Change-Number: 837405
          Gerrit-PatchSet: 1
          Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
          Gerrit-Reviewer: Damien Neil <dn...@google.com>
          Gerrit-Reviewer: Mark Freeman <ma...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@google.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
          Gerrit-Attention: Andrey Deryabin <andrey....@adv.team>
          Gerrit-Attention: Damien Neil <dn...@google.com>
          Gerrit-Attention: Alan Donovan <adon...@google.com>
          Gerrit-Comment-Date: Fri, 25 Sep 2026 17:33:58 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Andrey Deryabin (Gerrit)

          unread,
          12:01 AM (16 hours ago) 12:01 AM
          to goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, Mark Freeman, Michael Matloob, Alan Donovan, Damien Neil, Marcel van Lohuizen, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Alan Donovan and Damien Neil

          Andrey Deryabin added 1 comment

          Patchset-level comments
          Andrey Deryabin . resolved
          ```
          === RUN TestDialerFallbackDelay
          dial_test.go:380: #1: got 308.5507ms; want <= 295ms
          --- FAIL: TestDialerFallbackDelay (0.61s)
          ```

          Looks like an accidental failure in busy environment. Please restart.

          Andrey Deryabin

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alan Donovan
          • Damien Neil
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.27
          Gerrit-Change-Id: I968ac99d46280be16d88e867b8b6c651816715cf
          Gerrit-Change-Number: 837405
          Gerrit-PatchSet: 1
          Gerrit-Owner: Andrey Deryabin <andrey....@adv.team>
          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
          Gerrit-Reviewer: Damien Neil <dn...@google.com>
          Gerrit-Reviewer: Mark Freeman <ma...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@google.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
          Gerrit-Attention: Damien Neil <dn...@google.com>
          Gerrit-Attention: Alan Donovan <adon...@google.com>
          Gerrit-Comment-Date: Sun, 27 Sep 2026 04:00:55 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Andrey Deryabin <andrey....@adv.team>
          satisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages