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

test_lltrace fails on non-UTF-8 locale #91924

Open
serhiy-storchaka opened this issue Apr 25, 2022 · 2 comments
Open

test_lltrace fails on non-UTF-8 locale #91924

serhiy-storchaka opened this issue Apr 25, 2022 · 2 comments
Labels
3.9 3.10 3.11 tests type-bug

Comments

@serhiy-storchaka
Copy link

@serhiy-storchaka serhiy-storchaka commented Apr 25, 2022

$ LC_ALL=en_US.iso88591 ./python -m test -vuall test_lltrace
...
======================================================================
FAIL: test_lltrace (test.test_lltrace.TestLLTrace.test_lltrace)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_lltrace.py", line 56, in test_lltrace
    self.assertIn("GET_ITER", stdout)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'GET_ITER' not found in "\nResuming frame for 'trace_me' in module '__main__'\n\nResuming frame for '<module>'\n    stack=[None]\n62: POP_TOP\n    stack=[]\n64: DELETE_NAME 3\n    stack=[]\n66: PUSH_NULL\n    stack=[<nil>]\n68: LOAD_NAME 2\n    stack=[<nil>, <function dont_trace_2 at 0x7feae8a28890>]\n70: PRECALL 0\n    stack=[<nil>, <function dont_trace_2 at 0x7feae8a28890>]\n74: CALL 0\n"

======================================================================
FAIL: test_lltrace_different_module (test.test_lltrace.TestLLTrace.test_lltrace_different_module)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_lltrace.py", line 74, in test_lltrace_different_module
    self.assertIn('LOAD_CONST', stdout)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'LOAD_CONST' not found in "\nResuming frame for 'example' in module 'test.test_lltrace'\nthis is an example\n"

----------------------------------------------------------------------
@serhiy-storchaka serhiy-storchaka added type-bug 3.11 3.10 3.9 labels Apr 25, 2022
@AlexWaygood AlexWaygood added the tests label Apr 25, 2022
@sweeneyde
Copy link

@sweeneyde sweeneyde commented Apr 26, 2022

How strange: I don't know how the encoding is preventing printf() from working.

Resuming frame for 'trace_me' in module '__main__'
                          <----------------------------There should be stuff here
Resuming frame for '<module>'
    stack=[None]
62: POP_TOP
    stack=[]
64: DELETE_NAME 3
    stack=[]
66: PUSH_NULL
    stack=[<nil>]
68: LOAD_NAME 2
    stack=[<nil>, <function dont_trace_2 at 0x7feae8a28890>]
70: PRECALL 0
    stack=[<nil>, <function dont_trace_2 at 0x7feae8a28890>]
74: CALL 0

@serhiy-storchaka
Copy link
Author

@serhiy-storchaka serhiy-storchaka commented Apr 26, 2022

It may fail to decode a non-UTF-8 file path with UTF-8 and then silence all errors. It may be similar to #91922.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.9 3.10 3.11 tests type-bug
Projects
None yet
Development

No branches or pull requests

3 participants