[all-commits] [llvm/llvm-project] 019c83: [lldb] Fix PExpectTest when using utf-8 as the enc...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Wed Sep 13 20:34:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 019c8396c9addea04cb31616a1686e3fa67f16b7
      https://github.com/llvm/llvm-project/commit/019c8396c9addea04cb31616a1686e3fa67f16b7
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/lldbpexpect.py

  Log Message:
  -----------
  [lldb] Fix PExpectTest when using utf-8 as the encoding

PExpect 4.6, when using 'utf-8' throws a TypeError when trying to write
to the log file:

  File "llvm-project/lldb/third_party/Python/module/pexpect-4.6/pexpect/spawnbase.py", line 126, in _log
    self.logfile.write(s)
  TypeError: a bytes-like object is required, not 'str'

This looks like a bug in PExpect to me. Since the log file is only used
for tracing, work around the issue by disabling the log file when
specifying an encoding. This should fix the Debian bot [1] which runs
the test with tracing enabled (-t).

[1] https://lab.llvm.org/buildbot/#/builders/68/builds/59955




More information about the All-commits mailing list