Skip to content

Commit

Permalink
os/exec: for TestExtraFiles failure, print readlink of unexpected fd
Browse files Browse the repository at this point in the history
For #25628

Change-Id: If1dce7ba9310e1418e67b9954c989471b775a28e
Reviewed-on: https://go-review.googlesource.com/c/go/+/225278
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Bryan C. Mills <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
ianlancetaylor committed Mar 24, 2020
1 parent 60a964e commit 9f343b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/os/exec/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 9f343b1

Please sign in to comment.