Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/dlv: fix race in test (go-delve#805)
% go test -race -v -short === RUN TestBuild ================== WARNING: DATA RACE Write at 0x00c4201379a0 by goroutine 9: os.(*file).close() /usr/local/go/src/os/file_unix.go:143 +0x10a os.(*File).Close() /usr/local/go/src/os/file_unix.go:132 +0x55 os/exec.(*Cmd).closeDescriptors() /usr/local/go/src/os/exec/exec.go:263 +0x67 os/exec.(*Cmd).Wait() /usr/local/go/src/os/exec/exec.go:448 +0x2b8 github.com/derekparker/delve/cmd/dlv.TestBuild.func1() /home/kbuilder/go/src/github.com/derekparker/delve/cmd/dlv/dlv_test.go:82 +0x8e github.com/derekparker/delve/cmd/dlv.TestBuild() /home/kbuilder/go/src/github.com/derekparker/delve/cmd/dlv/dlv_test.go:104 +0xb6a testing.tRunner() /usr/local/go/src/testing/testing.go:657 +0x107 Previous read at 0x00c4201379a0 by goroutine 12: os.(*File).Read() /usr/local/go/src/os/file.go:98 +0x70 bufio.(*Scanner).Scan() /usr/local/go/src/bufio/scan.go:207 +0x539 github.com/derekparker/delve/cmd/dlv.TestBuild.func2() /home/kbuilder/go/src/github.com/derekparker/delve/cmd/dlv/dlv_test.go:93 +0x38 Change-Id: I09d188dbf964fe4af0b33b6a8fcfe51396176b7e
- Loading branch information