mirror of
https://github.com/golang/go
synced 2024-11-17 14:04:48 -07:00
internal/poll: report open fds when TestSplicePipePool fails
For #48066 Change-Id: I1152a1c15756df35b71b27d3e7025d97da9e70b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/348579 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
This commit is contained in:
parent
2481f6e367
commit
6edc57983a
@ -67,6 +67,13 @@ func TestSplicePipePool(t *testing.T) {
|
|||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case <-expiredTime.C:
|
case <-expiredTime.C:
|
||||||
|
t.Logf("descriptors to check: %v", fds)
|
||||||
|
for _, fd := range fds {
|
||||||
|
_, _, errno := syscall.Syscall(unix.FcntlSyscall, uintptr(fd), syscall.F_GETPIPE_SZ, 0)
|
||||||
|
if errno == 0 {
|
||||||
|
t.Errorf("descriptor %d still open", fd)
|
||||||
|
}
|
||||||
|
}
|
||||||
t.Fatal("at least one pipe is still open")
|
t.Fatal("at least one pipe is still open")
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user