mirror of
https://github.com/golang/go
synced 2024-11-24 18:50:05 -07:00
os/exec: dump lsof on failure
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5504063
This commit is contained in:
parent
89c7e206d1
commit
914ab8a23f
@ -262,6 +262,7 @@ func TestHelperProcess(*testing.T) {
|
|||||||
f, err := os.Open(os.Args[0])
|
f, err := os.Open(os.Args[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("error opening file with expected fd %d: %v", wantfd, err)
|
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)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if got := f.Fd(); got != wantfd {
|
if got := f.Fd(); got != wantfd {
|
||||||
|
Loading…
Reference in New Issue
Block a user