Skip to content

Commit 159ae71

Browse files
committed
ssh/terminal: fix TestMakeRawState on iOS
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 75e913e commit 159ae71

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ssh/terminal/terminal_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"bytes"
1111
"io"
1212
"os"
13+
"runtime"
1314
"testing"
1415
)
1516

@@ -326,6 +327,11 @@ func TestMakeRawState(t *testing.T) {
326327
if err != nil {
327328
t.Fatalf("failed to get terminal state from GetState: %s", err)
328329
}
330+
331+
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
332+
t.Skip("MakeRaw not allowed on iOS; skipping test")
333+
}
334+
329335
defer Restore(fd, st)
330336
raw, err := MakeRaw(fd)
331337
if err != nil {

0 commit comments

Comments
 (0)