1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:54:40 -07:00

os/exec: put the print where it will help

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5501058
This commit is contained in:
Russ Cox 2011-12-21 17:49:29 -05:00
parent 03805054e3
commit fa02bac809

View File

@ -262,11 +262,11 @@ func TestHelperProcess(*testing.T) {
f, err := os.Open(os.Args[0])
if err != nil {
fmt.Printf("error opening file with expected fd %d: %v", wantfd, err)
fmt.Println(Command("lsof", "-p", fmt.Sprint(os.Getpid())).CombinedOutput())
os.Exit(1)
}
if got := f.Fd(); got != wantfd {
fmt.Printf("leaked parent file. fd = %d; want %d", got, wantfd)
fmt.Println(Command("lsof", "-p", fmt.Sprint(os.Getpid())).CombinedOutput())
os.Exit(1)
}
files = append(files, f)