[tools] gopls/internal/test/integration/fake: retry reads of exclusive-use files

0 views
Skip to first unread message

Alan Donovan (Gerrit)

unread,
Jun 30, 2026, 1:39:15 PM (23 hours ago) Jun 30
to David du Colombier, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, golang...@luci-project-accounts.iam.gserviceaccount.com, Hongxiang Jiang, Richard Miller, golang-co...@googlegroups.com

Alan Donovan submitted the change

Change information

Commit message:
gopls/internal/test/integration/fake: retry reads of exclusive-use files

The fake editor detects file changes by polling.
Workdir.pollFiles reads every file in the working
directory. On Plan 9 the go command opens go.mod and
other files with the exclusive-use bit while reading
them through lockedfile, so while gopls loads the
workspace with concurrent go commands, the read of
go.mod in pollFiles intermittently fails with
"exclusive use file already open" on ramfs, or
"exclusive lock" on fossil.

The error propagates out of CheckForFileChanges, and
ApplyQuickFixes reported it as "no quick fixes were
applied". This is how TestQuickFixIssue70755 fails on
the plan9-386 and plan9-amd64 builders.

Make robustio retry these exclusive-use errors on
Plan 9, recognizing the same lock strings as cmd/go's
lockedfile, and read through robustio.ReadFile in
Workdir.ReadFile and pollFiles. Also make
ApplyQuickFixes return the underlying error instead of
masking it.
Change-Id: Id55db2cc18f7b75e2ae12d016d1ae0413529ac21
Auto-Submit: Alan Donovan <adon...@google.com>
Commit-Queue: Alan Donovan <adon...@google.com>
Reviewed-by: Alan Donovan <adon...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M gopls/internal/test/integration/fake/editor.go
  • M gopls/internal/test/integration/fake/workdir.go
  • M internal/robustio/robustio_flaky.go
  • M internal/robustio/robustio_other.go
  • M internal/robustio/robustio_plan9.go
Change size: M
Delta: 5 files changed, 37 insertions(+), 22 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: Id55db2cc18f7b75e2ae12d016d1ae0413529ac21
Gerrit-Change-Number: 795200
Gerrit-PatchSet: 3
Gerrit-Owner: David du Colombier <0in...@gmail.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: David du Colombier <0in...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Richard Miller <millerr...@gmail.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages