aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-03-24 13:13:38 -0700
committerIan Lance Taylor <iant@golang.org>2020-03-24 22:21:50 +0000
commit9f343b1942356e0c87c6994118be298f634e6b4d (patch)
treebda9cdc47a08f726623130b7d43b857303c36aaf /src/os/exec/exec_test.go
parent60a964ea45db28eb7a4ca291008473da7d3d2c70 (diff)
downloadgo-9f343b1942356e0c87c6994118be298f634e6b4d.tar.xz
os/exec: for TestExtraFiles failure, print readlink of unexpected fd
For #25628 Change-Id: If1dce7ba9310e1418e67b9954c989471b775a28e Reviewed-on: https://go-review.googlesource.com/c/go/+/225278 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/os/exec/exec_test.go')
-rw-r--r--src/os/exec/exec_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index dce66c5c2e..91dd0a41ac 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -861,6 +861,9 @@ func TestHelperProcess(*testing.T) {
}
if got := f.Fd(); got != wantfd {
fmt.Printf("leaked parent file. fd = %d; want %d\n", got, wantfd)
+ fdfile := fmt.Sprintf("/proc/self/fd/%d", wantfd)
+ link, err := os.Readlink(fdfile)
+ fmt.Printf("readlink(%q) = %q, %v\n", fdfile, link, err)
var args []string
switch runtime.GOOS {
case "plan9":