This changes the initial stdin of a lit RUN command to be None, so that tools taking input from stdin do not see a zero-length input.
This will prevent issues like that one fixed in commit 720dd81.
Paths
| Differential D135067
[lit] RUN commands without stdin. AcceptedPublic Authored by csigg on Oct 3 2022, 2:12 AM.
Details
Diff Detail
Unit TestsFailed Event TimelineComment Actions So what would such a tool see? Would it get an error trying to open stdin, or something else? Needs a test in lit's own test suite. Comment Actions Fix bazel config to actually test lit tests. Create a separate test instead of reusing the shtest-timeout one. Comment Actions
A tool reading from stdin would get stdin, not an error and not an empty string (which it did before this change).
Done. Comment Actions
Ah. I interpreted that to mean "it will hang waiting for input" and then I see the test expects lit to timeout the test. That works. LGTM This revision is now accepted and ready to land.Oct 4 2022, 9:13 AM Comment Actions Fix clang tests that relied on empty input or accidentally did not provide the input in the RUN directive. jhenderson added inline comments.
Revision Contents
Diff 465096 clang/test/Analysis/analyzer-checker-config.c
clang/test/Analysis/analyzer-config.c
clang/test/Driver/cc1-response-files.c
clang/test/Interpreter/incremental-mode.cpp
clang/test/Modules/load-module-with-errors.m
clang/test/OpenMP/target_uses_allocators.c
clang/test/Preprocessor/elfiamcu-predefines.c
llvm/utils/lit/lit/TestRunner.py
llvm/utils/lit/lit/util.py
llvm/utils/lit/tests/Inputs/shtest-stdin/lit.cfg
llvm/utils/lit/tests/shtest-stdin.py
utils/bazel/llvm-project-overlay/llvm/utils/lit/tests/BUILD.bazel
|
Nit: add newline at EOF.