1
0
mirror of https://github.com/golang/go synced 2024-11-06 06:26:13 -07:00
go/src/os
Michael Munday 221bc23af6 os/exec: deflake TestPipeLookPathLeak
The number of open file descriptors reported by lsof is unreliable
because it depends on whether the parent process (the test) closed
the file descriptors it passed into the child process (lsof) before
lsof runs.

Reading /proc/self/fd directly on Linux appears to be much more
reliable and still detects any file descriptor leaks originating
from attempting to run an executable that cannot be found (issue
#5071). If /proc/self/fd is not available (e.g. on Darwin) then we
fall back to lsof and tolerate small differences in open file
descriptor counts.

Fixes #19243.

Change-Id: I052b0c129e609010f1083e43a9911cba154117bf
Reviewed-on: https://go-review.googlesource.com/37343
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-24 22:48:00 +00:00
..
exec os/exec: deflake TestPipeLookPathLeak 2017-02-24 22:48:00 +00:00
signal runtime: handle SIGPIPE in c-archive and c-shared programs 2017-02-03 20:07:36 +00:00
user os/user: cache the result of user.Current 2017-02-06 18:49:52 +00:00
dir_plan9.go
dir_unix.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
dir_windows.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
dir.go
env_test.go syscall: Clearenv now unsets env vars on Windows 2016-11-14 00:04:03 +00:00
env_unix_test.go
env.go
error_plan9.go
error_posix.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
error_test.go
error_unix_test.go
error_unix.go
error_windows_test.go
error_windows.go
error.go
example_test.go
exec_plan9.go
exec_posix.go
exec_unix.go
exec_windows.go
exec.go
executable_darwin.go
executable_freebsd.go
executable_plan9.go
executable_procfs.go os: Executable can use /proc/self/exe on android 2016-11-29 00:24:22 +00:00
executable_solaris.go
executable_test.go
executable_windows.go
executable.go
export_test.go
export_windows_test.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
file_plan9.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
file_posix.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
file_unix.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
file_windows.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
file.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
getwd_darwin.go
getwd.go
os_test.go os: skip TestPipeThreads on Solaris 2017-02-15 21:27:59 +00:00
os_unix_test.go
os_windows_test.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
path_plan9.go
path_test.go
path_unix.go
path_windows_test.go os: on Windows, don't fix long paths that aren't long 2016-11-08 23:06:17 +00:00
path_windows.go os: must fixup path when 248 bytes long 2016-12-13 03:21:00 +00:00
path.go
pipe_bsd.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
pipe_linux.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
pipe_test.go
proc.go
stat_darwin.go
stat_dragonfly.go
stat_freebsd.go
stat_linux.go
stat_nacl.go
stat_netbsd.go
stat_openbsd.go
stat_plan9.go
stat_solaris.go
stat_unix.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
stat_windows.go os: use poller for file I/O 2017-02-15 19:31:55 +00:00
sticky_bsd.go
sticky_notbsd.go
str.go
sys_bsd.go
sys_darwin.go os: remove incorrect detection of O_CLOEXEC flag on darwin 2017-02-18 16:14:15 +00:00
sys_freebsd.go
sys_linux.go
sys_nacl.go
sys_plan9.go
sys_solaris.go
sys_unix.go
sys_windows.go
sys.go
types_plan9.go
types_unix.go
types_windows.go os: make Stdin.Stat() return ModeCharDevice if Stdin is console 2017-02-07 23:59:31 +00:00
types.go
wait_unimp.go
wait_wait6.go
wait_waitid.go