]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: skip possible netpoll pipe in known FDs in test
authorIan Lance Taylor <iant@golang.org>
Tue, 22 Oct 2019 07:54:22 +0000 (00:54 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 22 Oct 2019 08:54:50 +0000 (08:54 +0000)
Fixes #35045

Change-Id: I90ac29882c7d03936c98c4116a8bccdd2ecbf76b
Reviewed-on: https://go-review.googlesource.com/c/go/+/202445
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/os/exec/exec_test.go

index 60a8d0228b3f68b9b67d681a2d0d173269586c51..19d2111743e42c6db319d55a7b56cec8f124319c 100644 (file)
@@ -453,13 +453,13 @@ var testedAlreadyLeaked = false
 
 // basefds returns the number of expected file descriptors
 // to be present in a process at start.
-// stdin, stdout, stderr, epoll/kqueue, maybe testlog
+// stdin, stdout, stderr, epoll/kqueue, epoll/kqueue pipe, maybe testlog
 func basefds() uintptr {
        n := os.Stderr.Fd() + 1
        // The poll (epoll/kqueue) descriptor can be numerically
        // either between stderr and the testlog-fd, or after
        // testlog-fd.
-       if poll.IsPollDescriptor(n) {
+       for poll.IsPollDescriptor(n) {
                n++
        }
        for _, arg := range os.Args {