[tools] internal/robustio: don't use syscall.Errno on Plan 9

2 views
Skip to first unread message

David du Colombier (Gerrit)

unread,
Jul 2, 2026, 1:53:03 PM (2 days ago) Jul 2
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Hongxiang Jiang, Richard Miller, golang...@luci-project-accounts.iam.gserviceaccount.com, Dmitri Shuralyov, Dmitri Shuralyov, Alan Donovan, golang-co...@googlegroups.com

David du Colombier submitted the change

Change information

Commit message:
internal/robustio: don't use syscall.Errno on Plan 9

CL 795200 added plan9 to the build constraint of
robustio_flaky.go, whose retry function inspects
syscall.Errno to keep the error with the lowest
errno seen across retries.

syscall.Errno didn't exist on Plan 9 before Go 1.27,
since Plan 9 errors are strings rather than numeric
errnos. Building internal/robustio for Plan 9 with
Go 1.26 or earlier, which x/tools still supports,
fails with "undefined: syscall.Errno".

Extract the errno through a per-platform getErrno
helper, so the shared retry code no longer names
syscall.Errno. On Plan 9, getErrno reports no
errno and retry keeps the first error, as it
already does elsewhere when the error carries no
errno.

Fixes golang/go#80225
Change-Id: I9295e0e1a1acb95812c9a09396384cb5d3339b64
Reviewed-by: Hongxiang Jiang <hxj...@golang.org>
Reviewed-by: Richard Miller <millerr...@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M internal/robustio/robustio_darwin.go
  • M internal/robustio/robustio_flaky.go
  • M internal/robustio/robustio_plan9.go
  • M internal/robustio/robustio_windows.go
Change size: S
Delta: 4 files changed, 22 insertions(+), 4 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: I9295e0e1a1acb95812c9a09396384cb5d3339b64
Gerrit-Change-Number: 796320
Gerrit-PatchSet: 2
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