[go] runtime: correct a log message in TestCleanupLost

3 views
Skip to first unread message

Lin Lin (Gerrit)

unread,
Dec 20, 2025, 10:47:33 AM (yesterday) Dec 20
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Lin Lin has uploaded the change for review

Commit message

runtime: correct a log message in TestCleanupLost

Updates #76929
Change-Id: I3951b14ec979b389773f782a0a89f8277c7b9a59

Change diff

diff --git a/src/runtime/mcleanup_test.go b/src/runtime/mcleanup_test.go
index 5afe85e..bbffc31 100644
--- a/src/runtime/mcleanup_test.go
+++ b/src/runtime/mcleanup_test.go
@@ -333,7 +333,7 @@
runtime.GC()
runtime.BlockUntilEmptyCleanupQueue(int64(10 * time.Second))
if got := int(got.Load()); got != want {
- t.Errorf("expected %d cleanups to be executed, got %d", got, want)
+ t.Errorf("expected %d cleanups to be executed, got %d", want, got)
}
}

Change information

Files:
  • M src/runtime/mcleanup_test.go
Change size: XS
Delta: 1 file changed, 1 insertion(+), 1 deletion(-)
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: I3951b14ec979b389773f782a0a89f8277c7b9a59
Gerrit-Change-Number: 731680
Gerrit-PatchSet: 1
Gerrit-Owner: Lin Lin <linsite...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Ian Lance Taylor (Gerrit)

unread,
5:09 PM (6 hours ago) 5:09 PM
to Lin Lin, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Austin Clements, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Austin Clements, Keith Randall, Lin Lin and Martin Möhrmann

Ian Lance Taylor added 1 comment

File src/runtime/mcleanup_test.go
Line 336, Patchset 1 (Latest): t.Errorf("expected %d cleanups to be executed, got %d", want, got)
Ian Lance Taylor . unresolved

As long as we're touching this anyhow, why don't we follow https://go.dev/wiki/CodeReviewComments#useful-test-failures and use


```suggestion
t.Errorf("%d cleanups executed, expected %d", got, want)
```
Open in Gerrit

Related details

Attention is currently required from:
  • Austin Clements
  • Keith Randall
  • Lin Lin
  • Martin Möhrmann
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: I3951b14ec979b389773f782a0a89f8277c7b9a59
    Gerrit-Change-Number: 731680
    Gerrit-PatchSet: 1
    Gerrit-Owner: Lin Lin <linsite...@gmail.com>
    Gerrit-Reviewer: Austin Clements <aus...@google.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
    Gerrit-Attention: Lin Lin <linsite...@gmail.com>
    Gerrit-Attention: Austin Clements <aus...@google.com>
    Gerrit-Comment-Date: Sun, 21 Dec 2025 22:09:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Lin Lin (Gerrit)

    unread,
    6:25 PM (5 hours ago) 6:25 PM
    to goph...@pubsubhelper.golang.org, Ian Lance Taylor, Austin Clements, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Austin Clements, Ian Lance Taylor, Keith Randall and Martin Möhrmann

    Lin Lin added 2 comments

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

    Do you think that the result of `runtime.BlockUntilEmptyCleanupQueue` should be checked in case of a timeout and non-empty queue?

    File src/runtime/mcleanup_test.go
    Line 336, Patchset 1 (Latest): t.Errorf("expected %d cleanups to be executed, got %d", want, got)
    Ian Lance Taylor . unresolved

    As long as we're touching this anyhow, why don't we follow https://go.dev/wiki/CodeReviewComments#useful-test-failures and use


    ```suggestion
    t.Errorf("%d cleanups executed, expected %d", got, want)
    ```
    Lin Lin

    Thanks, Ian. I don't know there is such a wiki.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Austin Clements
    • Ian Lance Taylor
    • Keith Randall
    • Martin Möhrmann
    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: I3951b14ec979b389773f782a0a89f8277c7b9a59
    Gerrit-Change-Number: 731680
    Gerrit-PatchSet: 1
    Gerrit-Owner: Lin Lin <linsite...@gmail.com>
    Gerrit-Reviewer: Austin Clements <aus...@google.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
    Gerrit-Attention: Austin Clements <aus...@google.com>
    Gerrit-Comment-Date: Sun, 21 Dec 2025 23:24:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
    unsatisfied_requirement
    open
    diffy

    Lin Lin (Gerrit)

    unread,
    8:32 PM (3 hours ago) 8:32 PM
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Austin Clements, Ian Lance Taylor, Keith Randall and Martin Möhrmann

    Lin Lin uploaded new patchset

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

    Related details

    Attention is currently required from:
    • Austin Clements
    • Ian Lance Taylor
    • Keith Randall
    • Martin Möhrmann
    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: I3951b14ec979b389773f782a0a89f8277c7b9a59
    Gerrit-Change-Number: 731680
    Gerrit-PatchSet: 2
    unsatisfied_requirement
    open
    diffy

    Lin Lin (Gerrit)

    unread,
    10:06 PM (1 hour ago) 10:06 PM
    to goph...@pubsubhelper.golang.org, Ian Lance Taylor, Austin Clements, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Austin Clements, Ian Lance Taylor, Keith Randall and Martin Möhrmann

    Lin Lin added 2 comments

    Patchset-level comments

    Do you think that the result of `runtime.BlockUntilEmptyCleanupQueue` should be checked in case of a timeout and non-empty queue?

    Lin Lin

    Acknowledged

    File src/runtime/mcleanup_test.go
    Line 336, Patchset 1: t.Errorf("expected %d cleanups to be executed, got %d", want, got)
    Ian Lance Taylor . resolved

    As long as we're touching this anyhow, why don't we follow https://go.dev/wiki/CodeReviewComments#useful-test-failures and use


    ```suggestion
    t.Errorf("%d cleanups executed, expected %d", got, want)
    ```
    Lin Lin

    Thanks, Ian. I don't know there is such a wiki.

    Lin Lin

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Austin Clements
    • Ian Lance Taylor
    • Keith Randall
    • Martin Möhrmann
    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: I3951b14ec979b389773f782a0a89f8277c7b9a59
      Gerrit-Change-Number: 731680
      Gerrit-PatchSet: 2
      Gerrit-Owner: Lin Lin <linsite...@gmail.com>
      Gerrit-Reviewer: Austin Clements <aus...@google.com>
      Gerrit-Reviewer: Keith Randall <k...@golang.org>
      Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Attention: Keith Randall <k...@golang.org>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
      Gerrit-Attention: Austin Clements <aus...@google.com>
      Gerrit-Comment-Date: Mon, 22 Dec 2025 03:06:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
      Comment-In-Reply-To: Lin Lin <linsite...@gmail.com>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages