[Lldb-commits] [lldb] 2d26ef0 - [lldb-dap][test] Set disableASLR to False for tests (#113593)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 25 04:07:01 PDT 2024
Author: Michael Buch
Date: 2024-10-25T12:06:57+01:00
New Revision: 2d26ef09fc87472cd42ea219c8f9267599872958
URL: https://github.com/llvm/llvm-project/commit/2d26ef09fc87472cd42ea219c8f9267599872958
DIFF: https://github.com/llvm/llvm-project/commit/2d26ef09fc87472cd42ea219c8f9267599872958.diff
LOG: [lldb-dap][test] Set disableASLR to False for tests (#113593)
When running in constrained environments like docker, disabling ASLR
might fail with errors like:
```
AssertionError: False is not true : launch failed (Cannot launch
'/__w/.../lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.test_subtleFrames/a.out':
personality set failed: Operation not permitted)
```
E.g., https://github.com/llvm/llvm-project/pull/110303
Hence we already run `settings set target.disable-aslr false` as part of
the init-commands for the non-DAP tests (see
https://github.com/llvm/llvm-project/pull/88312 and
https://discourse.llvm.org/t/running-lldb-in-a-container/76801).
But we never adjusted it for the DAP tests. As a result we get
conflicting test logs like:
```
{
"arguments": {
"commandEscapePrefix": null,
"disableASLR": true,
....
"initCommands": [
...
"settings set target.disable-aslr false",
```
Disabling ASLR by default in tests isn't useulf (it's only really a
debugging aid for users). So this patch sets `disableASLR=False` by
default.
Added:
Modified:
lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
index 7e80912be44642..a25466f07fa557 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
@@ -367,7 +367,7 @@ def launch(
cwd=None,
env=None,
stopOnEntry=False,
- disableASLR=True,
+ disableASLR=False,
disableSTDIO=False,
shellExpandArguments=False,
trace=False,
@@ -451,7 +451,7 @@ def build_and_launch(
cwd=None,
env=None,
stopOnEntry=False,
- disableASLR=True,
+ disableASLR=False,
disableSTDIO=False,
shellExpandArguments=False,
trace=False,
More information about the lldb-commits
mailing list