Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ptsname() for big-endian architectures #59

Merged
merged 1 commit into from
Dec 5, 2020
Merged

Conversation

timotto
Copy link
Contributor

@timotto timotto commented Dec 5, 2020

This pull request fixes the same issue on big-endian architectures as the inspiring pull request to github.com/containerd/console.

[linux1@lnx1a term]$ uname -a
Linux lnx1a.marist.edu 4.18.0-193.13.2.el8_2.s390x #1 SMP Mon Jul 13 23:23:50 UTC 2020 s390x s390x s390x GNU/Linux
[linux1@lnx1a term]$ git log -1
commit d02e49dd31404f3c3cf4b5469b28942194e0ca23 (HEAD -> master, tag: v1.1.0)
Merge: 8ae29be d86faa3
Author: Dave Cheney <[email protected]>
Date:   Mon Sep 14 12:15:29 2020 +1000

    Merge branch 'gdamore-getspeed'
[linux1@lnx1a term]$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
  (use "git pull" to update your local branch)

nothing to commit, working tree clean
[linux1@lnx1a term]$ go test ./...
--- FAIL: TestTermSetCbreak (0.00s)
    term_test.go:97: unable to open "/dev/pts/8589934592": no such file or directory
--- FAIL: TestTermSetRaw (0.00s)
    term_test.go:97: unable to open "/dev/pts/17179869184": no such file or directory
--- FAIL: TestTermSetSpeed (0.00s)
    term_test.go:97: unable to open "/dev/pts/21474836480": no such file or directory
--- FAIL: TestTermSetReadTimeout (0.00s)
    term_test.go:97: unable to open "/dev/pts/25769803776": no such file or directory
--- FAIL: TestTermSetFlowControl (0.00s)
    term_test.go:97: unable to open "/dev/pts/30064771072": no such file or directory
--- FAIL: TestTermRestore (0.00s)
    term_test.go:97: unable to open "/dev/pts/34359738368": no such file or directory
FAIL
FAIL	github.com/pkg/term	0.004s
--- FAIL: TestTcflush (0.00s)
    termios_test.go:159: unable to open "/dev/pts/8589934592": no such file or directory
--- FAIL: TestTcgetattr (0.00s)
    termios_test.go:159: unable to open "/dev/pts/17179869184": no such file or directory
--- FAIL: TestTcsetattr (0.00s)
    termios_test.go:159: unable to open "/dev/pts/21474836480": no such file or directory
--- FAIL: TestTcsendbreak (0.00s)
    termios_test.go:159: unable to open "/dev/pts/25769803776": no such file or directory
--- FAIL: TestTcdrain (0.00s)
    termios_test.go:159: unable to open "/dev/pts/30064771072": no such file or directory
--- FAIL: TestTiocmget (0.00s)
    termios_test.go:159: unable to open "/dev/pts/34359738368": no such file or directory
--- FAIL: TestTiocmset (0.00s)
    termios_test.go:159: unable to open "/dev/pts/38654705664": no such file or directory
--- FAIL: TestTiocmbis (0.00s)
    termios_test.go:159: unable to open "/dev/pts/42949672960": no such file or directory
--- FAIL: TestTiocmbic (0.00s)
    termios_test.go:159: unable to open "/dev/pts/47244640256": no such file or directory
--- FAIL: TestTiocinq (0.00s)
    termios_test.go:159: unable to open "/dev/pts/51539607552": no such file or directory
--- FAIL: TestTiocoutq (0.00s)
    termios_test.go:159: unable to open "/dev/pts/55834574848": no such file or directory
--- FAIL: TestCfgetispeed (0.00s)
    termios_test.go:159: unable to open "/dev/pts/60129542144": no such file or directory
--- FAIL: TestCfgetospeed (0.00s)
    termios_test.go:159: unable to open "/dev/pts/64424509440": no such file or directory
FAIL
FAIL	github.com/pkg/term/termios	0.001s
FAIL
[linux1@lnx1a term]$ git pull -r
Updating d02e49d..86dad31
Fast-forward
 termios/pty_linux.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
[linux1@lnx1a term]$ git log -1
commit 86dad31139dac86af1c47c72d1a248741ed632c5 (HEAD -> master, origin/master)
Author: Tim Otto <[email protected]>
Date:   Sat Dec 5 09:40:54 2020 +0100

    Fix ptsname() for big-endian architectures
[linux1@lnx1a term]$ go test ./...
ok  	github.com/pkg/term	(cached)
ok  	github.com/pkg/term/termios	(cached)
[linux1@lnx1a term]$ 

Copy link
Member

@davecheney davecheney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for spotting this.

@davecheney davecheney merged commit e502d17 into pkg:master Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants