[all-commits] [llvm/llvm-project] 7ceac4: [Lit] Open sub-processes with text=`False` (#194577)

Benjamin Stott via All-commits all-commits at lists.llvm.org
Tue Apr 28 08:36:51 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ceac4b1af614c886760b6d1d10d523d910c86d3
      https://github.com/llvm/llvm-project/commit/7ceac4b1af614c886760b6d1d10d523d910c86d3
  Author: Benjamin Stott <Benjamin.Stott at sony.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M llvm/utils/lit/lit/TestRunner.py

  Log Message:
  -----------
  [Lit] Open sub-processes with text=`False` (#194577)

This PR is part of a series of patches upgrading Lit's in-process
built-ins to be able to run with piped input/output and full redirection
support, and to allow custom in-process builtns to be provided via the
Lit config. The remaining patches to Lit's test runner can be found here:
https://github.com/BStott6/llvm-project/compare/lit-inproc-builtins.

This is part of the Lit daemonized testing project:
https://discourse.llvm.org/t/88612

This PR makes Lit open all sub-processes with `text=False`, so that the
Python code will be able to read and write binary data to and from their
IO streams. This currently causes no functional change, as when Lit
reads output from the sub-processes, it already handles the case that
the read output is `bytes` by decoding it, but we will need to be able
to read binary data from a sub-process's STDIN if its output, which may
be binary, is piped into an in-process built-in, and we will need to be
able to write binary data to a sub-process's STDOUT if its input is
piped from an in-process builtin.

I have made sure that on Windows, when a sub-process invoked by Lit has
its output redirected to a file by Lit, the `\n -> \r\n` conversion is
performed as usual when writing to the file from the process - this
change only affects how the Python code interacts with the streams.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list