Files
llvm-project/lldb/test/Shell/Platform/AutoLoad/Darwin/dsym-python-script-name-warnings.test
Jonas Devlieghere 52568a54d9 [lldb] Keep the existing behavior for untrusted dSYMs (#190407)
This patch does two thing:

- It reverts to the previous behavior of warning for untrusted dSYMs.
- It includes whether a dSYM is trusted or untrusted in the warning
output.

My reasoning is that there's no tooling for automatically signing dSYMs
and therefore we shouldn't change the behavior until this is more
common. The inclusion of whether the dSYM is signed or not is the first
step towards advertising the existence of the feature.

This now also means the release note I added in #189444 is correct
(again).
2026-04-03 22:11:35 +00:00

40 lines
1.6 KiB
Plaintext

# REQUIRES: python, system-darwin
# Tests that LLDB prints warning messages that occur while locating scripts in dSYMs.
# RUN: split-file %s %t
## Module name contains reserved characters but no script with a corrected
## name exists.
# RUN: %clang_host -g %t/main.c -o "%t/Test-Module.out"
# RUN: mkdir -p "%t/Test-Module.out.dSYM/Contents/Resources/Python"
# RUN: touch "%t/Test-Module.out.dSYM/Contents/Resources/Python/Test-Module.py"
# RUN: %lldb -b \
# RUN: -o 'target create "%t/Test-Module.out"' 2>&1 \
# RUN: | FileCheck %s --check-prefix=CHECK-RENAME
# CHECK-RENAME: warning: {{.*}} 'Test-Module.py' contains reserved characters
# CHECK-RENAME-SAME: If you intend to have this script loaded, please rename
## Module name contains reserved characters but a script with a corrected
## name does exists.
# RUN: %clang_host -g %t/main.c -o "%t/Test-Module2.out"
# RUN: mkdir -p "%t/Test-Module2.out.dSYM/Contents/Resources/Python"
# RUN: touch "%t/Test-Module2.out.dSYM/Contents/Resources/Python/Test_Module2.py"
# RUN: touch "%t/Test-Module2.out.dSYM/Contents/Resources/Python/Test-Module2.py"
# RUN: %lldb -b \
# RUN: -o 'target create "%t/Test-Module2.out"' 2>&1 \
# RUN: | FileCheck %s --check-prefix=CHECK-REMOVE
# CHECK-REMOVE: warning: {{.*}} 'Test-Module2.py' contains reserved characters
# CHECK-REMOVE-SAME: Ignoring 'Test-Module2.py' and loading 'Test_Module2.py' instead.
## Also confirm that the warning message about auto-loading scripts is printed afterwards.
# CHECK-REMOVE: warning: 'Test-Module2' contains an untrusted debug script. To run this script in this
#--- main.c
int main() { return 0; }