Skip to content

Conversation

cmtice
Copy link
Contributor

@cmtice cmtice commented Sep 3, 2025

This patch updates the lld lit test config to use the internal shell by default. This has some performance advantages (~10-15%) and also produces nicer failure output. It also updates the two LLDB tests to not require shell (so that they run under the internal shell), after first verifying that they run and pass using the internal shell; and it fixes one test that was not passing under the internal shell.

This patch updates the lld lit test config to use the internal shell by
default. This has some performance advantages (~10-15%) and also
produces nicer failure output. It also updates the two LLDB tests to
not require shell (so that they run under the internal shell), after
first verifying that they run and pass using the internal shell; and it
fixes one test that was not passing under the internal shell.
@cmtice cmtice requested a review from JDevlieghere as a code owner September 3, 2025 18:41
@llvmbot llvmbot added the lldb label Sep 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 3, 2025

@llvm/pr-subscribers-lldb

Author: None (cmtice)

Changes

This patch updates the lld lit test config to use the internal shell by default. This has some performance advantages (~10-15%) and also produces nicer failure output. It also updates the two LLDB tests to not require shell (so that they run under the internal shell), after first verifying that they run and pass using the internal shell; and it fixes one test that was not passing under the internal shell.


Full diff: https://github.com/llvm/llvm-project/pull/156729.diff

4 Files Affected:

  • (modified) lldb/test/Shell/Process/Optimization.test (+1-1)
  • (modified) lldb/test/Shell/Process/UnsupportedLanguage.test (-2)
  • (modified) lldb/test/Shell/SymbolFile/DWARF/dwo-missing-error.test (+2-2)
  • (modified) lldb/test/lit.cfg.py (+12)
diff --git a/lldb/test/Shell/Process/Optimization.test b/lldb/test/Shell/Process/Optimization.test
index c189d505ef5d7..d2d02a74f621a 100644
--- a/lldb/test/Shell/Process/Optimization.test
+++ b/lldb/test/Shell/Process/Optimization.test
@@ -1,5 +1,5 @@
 Test warnings.
-REQUIRES: shell, system-darwin
+REQUIRES: system-darwin
 RUN: %clang_host -O3 %S/Inputs/true.c -std=c99 -g -o %t.exe
 RUN: %lldb -o "b main" -o r -o q -b %t.exe 2>&1 | FileCheck %s
 
diff --git a/lldb/test/Shell/Process/UnsupportedLanguage.test b/lldb/test/Shell/Process/UnsupportedLanguage.test
index d7e6e5de77512..b7bbd860d0cac 100644
--- a/lldb/test/Shell/Process/UnsupportedLanguage.test
+++ b/lldb/test/Shell/Process/UnsupportedLanguage.test
@@ -1,7 +1,5 @@
 Test unsupported language warning
 
-REQUIRES: shell
-
 RUN: %clang_host %S/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o - \
 RUN:   | sed -e 's/DW_LANG_C99/DW_LANG_Mips_Assembler/g' >%t.ll
 RUN: %clang_host %t.ll -g -o %t.exe
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwo-missing-error.test b/lldb/test/Shell/SymbolFile/DWARF/dwo-missing-error.test
index 2805bbb5df7de..72315e8284745 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/dwo-missing-error.test
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwo-missing-error.test
@@ -11,12 +11,12 @@
 # "a.out-dwo-missing-error.dwo".
 # RUN: rm -rf %t.compdir/
 # RUN: mkdir -p %t.compdir/a/b/
-# RUN: cd %t.compdir/a/b/
+# RUN: pushd %t.compdir/a/b/
 # RUN: %clang_host %S/Inputs/dwo-missing-error.c -glldb -gdwarf-5 \
 # RUN:     -gsplit-dwarf -fdebug-prefix-map=%t.compdir=. -o a.out
 # RUN: rm *.dwo
 # RUN: %lldb a.out -s %s -o exit 2>&1 | FileCheck %s 
-# RUN: cd -
+# RUN: popd
 
 # Test the error message with an absolute DW_AT_comp_dir and DW_AT_dwo_name.
 # RUN: rm -rf %t.compdir/
diff --git a/lldb/test/lit.cfg.py b/lldb/test/lit.cfg.py
index eefc32aabd16d..9982ab442ba5d 100644
--- a/lldb/test/lit.cfg.py
+++ b/lldb/test/lit.cfg.py
@@ -13,3 +13,15 @@
 config.name = "lldb"
 config.test_source_root = os.path.dirname(__file__)
 config.test_exec_root = os.path.join(config.lldb_obj_root, "test")
+
+# We prefer the lit internal shell which provides a better user experience on
+# failures and is faster unless the user explicitly disables it with
+# LIT_USE_INTERNAL_SHELL=0 env var.
+
+use_lit_shell = True
+lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
+if lit_shell_env:
+    use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
+
+if use_lit_shell:
+    os.environ["LIT_USE_INTERNAL_SHELL"] = "1"

use_lit_shell = lit.util.pythonize_bool(lit_shell_env)

if use_lit_shell:
os.environ["LIT_USE_INTERNAL_SHELL"] = "1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we can avoid setting the env variable if we set config.test_format to
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell) like in the other tests. I'm assuming that's already the default, but not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that originally, but for some reason the LLDB lit tests ignored that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like that's because all of the shell tests override it in lldb/test/Shell/lit.cfg.py. I think you want to make this modification there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmtice cmtice merged commit cc0fb0d into llvm:main Sep 3, 2025
9 checks passed
ckoparkar added a commit to ckoparkar/llvm-project that referenced this pull request Sep 4, 2025
* main: (1483 commits)
  [clang] fix error recovery for invalid nested name specifiers (llvm#156772)
  Revert "[lldb] Add count for errors of DWO files in statistics and combine DWO file count functions" (llvm#156777)
  AMDGPU: Add agpr variants of multi-data DS instructions (llvm#156420)
  [libc][NFC] disable localtime on aarch64/baremetal (llvm#156776)
  [win/asan] Improve SharedReAlloc with HEAP_REALLOC_IN_PLACE_ONLY. (llvm#132558)
  [LLDB] Make internal shell the default for running LLDB lit tests. (llvm#156729)
  [lldb][debugserver] Max response size for qSpeedTest (llvm#156099)
  [AMDGPU] Define 1024 VGPRs on gfx1250 (llvm#156765)
  [flang] Check for BIND(C) name conflicts with alternate entries (llvm#156563)
  [RISCV] Add exhausted_gprs_fprs test to calling-conv-half.ll. NFC (llvm#156586)
  [NFC] Remove trailing whitespaces from `clang/include/clang/Basic/AttrDocs.td`
  [lldb] Mark scripted frames as synthetic instead of artificial (llvm#153117)
  [docs] Refine some of the wording in the quality developer policy (llvm#156555)
  [MLIR] Apply clang-tidy fixes for readability-identifier-naming in TransformOps.cpp (NFC)
  [MLIR] Add LDBG() tracing to VectorTransferOpTransforms.cpp (NFC)
  [NFC] Apply clang-format to PPCInstrFutureMMA.td (llvm#156749)
  [libc] implement template functions for localtime (llvm#110363)
  [llvm-objcopy][COFF] Update .symidx values after stripping (llvm#153322)
  Add documentation on debugging LLVM.
  [lldb] Add count for errors of DWO files in statistics and combine DWO file count functions (llvm#155023)
  ...
@Michael137
Copy link
Member

I suspect this broke UnsupportedLanguage.test on the lldb-x86_64-win bot: https://lab.llvm.org/buildbot/#/builders/211/builds/1840

Though don't have a machine to confirm that.

******************** TEST 'lldb-shell :: Process/UnsupportedLanguage.test' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 3
c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc -fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o -    | sed -e 's/DW_LANG_C99/DW_LANG_Mips_Assembler/g' >C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process/Inputs/true.c' -std=c99 -g -c -S -emit-llvm -o -
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# | clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
# `-----------------------------
# executed command: sed -e s/DW_LANG_C99/DW_LANG_Mips_Assembler/g
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc -fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll -g -o C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll' -g -o 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 6
c:\buildbot\as-builder-10\lldb-x86-64\build\bin\lldb.exe --no-lldbinit -S C:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb\test\Shell\lit-lldb-init-quiet -o "b main" -o r -o q -b C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe 2>&1 | c:\buildbot\as-builder-10\lldb-x86-64\build\bin\filecheck.exe C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test --check-prefix ASM
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\lldb.exe' --no-lldbinit -S 'C:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb\test\Shell\lit-lldb-init-quiet' -o 'b main' -o r -o q -b 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# note: command had no output on stdout or stderr
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\filecheck.exe' 'C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test' --check-prefix ASM
# note: command had no output on stdout or stderr
# RUN: at line 10
c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc -fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o -    | sed -e 's/DW_LANG_C99/DW_LANG_Cobol74/g' >C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process/Inputs/true.c' -std=c99 -g -c -S -emit-llvm -o -
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# | clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
# `-----------------------------
# executed command: sed -e s/DW_LANG_C99/DW_LANG_Cobol74/g
# note: command had no output on stdout or stderr
# RUN: at line 12
c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc -fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll -g -o C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-windows-msvc '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll' -g -o 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 13
c:\buildbot\as-builder-10\lldb-x86-64\build\bin\lldb.exe --no-lldbinit -S C:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb\test\Shell\lit-lldb-init-quiet -o "b main" -o r -o q -b C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe 2>&1 | c:\buildbot\as-builder-10\lldb-x86-64\build\bin\filecheck.exe C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test --check-prefix COBOL
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\lldb.exe' --no-lldbinit -S 'C:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb\test\Shell\lit-lldb-init-quiet' -o 'b main' -o r -o q -b 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# note: command had no output on stdout or stderr
# executed command: 'c:\buildbot\as-builder-10\lldb-x86-64\build\bin\filecheck.exe' 'C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test' --check-prefix COBOL
# .---command stderr------------
# | C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test:15:8: error: COBOL: expected string not found in input
# | COBOL: This version of LLDB has no plugin for the language "cobol74"
# |        ^
# | <stdin>:1:1: note: scanning from here
# | (lldb) command source -s 0 'C:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb\test\Shell\lit-lldb-init-quiet'
# | ^
# | <stdin>:3:11: note: possible intended match here
# | (lldb) command source -C --silent-run true lit-lldb-init
# |           ^
# | 
# | Input file: <stdin>
# | Check file: C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: (lldb) command source -s 0 'C:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb\test\Shell\lit-lldb-init-quiet' 
# | check:15'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             2: Executing commands in 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\lit-lldb-init-quiet'. 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             3: (lldb) command source -C --silent-run true lit-lldb-init 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:15'1               ?                                               possible intended match
# |             4: (lldb) target create "C:\\buildbot\\as-builder-10\\lldb-x86-64\\build\\tools\\lldb\\test\\Shell\\Process\\Output\\UnsupportedLanguage.test.tmp.exe" 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5: Current executable set to 'C:\buildbot\as-builder-10\lldb-x86-64\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe' (x86_64). 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6: (lldb) b main 
# | check:15'0     ~~~~~~~~~~~~~~
# |             7: Breakpoint 1: where = UnsupportedLanguage.test.tmp.exe`main, address = 0x0000000140007250 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             8: (lldb) r 
# | check:15'0     ~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
********************

@DavidSpickett
Copy link
Collaborator

Same on Windows on Arm: https://lab.llvm.org/buildbot/#/builders/141/builds/11277

******************** TEST 'lldb-shell :: Process/UnsupportedLanguage.test' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc -fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o -    | sed -e 's/DW_LANG_C99/DW_LANG_Mips_Assembler/g' >C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process/Inputs/true.c' -std=c99 -g -c -S -emit-llvm -o -
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# | clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
# `-----------------------------
# executed command: sed -e s/DW_LANG_C99/DW_LANG_Mips_Assembler/g
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc -fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll -g -o C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll' -g -o 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 6
c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\lldb.exe --no-lldbinit -S C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb\test\Shell\lit-lldb-init-quiet -o "b main" -o r -o q -b C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe 2>&1 | c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\filecheck.exe C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test --check-prefix ASM
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\lldb.exe' --no-lldbinit -S 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb\test\Shell\lit-lldb-init-quiet' -o 'b main' -o r -o q -b 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# note: command had no output on stdout or stderr
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\filecheck.exe' 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test' --check-prefix ASM
# note: command had no output on stdout or stderr
# RUN: at line 10
c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc -fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o -    | sed -e 's/DW_LANG_C99/DW_LANG_Cobol74/g' >C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process/Inputs/true.c' -std=c99 -g -c -S -emit-llvm -o -
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# | clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
# `-----------------------------
# executed command: sed -e s/DW_LANG_C99/DW_LANG_Cobol74/g
# note: command had no output on stdout or stderr
# RUN: at line 12
c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc -fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll -g -o C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe' --target=specify-a-target-or-use-a-_host-substitution --target=aarch64-pc-windows-msvc '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.ll' -g -o 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# .---command stderr------------
# | clang: warning: argument unused during compilation: '-fmodules-cache-path=C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/module-cache-clang\lldb-shell' [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 13
c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\lldb.exe --no-lldbinit -S C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb\test\Shell\lit-lldb-init-quiet -o "b main" -o r -o q -b C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe 2>&1 | c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\filecheck.exe C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test --check-prefix COBOL
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\lldb.exe' --no-lldbinit -S 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb\test\Shell\lit-lldb-init-quiet' -o 'b main' -o r -o q -b 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe'
# note: command had no output on stdout or stderr
# executed command: 'c:\users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\filecheck.exe' 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test' --check-prefix COBOL
# .---command stderr------------
# | C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test:15:8: error: COBOL: expected string not found in input
# | COBOL: This version of LLDB has no plugin for the language "cobol74"
# |        ^
# | <stdin>:1:1: note: scanning from here
# | (lldb) command source -s 0 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb\test\Shell\lit-lldb-init-quiet'
# | ^
# | <stdin>:3:11: note: possible intended match here
# | (lldb) command source -C --silent-run true lit-lldb-init
# |           ^
# | 
# | Input file: <stdin>
# | Check file: C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\Shell\Process\UnsupportedLanguage.test
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: (lldb) command source -s 0 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb\test\Shell\lit-lldb-init-quiet' 
# | check:15'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             2: Executing commands in 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\lit-lldb-init-quiet'. 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             3: (lldb) command source -C --silent-run true lit-lldb-init 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:15'1               ?                                               possible intended match
# |             4: (lldb) target create "C:\\Users\\tcwg\\llvm-worker\\lldb-aarch64-windows\\build\\tools\\lldb\\test\\Shell\\Process\\Output\\UnsupportedLanguage.test.tmp.exe" 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5: Current executable set to 'C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\test\Shell\Process\Output\UnsupportedLanguage.test.tmp.exe' (aarch64). 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6: (lldb) b main 
# | check:15'0     ~~~~~~~~~~~~~~
# |             7: Breakpoint 1: where = UnsupportedLanguage.test.tmp.exe`main, address = 0x0000000140010ffc 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             8: (lldb) r 
# | check:15'0     ~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

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

If the sed is not doing anything, the first check could pass because it's expecting not to find a message. The second check requires that the sed actually modified the IR file.

boomanaiden154 added a commit that referenced this pull request Sep 4, 2025
This is to fix buildbot fallout post #156729 without needing to revert the
original patch.
@cmtice
Copy link
Contributor Author

cmtice commented Sep 4, 2025

Ok, I will revert this and try to work out how to test/fix the issues on windows (I wonder why it passed the windows CI premerge tests).

@cmtice
Copy link
Contributor Author

cmtice commented Sep 4, 2025

Ok, I will revert this and try to work out how to test/fix the issues on windows (I wonder why it passed the windows CI premerge tests).

Maybe not? The failing test has already been updated and marked as 'Unsupported' on windows?

@boomanaiden154
Copy link
Contributor

Ok, I will revert this and try to work out how to test/fix the issues on windows (I wonder why it passed the windows CI premerge tests).

It might be picking up a different sed binary now rather than a reasonably consistent one used by bash.

Maybe not? The failing test has already been updated and marked as 'Unsupported' on windows?

Probably still good to fix the TODO there if possible.

@boomanaiden154
Copy link
Contributor

Although this patch just let the test additionally run on Windows, so if it doesn't get fixed it's not like we're losing test coverage.

@adrian-prantl
Copy link
Collaborator

@cmtice I suspect that this may have broken three tests:

https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/14836/

Could you revert/investigate? Let me know if you need any data or help reproducing.

@cmtice
Copy link
Contributor Author

cmtice commented Sep 4, 2025

@cmtice I suspect that this may have broken three tests:

https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/14836/

Could you revert/investigate? Let me know if you need any data or help reproducing.

@adrian-prantl Could you please test #156931 and see if it fixes the problem?

@cmtice
Copy link
Contributor Author

cmtice commented Sep 4, 2025

@cmtice I suspect that this may have broken three tests:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/14836/
Could you revert/investigate? Let me know if you need any data or help reproducing.

@adrian-prantl Could you please test #156931 and see if it fixes the problem?

It turns out that that PR fixes 2 of the 3 failing tests. We're working on another PR to fix the 3rd test (hope to have it in an hour or two).

@boomanaiden154
Copy link
Contributor

#156939 should fix the last remaining issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants