Skip to content

[llvm-lit] The env command without args doesn't support redirection with lit internal shell #106627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
Harini0924 opened this issue Aug 29, 2024 · 0 comments · May be fixed by #106629
Open
1 task

[llvm-lit] The env command without args doesn't support redirection with lit internal shell #106627

Harini0924 opened this issue Aug 29, 2024 · 0 comments · May be fixed by #106629
Labels

Comments

@Harini0924
Copy link
Contributor

Harini0924 commented Aug 29, 2024

The lit internal shell doesn't support redirection to a temp file for env command without any arguments.
Error message:

UNRESOLVED: LLVM :: tools/not/disable-symbolization.test (1 of 1)
******************** TEST 'LLVM :: tools/not/disable-symbolization.test' FAILED ********************
Exception during script execution:
Traceback (most recent call last):
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/worker.py", line 76, in _execute_test_handle_errors
    result = test.config.test_format.execute(test, lit_config)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/formats/shtest.py", line 29, in execute
    return lit.TestRunner.executeShTest(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2298, in executeShTest
    return _runShTest(test, litConfig, useExternalSh, script, tmpBase)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2242, in _runShTest
    res = runOnce(execdir)
          ^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2218, in runOnce
    res = executeScriptInternal(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1086, in executeScriptInternal
    exitCode, timeoutInfo = executeShCmd(
                            ^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 204, in executeShCmd
    finalExitCode = _executeShCmd(cmd, shenv, results, timeoutHelper)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 696, in _executeShCmd
    res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 687, in _executeShCmd
    res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 831, in _executeShCmd
    stdin, stdout, stderr = processRedirects(
                            ^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 655, in processRedirects
    fd = open(redir_filename, mode)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: b'/usr/local/google/home/harinidonthula/llvm-project/llvm/build/test/tools/not/Output/disable-symbolization.test.tmp'


********************

file with failure:

  • llvm/test/tools/not/disable-symbolization.test

Steps to reproduce:

  1. CMake Config:
    cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;llvm;clang-tools-extra;lld;lldb;bolt;mlir;libclc;polly" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libunwind;libcxxabi" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build -S .
  2. Use this command to run lit's internal shell on this test.
    LIT_USE_INTERNAL_SHELL=1 LIT_FILTER="disable-symbolization.test" ninja check-llvm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants