misc: ensure that test overlay directories are writable

Otherwise, the test cannot create new files in the directory.

Updates #32407
Updates #30316

Change-Id: Ief0df94a202be92f57d458d4ab4e4daa9ec189b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/206458
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Bryan C. Mills 2019-11-11 11:36:36 -05:00
parent 70be4819a4
commit 6375fe4b9e
10 changed files with 10 additions and 10 deletions

View file

@ -52,7 +52,7 @@ func overlayDir(dstRoot, srcRoot string) error {
// Always copy directories (don't symlink them).
// If we add a file in the overlay, we don't want to add it in the original.
if info.IsDir() {
return os.Mkdir(dstPath, perm)
return os.Mkdir(dstPath, perm|0200)
}
// If the OS supports symlinks, use them instead of copying bytes.