Skip to content

New test_termios fails on Alpinelinux #114492

Closed

Description

@andypost

Bug report

Bug description:

As reported #81002 (comment) where the test was added

I'm upgrading Python in Alpinelinux to 3.11.7 and testing upgrade to 3.12.1 (both fails the same test)

Re-running test_termios in verbose mode (matching: test_tcgetattr)
test_tcgetattr (test.test_termios.TestFunctions.test_tcgetattr) ... FAIL

======================================================================
FAIL: test_tcgetattr (test.test_termios.TestFunctions.test_tcgetattr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builds/alpine/aports/main/python3/src/Python-3.11.7/Lib/test/test_termios.py", line 42, in test_tcgetattr
    self.assertEqual(termios.tcgetattr(self.stream), attrs)
AssertionError: Lists differ: [1280[227 chars]', b'P', b'\xed', b'\x1a', b'\xf7', b'*', b'z'[18 chars]'(']] != [1280[227 chars]', b'\x01', b'\x00', b'\x00', b'\x00', b' ', b[27 chars]d8']]

First differing element 6:
[b'\x[197 chars]', b'P', b'\xed', b'\x1a', b'\xf7', b'*', b'z'[17 chars]b'(']
[b'\x[197 chars]', b'\x01', b'\x00', b'\x00', b'\x00', b' ', b[26 chars]xd8']

  [1280,
   5,
   191,
   35387,
   15,
   15,
   [b'\x03',
    b'\x1c',
    b'\x7f',
    b'\x15',
    b'\x04',
    b'\x00',
    b'\x01',
    b'\x00',
    b'\x11',
    b'\x13',
    b'\x1a',
    b'\x00',
    b'\x12',
    b'\x0f',
    b'\x17',
    b'\x16',
    b'\x00',
    b'\x00',
    b'\x00',
    b'|',
    b'\xdc',
    b'\xc9',
    b'\xe7',
-   b'P',
-   b'\xed',
-   b'\x1a',
?        -

+   b'\x01',
?       +

+   b'\x00',
+   b'\x00',
+   b'\x00',
+   b' ',
+   b'\xd5',
+   b'$',
    b'\xf7',
+   b'\xd8']]
-   b'*',
-   b'z',
-   b'd',
-   b'\xf7',
-   b'(']]

----------------------------------------------------------------------
Ran 1 test in 0.003s

CPython versions tested on:

3.11, 3.12

Operating systems tested on:

Linux

Linked PRs

Activity

  1. andypost commented on Jan 23, 2024

    @andypost
    Author

    Building 3.12.1 I see following log https://gitlab.alpinelinux.org/alpine/aports/-/jobs/1252337

    So disabled both meanwhile

    Re-running test_tty in verbose mode (matching: test_cfmakeraw, test_setcbreak, test_setraw)
    test_cfmakeraw (test.test_tty.TestTty.test_cfmakeraw) ... ok
    test_setcbreak (test.test_tty.TestTty.test_setcbreak) ... FAIL
    test_setraw (test.test_tty.TestTty.test_setraw) ... FAIL
    ======================================================================
    FAIL: test_setcbreak (test.test_tty.TestTty.test_setcbreak)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/builds/alpine/aports/main/python3/src/Python-3.12.1/Lib/test/test_tty.py", line 74, in test_setcbreak
        self.assertEqual(mode1, mode0)
    AssertionError: Lists differ: [1280[194 chars]', b'@', b'3', b'\x11', b'o', b'\xe3', b'\x7f'[54 chars]e3']] != [1280[194 chars]', b'\x10', b'W', b'%', b'o', b'\xe3', b'\x7f'[51 chars]e3']]
    First differing element 6:
    [b'\x[164 chars]', b'@', b'3', b'\x11', b'o', b'\xe3', b'\x7f'[53 chars]xe3']
    [b'\x[164 chars]', b'\x10', b'W', b'%', b'o', b'\xe3', b'\x7f'[50 chars]xe3']
      [1280,
       5,
       191,
       35387,
       15,
       15,
       [b'\x03',
        b'\x1c',
        b'\x7f',
        b'\x15',
        b'\x04',
        b'\x00',
        b'\x01',
        b'\x00',
        b'\x11',
        b'\x13',
        b'\x1a',
        b'\x00',
        b'\x12',
        b'\x0f',
        b'\x17',
        b'\x16',
        b'\x00',
        b'\x00',
        b'\x00',
    -   b'@',
    -   b'3',
    -   b'\x11',
    ?        ^
    +   b'\x10',
    ?        ^
    +   b'W',
    +   b'%',
        b'o',
        b'\xe3',
        b'\x7f',
        b'\x00',
        b'\x00',
    -   b'\x00',
    -   b'\x8f',
    -   b'%',
    ?     ^
    +   b'v',
    ?     ^
    +   b']',
    +   b'\xb6',
        b'o',
        b'\xe3']]
    ======================================================================
    FAIL: test_setraw (test.test_tty.TestTty.test_setraw)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/builds/alpine/aports/main/python3/src/Python-3.12.1/Lib/test/test_tty.py", line 63, in test_setraw
        self.assertEqual(mode1, mode0)
    AssertionError: Lists differ: [1280[194 chars]', b'@', b'3', b'\x11', b'o', b'\xe3', b'\x7f'[54 chars]e3']] != [1280[194 chars]', b'\x10', b'W', b'%', b'o', b'\xe3', b'\x7f'[51 chars]e3']]
    First differing element 6:
    [b'\x[164 chars]', b'@', b'3', b'\x11', b'o', b'\xe3', b'\x7f'[53 chars]xe3']
    [b'\x[164 chars]', b'\x10', b'W', b'%', b'o', b'\xe3', b'\x7f'[50 chars]xe3']
      [1280,
       5,
       191,
       35387,
       15,
       15,
       [b'\x03',
        b'\x1c',
        b'\x7f',
        b'\x15',
        b'\x04',
        b'\x00',
        b'\x01',
        b'\x00',
        b'\x11',
        b'\x13',
        b'\x1a',
        b'\x00',
        b'\x12',
        b'\x0f',
        b'\x17',
        b'\x16',
        b'\x00',
        b'\x00',
        b'\x00',
    -   b'@',
    -   b'3',
    -   b'\x11',
    ?        ^
    +   b'\x10',
    ?        ^
    +   b'W',
    +   b'%',
        b'o',
        b'\xe3',
        b'\x7f',
        b'\x00',
        b'\x00',
    -   b'\x00',
    -   b'\x8f',
    -   b'%',
    ?     ^
    +   b'v',
    ?     ^
    +   b']',
    +   b'\xb6',
        b'o',
        b'\xe3']]
    ----------------------------------------------------------------------
    Ran 3 tests in 0.004s
    FAILED (failures=2)
    test test_tty failed
    1 test failed again:
        test_tty
    
  2. andypost commented on Jan 23, 2024

    @andypost
    Author
  3. sobolevn commented on Jan 23, 2024

    @sobolevn
    Member
  4. serhiy-storchaka commented on Jan 23, 2024

    @serhiy-storchaka
    Member

    Please add

    self.assertEqual(self.stream.fileno(), self.fd)

    Does it fail?

  5. added a commit that references this issue on Jan 23, 2024
  6. serhiy-storchaka commented on Jan 23, 2024

    @serhiy-storchaka
    Member

    If my guess is correct, #114495 may fix this issue. Please test it.

  7. added a commit that references this issue on Jan 23, 2024
  8. added 2 commits that reference this issue on Jan 23, 2024
  9. added 2 commits that reference this issue on Jan 23, 2024
  10. added a commit that references this issue on Feb 11, 2024
  11. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions