Skip to content

Commit

Permalink
[lldb-dap][test] Set disableASLR to False for tests (llvm#113593)
Browse files Browse the repository at this point in the history
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., llvm#110303

Hence we already run `settings set target.disable-aslr false` as part of
the init-commands for the non-DAP tests (see
llvm#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.
  • Loading branch information
Michael137 authored and NoumanAmir657 committed Nov 4, 2024
1 parent 59fffe2 commit 7f20693
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def launch(
cwd=None,
env=None,
stopOnEntry=False,
disableASLR=True,
disableASLR=False,
disableSTDIO=False,
shellExpandArguments=False,
trace=False,
Expand Down Expand Up @@ -451,7 +451,7 @@ def build_and_launch(
cwd=None,
env=None,
stopOnEntry=False,
disableASLR=True,
disableASLR=False,
disableSTDIO=False,
shellExpandArguments=False,
trace=False,
Expand Down

0 comments on commit 7f20693

Please sign in to comment.