Skip to content

Commit

Permalink
ssh/terminal: fix TestMakeRawState on iOS
Browse files Browse the repository at this point in the history
Fix the following failure on iOS:

--- FAIL: TestMakeRawState (0.00s)
	terminal_test.go:332: failed to get terminal state from MakeRaw: operation not permitted

Updates golang/go#25535

Change-Id: I1ab6feb31ba5e89dc0d5f2a1cefd56c09f178e80
Reviewed-on: https://go-review.googlesource.com/114415
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
tklauser committed May 24, 2018
1 parent 75e913e commit 159ae71
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ssh/terminal/terminal_test.go
Expand Up @@ -10,6 +10,7 @@ import (
"bytes"
"io"
"os"
"runtime"
"testing"
)

Expand Down Expand Up @@ -326,6 +327,11 @@ func TestMakeRawState(t *testing.T) {
if err != nil {
t.Fatalf("failed to get terminal state from GetState: %s", err)
}

if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
t.Skip("MakeRaw not allowed on iOS; skipping test")
}

defer Restore(fd, st)
raw, err := MakeRaw(fd)
if err != nil {
Expand Down

0 comments on commit 159ae71

Please sign in to comment.