]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: put the print where it will help
authorRuss Cox <rsc@golang.org>
Wed, 21 Dec 2011 22:49:29 +0000 (17:49 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 21 Dec 2011 22:49:29 +0000 (17:49 -0500)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5501058

src/pkg/os/exec/exec_test.go

index d7e61e73795cc5fd0084f47d1525a51fdf6f0981..1e0ea9772510bcd02a903f9d7e2d70b17ec8c86f 100644 (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)