Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 808174 - dev-ruby/tty-screen-0.8.1: "TTY::Screen#size_from_ioctl reads terminal size" test fails
Summary: dev-ruby/tty-screen-0.8.1: "TTY::Screen#size_from_ioctl reads terminal size" ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL: https://github.com/piotrmurach/tty-sc...
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2021-08-14 09:02 UTC by Rolf Eike Beer
Modified: 2021-08-23 17:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer archtester 2021-08-14 09:02:11 UTC
Happens the same on both hppa and sparc. Both runs were done in a (detached) screen session with ruby26:

Failures:

  1) TTY::Screen#size_from_ioctl reads terminal size
     Failure/Error: expect(screen.size_from_ioctl).to eq([51, 211])
     
       expected: [51, 211]
            got: [13056, 54016]
     
       (compared using ==)
     # ./spec/unit/screen_spec.rb:115:in `block (4 levels) in <top (required)>'
     # ./spec/unit/screen_spec.rb:108:in `replace_streams'
     # ./spec/unit/screen_spec.rb:114:in `block (3 levels) in <top (required)>'

This is an endianess error, when you take the numbers as big endian uint16 and convert them to little endian they match the expected values.
Comment 1 Hans de Graaff gentoo-dev Security 2021-08-15 07:20:55 UTC
I've filed an upstream bug for this.
Comment 2 Rolf Eike Beer archtester 2021-08-17 07:27:31 UTC
Upstream patch works:

https://github.com/piotrmurach/tty-screen/commit/dba351b178ae06b56985cc77a291918a0fc4aff4.patch

It's an error in the test, so I'm ignoring it for the keywording.
Comment 3 Larry the Git Cow gentoo-dev 2021-08-23 17:38:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b7900f916ca8ac513c0393a5811d87e724646c8

commit 1b7900f916ca8ac513c0393a5811d87e724646c8
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2021-08-23 17:31:27 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2021-08-23 17:38:12 +0000

    dev-ruby/tty-screen: fix ioctl endian test failure
    
    Closes: https://bugs.gentoo.org/808174
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 .../files/tty-screen-0.8.1-ioctl-test.patch        | 55 ++++++++++++++++++++++
 dev-ruby/tty-screen/tty-screen-0.8.1.ebuild        |  2 +
 2 files changed, 57 insertions(+)