diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
commit | a16e30d162c1c7408db7821e7b9513cefa09c6ca (patch) | |
tree | af752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/cmd/go/testdata/script/mod_download_concurrent_read.txt | |
parent | 91e4d2d57bc341dd82c98247117114c851380aef (diff) | |
parent | cf6cfba4d5358404dd890f6025e573a4b2156543 (diff) | |
download | go-dev.link.tar.gz go-dev.link.zip |
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge.
Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/cmd/go/testdata/script/mod_download_concurrent_read.txt')
-rw-r--r-- | src/cmd/go/testdata/script/mod_download_concurrent_read.txt | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/cmd/go/testdata/script/mod_download_concurrent_read.txt b/src/cmd/go/testdata/script/mod_download_concurrent_read.txt index bb9c588896..caf105c6e5 100644 --- a/src/cmd/go/testdata/script/mod_download_concurrent_read.txt +++ b/src/cmd/go/testdata/script/mod_download_concurrent_read.txt @@ -1,27 +1,18 @@ # This test simulates a process watching for changes and reading files in # module cache as a module is extracted. # -# By default, we unzip a downloaded module into a temporary directory with a -# random name, then rename the directory into place. On Windows, this fails -# with ERROR_ACCESS_DENIED if another process (e.g., antivirus) opens files -# in the directory. +# Before Go 1.16, we extracted each module zip to a temporary directory with +# a random name, then renamed that into place with os.Rename. On Windows, +# this failed with ERROR_ACCESS_DENIED when another process (usually an +# anti-virus scanner) opened files in the temporary directory. This test +# simulates that behavior, verifying golang.org/issue/36568. # -# Setting GODEBUG=modcacheunzipinplace=1 opts into new behavior: a downloaded -# module is unzipped in place. A .partial file is created elsewhere to indicate -# that the extraction is incomplete. -# -# Verifies golang.org/issue/36568. +# Since 1.16, we extract to the final directory, but we create a .partial file +# so that if we crash, other processes know the directory is incomplete. [!windows] skip [short] skip -# Control case: check that the default behavior fails. -# This is commented out to avoid flakiness. We can't reproduce the failure -# 100% of the time. -# ! go run downloader.go - -# Experiment: check that the new behavior does not fail. -env GODEBUG=modcacheunzipinplace=1 go run downloader.go -- go.mod -- |