Skip to content

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

Closed
@connieyzhu

Description

@connieyzhu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvmUmbrella label for LLVM issuestest-suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions