aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2025-11-13 11:43:55 -0500
committerRuss Cox <rsc@golang.org>2025-11-13 09:27:58 -0800
commit028375323f39b2d59bae0abfe20ba187c42bcf16 (patch)
tree04117d02530ec1576e15f50d1745dff361fe7a92 /src/runtime/testdata
parent4ebf295b0b1740caac6302cc824ebd0f6175c1d5 (diff)
downloadgo-028375323f39b2d59bae0abfe20ba187c42bcf16.tar.xz
cmd/go/internal/modfetch/codehost: fix flaky TestReadZip
In normal use by the go command, ReadZip always happens after Stat, which makes sure that the relevant revision has been fetched to local disk. But TestReadZip calls ReadZip directly, and ReadZip was not ensuring that fetch had happened. This made 'go test' pass (because other earlier tests had done Stat of the hg test repo) but 'go test -run=ReadZip' fail by itself. And on big enough machines, the tests that were doing the Stat were running in parallel with ReadZip, causing non-deterministic failures depending on whether the Stat completed before ReadZip started. Fix the race by calling Stat directly in ReadZip, like we already do in ReadFile. Fixes longtest builder flake. Change-Id: Ib42f64876b7ef51d8148c616539b412b42f8b24e Reviewed-on: https://go-review.googlesource.com/c/go/+/720280 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Michael Matloob <matloob@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/testdata')
0 files changed, 0 insertions, 0 deletions