aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/os/exec/exec_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/os/exec/exec_test.go')
-rw-r--r--libgo/go/os/exec/exec_test.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/libgo/go/os/exec/exec_test.go b/libgo/go/os/exec/exec_test.go
index aa33570f..1e38285 100644
--- a/libgo/go/os/exec/exec_test.go
+++ b/libgo/go/os/exec/exec_test.go
@@ -146,11 +146,11 @@ func TestCatGoodAndBadFile(t *testing.T) {
}
}
-func TestNoExistBinary(t *testing.T) {
- // Can't run a non-existent binary
- err := exec.Command("/no-exist-binary").Run()
+func TestNoExistExecutable(t *testing.T) {
+ // Can't run a non-existent executable
+ err := exec.Command("/no-exist-executable").Run()
if err == nil {
- t.Error("expected error from /no-exist-binary")
+ t.Error("expected error from /no-exist-executable")
}
}
@@ -338,7 +338,7 @@ func TestPipeLookPathLeak(t *testing.T) {
}
for i := 0; i < 6; i++ {
- cmd := exec.Command("something-that-does-not-exist-binary")
+ cmd := exec.Command("something-that-does-not-exist-executable")
cmd.StdoutPipe()
cmd.StderrPipe()
cmd.StdinPipe()
@@ -408,6 +408,12 @@ var testedAlreadyLeaked = false
// stdin, stdout, stderr, epoll/kqueue, 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.PollDescriptor() == n {
+ n++
+ }
for _, arg := range os.Args {
if strings.HasPrefix(arg, "-test.testlogfile=") {
n++
@@ -1009,9 +1015,6 @@ func TestContext(t *testing.T) {
}
func TestContextCancel(t *testing.T) {
- if testenv.Builder() == "windows-386-xp" {
- t.Skipf("known to fail on Windows XP. Issue 17245")
- }
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
c := helperCommandContext(t, ctx, "cat")