]> Cypherpunks repositories - gostls13.git/commit
cmd/link: write output in temp dir in TestUnlinkableObj
authorCherry Mui <cherryyz@google.com>
Tue, 22 Mar 2022 20:38:13 +0000 (16:38 -0400)
committerCherry Mui <cherryyz@google.com>
Tue, 22 Mar 2022 21:04:24 +0000 (21:04 +0000)
commitac3efc83e6747c3e7e56250774332cec5d2862f4
treec5b83ade03e8bb4c23a227ab842e8b6a840bcd69
parent946167906ed8646c433c257b074a10e01f0a7dab
cmd/link: write output in temp dir in TestUnlinkableObj

For unlinkable object the link will fail, but it opens the output
file in writable mode first then delete it on failure. This fails
if the current directory is not writable. Write to the temporary
directory instead.

Change-Id: Iefd73b5cc8efdc0f11b12edc0920169a8ad3f37c
Reviewed-on: https://go-review.googlesource.com/c/go/+/394755
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/link/link_test.go