Skip to content

Conversation

@Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Sep 12, 2025

If LLDB is built without the DIA SDK enabled, then the native plugin is used regardless of plugin.symbol-file.pdb.reader or LLDB_USE_NATIVE_PDB_READER. This made the test fail on Windows when the DIA SDK was disabled (#114906 (comment)).

This PR changes the requirement for the test from target-windows to diasdk (only used in this test).

@llvmbot
Copy link
Member

llvmbot commented Sep 12, 2025

@llvm/pr-subscribers-lldb

Author: nerix (Nerixyz)

Changes

If LLDB is built without the DIA SDK enabled, then the native plugin is used regardless of plugin.symbol-file.pdb.reader or LLDB_USE_NATIVE_PDB_READER. This made the test fail on Windows when the DIA SDK was disabled (#114906 (comment)).

This PR changes the requirement for the test from target-windows to diasdk (only used in this test).


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

3 Files Affected:

  • (modified) lldb/test/Shell/SymbolFile/PDB/native-setting.cpp (+1-1)
  • (modified) lldb/test/Shell/lit.cfg.py (+3)
  • (modified) lldb/test/Shell/lit.site.cfg.py.in (+3)
diff --git a/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp b/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp
index ce188e75553c7..edf7508b88f17 100644
--- a/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp
+++ b/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp
@@ -1,4 +1,4 @@
-// REQUIRES: target-windows
+// REQUIRES: diasdk
 
 // Test plugin.symbol-file.pdb.reader setting
 // RUN: %build -o %t.exe -- %s
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 46e2117cdb8e7..505847fb763e0 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -170,6 +170,9 @@ def calculate_arch_features(arch_string):
             )
         )
 
+if config.have_dia_sdk:
+    config.available_features.add("diasdk")
+
 # NetBSD permits setting dbregs either if one is root
 # or if user_set_dbregs is enabled
 can_set_dbregs = True
diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in
index beaa41e6fd379..859a064d636ae 100644
--- a/lldb/test/Shell/lit.site.cfg.py.in
+++ b/lldb/test/Shell/lit.site.cfg.py.in
@@ -1,5 +1,7 @@
 @LIT_SITE_CFG_IN_HEADER@
 
+import lit.util
+
 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
 config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
@@ -34,6 +36,7 @@ config.have_lldb_server = @LLDB_TOOL_LLDB_SERVER_BUILD@
 config.lldb_system_debugserver = @LLDB_USE_SYSTEM_DEBUGSERVER@
 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
 config.lldb_has_lldbrpc = @LLDB_BUILD_LLDBRPC@
+config.have_dia_sdk = lit.util.pythonize_bool("@LLVM_ENABLE_DIA_SDK@")
 # The shell tests use their own module caches.
 config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
 config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell")

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

Agree with the idea, thanks for continuing to work on this topic.

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

LGTM

@Nerixyz Nerixyz enabled auto-merge (squash) September 13, 2025 09:10
@Nerixyz Nerixyz merged commit b31f8cb into llvm:main Sep 13, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 13, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-ubuntu running on as-builder-9 while building lldb at step 16 "test-check-lldb-api".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/14547

Here is the relevant piece of the build log for the reference
Step 16 (test-check-lldb-api) failure: Test just built components: check-lldb-api completed (failure)
...
PASS: lldb-api :: types/TestRecursiveTypes.py (1296 of 1305)
PASS: lldb-api :: types/TestIntegerType.py (1297 of 1305)
UNSUPPORTED: lldb-api :: windows/launch/missing-dll/TestMissingDll.py (1298 of 1305)
PASS: lldb-api :: types/TestIntegerTypeExpr.py (1299 of 1305)
UNSUPPORTED: lldb-api :: windows/launch/replace-dll/TestReplaceDLL.py (1300 of 1305)
PASS: lldb-api :: types/TestShortType.py (1301 of 1305)
PASS: lldb-api :: types/TestShortTypeExpr.py (1302 of 1305)
PASS: lldb-api :: types/TestLongTypes.py (1303 of 1305)
PASS: lldb-api :: types/TestLongTypesExpr.py (1304 of 1305)
TIMEOUT: lldb-api :: python_api/process/cancel_attach/TestCancelAttach.py (1305 of 1305)
******************** TEST 'lldb-api :: python_api/process/cancel_attach/TestCancelAttach.py' FAILED ********************
Script:
--
/usr/bin/python3.12 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --libcxx-include-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/c++/v1 --libcxx-include-target-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/aarch64-unknown-linux-gnu/c++/v1 --libcxx-library-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib/aarch64-unknown-linux-gnu --arch aarch64 --build-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/lldb --compiler /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang --dsymutil /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --lldb-obj-root /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb --lldb-libs-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --cmake-build-type Release --platform-url connect://jetson-agx-2198.lab.llvm.org:1234 --platform-working-dir /home/ubuntu/lldb-tests --sysroot /mnt/fs/jetson-agx-ubuntu --env ARCH_CFLAGS=-mcpu=cortex-a78 --platform-name remote-linux --skip-category=lldb-server /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/python_api/process/cancel_attach -p TestCancelAttach.py
--
Exit Code: -9
Timeout: Reached timeout of 600 seconds

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision b31f8cb1c9108f6b45c8929df27b61396a4ccd45)
  clang revision b31f8cb1c9108f6b45c8929df27b61396a4ccd45
  llvm revision b31f8cb1c9108f6b45c8929df27b61396a4ccd45

--
Command Output (stderr):
--
WARNING:root:Custom libc++ is not supported for remote runs: ignoring --libcxx arguments
FAIL: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_scripted_implementation (TestCancelAttach.AttachCancelTestCase.test_scripted_implementation)

--

********************
Slowest Tests:
--------------------------------------------------------------------------
600.04s: lldb-api :: python_api/process/cancel_attach/TestCancelAttach.py
123.26s: lldb-api :: functionalities/progress_reporting/TestProgressReporting.py
70.40s: lldb-api :: commands/process/attach/TestProcessAttach.py
64.73s: lldb-api :: functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py
60.86s: lldb-api :: commands/command/script_alias/TestCommandScriptAlias.py
34.82s: lldb-api :: functionalities/completion/TestCompletion.py
34.46s: lldb-api :: functionalities/single-thread-step/TestSingleThreadStepTimeout.py
31.31s: lldb-api :: functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py
24.83s: lldb-api :: commands/statistics/basic/TestStats.py
23.31s: lldb-api :: python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
21.32s: lldb-api :: functionalities/gdb_remote_client/TestGDBRemoteClient.py
20.70s: lldb-api :: functionalities/gdb_remote_client/TestPlatformClient.py
18.94s: lldb-api :: python_api/find_in_memory/TestFindRangesInMemory.py
18.73s: lldb-api :: functionalities/thread/state/TestThreadStates.py

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 15, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-win running on as-builder-10 while building lldb at step 18 "test-check-lldb-shell".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/197/builds/8865

Here is the relevant piece of the build log for the reference
Step 18 (test-check-lldb-shell) failure: Test just built components: check-lldb-shell completed (failure)
******************** TEST 'lldb-shell :: SymbolFile/PDB/native-setting.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
'C:\Python312\python.exe' C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\helper\build.py --compiler=clang --arch=64 --tools-dir=C:/buildbot/as-builder-10/lldb-x-aarch64/build/./bin --libs-dir=C:/buildbot/as-builder-10/lldb-x-aarch64/build/./lib --sysroot=c:/buildbot/fs/jetson-agx-ubuntu -o C:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\test\Shell\SymbolFile\PDB\Output\native-setting.cpp.tmp.exe -- C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\SymbolFile\PDB\native-setting.cpp
# executed command: 'C:\Python312\python.exe' 'C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\helper\build.py' --compiler=clang --arch=64 --tools-dir=C:/buildbot/as-builder-10/lldb-x-aarch64/build/./bin --libs-dir=C:/buildbot/as-builder-10/lldb-x-aarch64/build/./lib --sysroot=c:/buildbot/fs/jetson-agx-ubuntu -o 'C:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\test\Shell\SymbolFile\PDB\Output\native-setting.cpp.tmp.exe' -- 'C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\SymbolFile\PDB\native-setting.cpp'
# .---command stdout------------
# | Cleaning native-setting.cpp.tmp.exe-native-setting.o
# | Cleaning native-setting.cpp.tmp.exe
# | 
# | 
# | 
# | compiling native-setting.cpp -> native-setting.cpp.tmp.exe-native-setting.o
# |   STDOUT:
# | 
# | 
# | 
# | 
# | linking native-setting.cpp.tmp.exe-native-setting.o -> native-setting.cpp.tmp.exe
# |   STDOUT:
# | 
# `-----------------------------
# RUN: at line 5
env LLDB_USE_NATIVE_PDB_READER=0 c:\buildbot\as-builder-10\lldb-x-aarch64\build\bin\lldb.exe -O "platform select remote-linux" -O "platform connect connect://jetson-agx-0086.lab.llvm.org:1234" -O "platform shell mkdir -p /home/ubuntu/lldb-tests/shell/home/ubuntu/lldb-tests/shell/SymbolFile/PDB/native-setting.cpp" -O "platform settings -w /home/ubuntu/lldb-tests/shell/home/ubuntu/lldb-tests/shell/SymbolFile/PDB/native-setting.cpp" --no-lldbinit -S C:/buildbot/as-builder-10/lldb-x-aarch64/build/tools/lldb\test\Shell\lit-lldb-init-quiet C:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\test\Shell\SymbolFile\PDB\Output\native-setting.cpp.tmp.exe -o 'target modules dump symfile' | c:\buildbot\as-builder-10\lldb-x-aarch64\build\bin\filecheck.exe --check-prefix=ENV0 C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\SymbolFile\PDB\native-setting.cpp
# executed command: env LLDB_USE_NATIVE_PDB_READER=0 'c:\buildbot\as-builder-10\lldb-x-aarch64\build\bin\lldb.exe' -O 'platform select remote-linux' -O 'platform connect connect://jetson-agx-0086.lab.llvm.org:1234' -O 'platform shell mkdir -p /home/ubuntu/lldb-tests/shell/home/ubuntu/lldb-tests/shell/SymbolFile/PDB/native-setting.cpp' -O 'platform settings -w /home/ubuntu/lldb-tests/shell/home/ubuntu/lldb-tests/shell/SymbolFile/PDB/native-setting.cpp' --no-lldbinit -S 'C:/buildbot/as-builder-10/lldb-x-aarch64/build/tools/lldb\test\Shell\lit-lldb-init-quiet' 'C:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\test\Shell\SymbolFile\PDB\Output\native-setting.cpp.tmp.exe' -o 'target modules dump symfile'
# note: command had no output on stdout or stderr
# executed command: 'c:\buildbot\as-builder-10\lldb-x-aarch64\build\bin\filecheck.exe' --check-prefix=ENV0 'C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\SymbolFile\PDB\native-setting.cpp'
# .---command stderr------------
# | C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\SymbolFile\PDB\native-setting.cpp:30:10: error: ENV0: expected string not found in input
# | // ENV0: SymbolFile pdb
# |          ^
# | <stdin>:20:37: note: scanning from here
# | Dumping debug symbols for 1 modules.
# |                                     ^
# | <stdin>:21:1: note: possible intended match here
# | SymbolFile dwarf (C:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\test\Shell\SymbolFile\PDB\Output\native-setting.cpp.tmp.exe)
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\SymbolFile\PDB\native-setting.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
...

Nerixyz added a commit that referenced this pull request Sep 15, 2025
#158559)

Amends #158284 and fixes the failure on `lldb-remote-linux-win` from
#158284 (comment).
That builder is configured with the DIA SDK but builds for Linux, so the
debug information will be DWARF, not PDB.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 16, 2025
…ection again (#158559)

Amends #158284 and fixes the failure on `lldb-remote-linux-win` from
llvm/llvm-project#158284 (comment).
That builder is configured with the DIA SDK but builds for Linux, so the
debug information will be DWARF, not PDB.
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.

5 participants