llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.92k stars 11.52k forks source link

[llvm-lit] No such file or directory error in lldb tests with lit internal shell #102696

Open connieyzhu opened 1 month ago

connieyzhu commented 1 month ago

Running the lldb tests using the lit internal shell with the following commands gives the following errors: LIT_USE_INTERNAL_SHELL=1 ninja check-lldb

FAIL: lldb-shell :: SymbolFile/DWARF/dwo-missing-error.test (2 of 2512)
******************** TEST 'lldb-shell :: SymbolFile/DWARF/dwo-missing-error.test' FAILED ********************
Exit Code: 127

Command Output (stdout):
- -
# .---command stderr------------
# | Could not create process (/usr/local/google/home/harinidonthula/llvm-project/build/bin/clang) due to [Errno 2] No such file or directory: '/usr/local/google/home/harinidonthula/llvm-project/build/tools/lldb/test/Shell/SymbolFile/DWARF/Output/dwo-missing-error.test.tmp.compdir/a/b/-'
# `-----------------------------
# error: command failed with exit status: 127

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. LIT_USE_INTERNAL_SHELL=1 ninja check-lldb
llvmbot commented 1 month ago

@llvm/issue-subscribers-lldb

Author: Connie (connieyzhu)

Running the `lldb` and `compiler-rt` tests using the lit internal shell with the following commands gives the following errors: `LIT_USE_INTERNAL_SHELL=1 ninja check-lldb` ``` FAIL: lldb-shell :: SymbolFile/DWARF/dwo-missing-error.test (2 of 2512) ******************** TEST 'lldb-shell :: SymbolFile/DWARF/dwo-missing-error.test' FAILED ******************** Exit Code: 127 Command Output (stdout): - - # .---command stderr------------ # | Could not create process (/usr/local/google/home/harinidonthula/llvm-project/build/bin/clang) due to [Errno 2] No such file or directory: '/usr/local/google/home/harinidonthula/llvm-project/build/tools/lldb/test/Shell/SymbolFile/DWARF/Output/dwo-missing-error.test.tmp.compdir/a/b/-' # `----------------------------- # error: command failed with exit status: 127 ``` `LIT_USE_INTERNAL_SHELL=1 ninja check-compiler-rt` ``` UNRESOLVED: Profile-i386 :: Linux/counter_promo_while.c (77 of 9570) ******************** TEST 'Profile-i386 :: Linux/counter_promo_while.c' 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 2278, in executeShTest return _runShTest(test, litConfig, useExternalSh, script, tmpBase) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2222, in _runShTest res = runOnce(execdir) ^^^^^^^^^^^^^^^^ File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2198, in runOnce res = executeScriptInternal( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1074, 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 697, in _executeShCmd res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 697, in _executeShCmd res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 819, in _executeShCmd stdin, stdout, stderr = processRedirects( ^^^^^^^^^^^^^^^^^ File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 656, in processRedirects fd = open(redir_filename, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: b'/usr/local/google/home/harinidonthula/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/(llvm-profdata' ``` There are 13 other tests in `compiler-rt` that produce the same error. 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. `LIT_USE_INTERNAL_SHELL=1 ninja check-lldb` 3. `LIT_USE_INTERNAL_SHELL=1 ninja check-compiler-rt`