[PATCH] D82754: [lit] Prevent hang when lit sees non-ASCII characters

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 10:35:51 PDT 2020


jdenny accepted this revision.
jdenny marked an inline comment as done.
jdenny added a comment.
This revision is now accepted and ready to land.

LGTM.  Thanks for the changes!



================
Comment at: llvm/utils/lit/tests/shtest-shell-ascii.py:7
+# RUN: cat %t.out
+# RUN: FileCheck --input-file %t.out %s
+#
----------------
richard.barton.arm wrote:
> jdenny wrote:
> > This test mostly copies a piece of `shtest-shell.py` but with `PYTHONIOENCODING=ascii`.  In doing so, it separates the original `shtest-encoding.txt` from the new one even though they're covering related bugs.
> > 
> > I wonder if it would be better to keep everything together and avoid duplication by just extending `shtest-shell.py` with these new `RUN:` lines.  A comment could explain that `shtest-encoding.txt` is the main focus but that the other tests are covered by these new `RUN:` lines too just in case a problem crops up in them.
> > 
> > What do you think?
> Agreed.  We have to slightly relax the expected output to work for both though as now the shell will skip a character rather than emit one.
Ah, I didn't think of that.  But it's probably fine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82754/new/

https://reviews.llvm.org/D82754





More information about the llvm-commits mailing list