Skip to content

[llvm-lit] TypeError in lit’s built-in cat -v implementation #102374

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

Closed
connieyzhu opened this issue Aug 7, 2024 · 0 comments · Fixed by #98363
Closed

[llvm-lit] TypeError in lit’s built-in cat -v implementation #102374

connieyzhu opened this issue Aug 7, 2024 · 0 comments · Fixed by #98363
Labels
llvm Umbrella label for LLVM issues test-suite

Comments

@connieyzhu
Copy link
Contributor

lit’s built-in cat -v implementation gives a TypeError when converting text input

FAIL: LLVM :: Object/archive-format.test (8 of 54309)
******************** TEST 'LLVM :: Object/archive-format.test' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 88
cat -v /usr/local/google/home/harinidonthula/llvm-project/build/test/Object/Output/archive-format.test.tmp/foo.a | /usr/local/google/home/harinidonthula/llvm-project/build/bin/FileCheck -strict-whitespace --check-prefix=SOLARIS /usr/local/google/home/harinidonthula/llvm-project/llvm/test/Object/archive-format.test
# executed command: cat -v /usr/local/google/home/harinidonthula/llvm-project/build/test/Object/Output/archive-format.test.tmp/foo.a
# .---command stderr------------
# | Traceback (most recent call last):
# |   File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/builtin_commands/cat.py", line 85, in <module>
# |     main(sys.argv)
# |   File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/builtin_commands/cat.py", line 73, in main
# |     contents = convertToCaretAndMNotation(contents)
# |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |   File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/builtin_commands/cat.py", line 13, in convertToCaretAndMNotation
# |     data = bytearray(data)
# |            ^^^^^^^^^^^^^^^
# | TypeError: string argument without an encoding
# `-----------------------------
# error: command failed with exit status: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm Umbrella label for LLVM issues test-suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants