-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lldb-dap][test] Set disableASLR to False for tests #113593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When running in constrained environments like docker, disable 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. Hence we get conflicting test houtput 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.
@llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) ChangesWhen running in constrained environments like docker, disable ASLR might fail with errors like:
E.g., #110303 Hence we already run But we never adjusted it for the DAP tests. Hence we get conflicting test houtput like:
Disabling ASLR by default in tests isn't useulf (it's only really a debugging aid for users). So this patch sets Full diff: https://github.com/llvm/llvm-project/pull/113593.diff 1 Files Affected:
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..cf30aad6b7f35b 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,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the prompt fix!
More context can be found in llvm#110303 For DAP tests running in constrained environments (e.g., Docker containers), disabling ASLR isn't allowed. So we set `disableASLR=False` (since llvm#113593). However, the `dap_server.py` will currently only forward the value of `disableASLR` to the DAP executable if it's set to `True`. If the DAP executable wasn't provided a `disableASLR` field it defaults to `true` too (https://github.com/llvm/llvm-project/blob/f14743794587db102c6d1b20f9c87a1ac20decfd/lldb/tools/lldb-dap/lldb-dap.cpp#L2103-L2104). This means that passing `disableASLR=False` from the tests is currently not possible. This is also true for many of the other boolean arguments of `request_launch`. But this patch only addresses `disableASLR` for now since it's blocking a libc++ patch.
More context can be found in llvm#110303 For DAP tests running in constrained environments (e.g., Docker containers), disabling ASLR isn't allowed. So we set `disableASLR=False` (since llvm#113593). However, the `dap_server.py` will currently only forward the value of `disableASLR` to the DAP executable if it's set to `True`. If the DAP executable wasn't provided a `disableASLR` field it defaults to `true` too (https://github.com/llvm/llvm-project/blob/f14743794587db102c6d1b20f9c87a1ac20decfd/lldb/tools/lldb-dap/lldb-dap.cpp#L2103-L2104). This means that passing `disableASLR=False` from the tests is currently not possible. This is also true for many of the other boolean arguments of `request_launch`. But this patch only addresses `disableASLR` for now since it's blocking a libc++ patch.
More context can be found in #110303 For DAP tests running in constrained environments (e.g., Docker containers), disabling ASLR isn't allowed. So we set `disableASLR=False` (since #113593). However, the `dap_server.py` will currently only forward the value of `disableASLR` to the DAP executable if it's set to `True`. If the DAP executable wasn't provided a `disableASLR` field it defaults to `true` too: https://github.com/llvm/llvm-project/blob/f14743794587db102c6d1b20f9c87a1ac20decfd/lldb/tools/lldb-dap/lldb-dap.cpp#L2103-L2104 This means that passing `disableASLR=False` from the tests is currently not possible. This is also true for many of the other boolean arguments of `request_launch`. But this patch only addresses `disableASLR` for now since it's blocking a libc++ patch.
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.
More context can be found in llvm#110303 For DAP tests running in constrained environments (e.g., Docker containers), disabling ASLR isn't allowed. So we set `disableASLR=False` (since llvm#113593). However, the `dap_server.py` will currently only forward the value of `disableASLR` to the DAP executable if it's set to `True`. If the DAP executable wasn't provided a `disableASLR` field it defaults to `true` too: https://github.com/llvm/llvm-project/blob/f14743794587db102c6d1b20f9c87a1ac20decfd/lldb/tools/lldb-dap/lldb-dap.cpp#L2103-L2104 This means that passing `disableASLR=False` from the tests is currently not possible. This is also true for many of the other boolean arguments of `request_launch`. But this patch only addresses `disableASLR` for now since it's blocking a libc++ patch.
When running in constrained environments like docker, disabling ASLR might fail with errors like:
E.g., #110303
Hence we already run
settings set target.disable-aslr false
as part of the init-commands for the non-DAP tests (see #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:
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.