[tools] gopls/internal/test/integration: respect empty mode filter in runner

0 views
Skip to first unread message

Hyang-Ah Hana Kim (Gerrit)

unread,
Jun 26, 2026, 6:33:24 PM (20 hours ago) Jun 26
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Alex Putman, golang-co...@googlegroups.com

Hyang-Ah Hana Kim submitted the change

Change information

Commit message:
gopls/internal/test/integration: respect empty mode filter in runner

Fix a bug in the integration test runner where specifying Modes(0)
(an empty mode filter) was treated as "unset" due to a zero-value
check, causing the runner to fall back to default modes.

This CL fixes this by changing the runner's modes configuration to a
pointer, allowing us to distinguish between "unset" (nil) and
"explicitly empty" (0, NoMode).

This bug caused TestSimultaneousEdits to occasionally deadlock on
builders running with -short.

Under -short, DefaultModes() returns only Default mode (1), as defined
in regtest.go. TestSimultaneousEdits restricts its execution to
Modes(DefaultModes() & (Forwarded|SeparateProcess))

The intention was to run the test only in forwarded modes.
However, DefaultModes() = 1, Forwarded=2 and SeparateProcess=4,
so the resultng mode filter always evaluates to 0 (empty).

Due to the fallback bug, the runner saw 0 as "unset" and
incorrectly fell back to running the test in Default mode
(value 1) anyway, triggering a deadlock on the unbuffered net.Pipe
transport.

Also add a regression test in the misc package to ensure Modes(0) is
respected and does not fall back.

For golang/go#76713
Change-Id: Ia1b06a9eedf7ad4d9cab424a3f88a5bcb5ad1063
Reviewed-by: Alex Putman <apu...@golang.org>
Files:
  • A gopls/internal/test/integration/misc/runner_test.go
  • M gopls/internal/test/integration/options.go
  • M gopls/internal/test/integration/runner.go
Change size: M
Delta: 3 files changed, 87 insertions(+), 8 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: tools
Gerrit-Branch: master
Gerrit-Change-Id: Ia1b06a9eedf7ad4d9cab424a3f88a5bcb5ad1063
Gerrit-Change-Number: 794160
Gerrit-PatchSet: 4
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Alex Putman <apu...@golang.org>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages