[lldb][test] Add mock GPU DAP test for startDebugging reverse request#84
[lldb][test] Add mock GPU DAP test for startDebugging reverse request#84thechenli wants to merge 1 commit into
Conversation
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
Can this mock more than just the startDebugging request? We should try to send DAP requests to the CPU and mock GPU targets. |
a366e9d to
edbb2de
Compare
yeah, added another test |
| ) | ||
|
|
||
| # Stack trace on the GPU thread | ||
| gpu_thread_id = gpu_threads[0]["id"] |
There was a problem hiding this comment.
Can we test more than simple commands like stack trace - maybe try continuing to the next mock GPU breakpoint, and CPU breakpoints?
There was a problem hiding this comment.
fyi - the current PR have two CPU breakpoints and only one GPU breakpoint, I am trying to figure out a deadlock issue with multiple GPU breakpoints.
There was a problem hiding this comment.
updated with setting instruction breakpoints for GPU and continue to the breakpoint.
398e910 to
78471db
Compare
78471db to
d979f98
Compare
Summary
Add a DAP test for the mock GPU plugin that verifies the
startDebuggingreverse request is sent with the correct structure when a mock GPU target is created. This mirrors the AMD GPU DAP test from #72 but uses the mock GPU plugin, allowing the test to run in CI on any machine without real GPU hardware.The test validates:
startDebuggingwith request typeattach"Mock GPU Session"debuggerIdandtargetIdfieldsFiles added
lldb/test/API/tools/lldb-dap/gpu/mock/TestDAP_mock_gpu_reverse_request.py— testlldb/test/API/tools/lldb-dap/gpu/mock/hello_world.cpp— test program with mock GPU lifecycle functionslldb/test/API/tools/lldb-dap/gpu/mock/Makefile— build ruleslldb/test/API/tools/lldb-dap/gpu/mock/lit.local.cfg— requireslldb-mock-gpupluginTest plan
-DLLDB_ENABLE_MOCK_GPU_PLUGIN=ON -DLLDB_ENABLE_AMDGPU_PLUGIN=ONllvm-lit lldb/test/API/tools/lldb-dap/gpu/mock/— all tests pass