[Lldb-commits] [PATCH] D93951: [vscode] Improve runInTerminal and support linux

Arthur Eubanks via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 14 14:26:59 PDT 2022


aeubanks added a comment.
Herald added a project: All.

Hi, sorry to ping a very old patch but `TestVSCode_runInTerminal.py` is still failing on my linux machine (and a coworker said the same thing). Searching my email for the test name, some 12.0.0 and 13.0.0 release email threads also mention this test failing.

Commenting out all the tests except for `test_runInTerminal` and with the following print:

  --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
  +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
  @@ -329,6 +329,7 @@ class VSCodeTestCaseBase(TestBase):
               return response
   
           if not (response and response['success']):
  +            print(response)
               self.assertTrue(response['success'],
                               'launch failed (%s)' % (response['message']))
           # We need to trigger a request_configurationDone after we've successfully
  $ ./bin/llvm-lit -vv ../../lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
  -- Testing: 1 tests, 1 workers --
  FAIL: lldb-api :: tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py (1 of 1)
  ******************** TEST 'lldb-api :: tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py' FAILED ********************
  Script:
  --
  /usr/local/google/home/aeubanks/repos/sysroot/usr/bin/python3.10 /usr/local/google/home/aeubanks/repos/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env ARCHIVER=/usr/local/google/home/aeubanks/repos/sysroot/usr/local/google/home/aeubanks/repos/chromium/src/third_party/llvm-build/Release+Asserts/bin/llvm-ar --env OBJCOPY=/usr/local/google/home/aeubanks/repos/sysroot/usr/local/google/home/aeubanks/repos/chromium/src/third_party/llvm-build/Release+Asserts/bin/llvm-objcopy --env LLVM_LIBS_DIR=/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/./lib --env LLVM_INCLUDE_DIR=/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/include --env LLVM_TOOLS_DIR=/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/./bin --hermetic-libcxx --arch x86_64 --build-dir /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex --lldb-module-cache-dir /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/./bin/lldb --compiler /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/./bin/clang --dsymutil /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/./bin/dsymutil --llvm-tools-dir /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/./bin --lldb-libs-dir /usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/./lib /usr/local/google/home/aeubanks/repos/llvm-project/lldb/test/API/tools/lldb-vscode/runInTerminal -p TestVSCode_runInTerminal.py
  --
  Exit Code: 1
  
  Command Output (stdout):
  --
  lldb version 15.0.0git (git at github.com:aeubanks/llvm-project.git revision 2f11b3a6d7b8083be570f79f4ca18dfb2648eda3)
    clang revision 2f11b3a6d7b8083be570f79f4ca18dfb2648eda3
    llvm revision 2f11b3a6d7b8083be570f79f4ca18dfb2648eda3
  Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']
  {'command': 'launch', 'message': 'Failed to attach to the target process. Timed out trying to get messages from the runInTerminal launcher', 'request_seq': 2, 'seq': 0, 'success': False, 'type': 'response'}
  ========= DEBUG ADAPTER PROTOCOL LOGS =========
  --> 
  Content-Length: 284
  
  {"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true},"seq":1}
  <-- 
  Content-Length: 1246
  
  {"body":{"exceptionBreakpointFilters":[{"default":false,"filter":"cpp_catch","label":"C++ Catch"},{"default":false,"filter":"cpp_throw","label":"C++ Throw"},{"default":false,"filter":"objc_catch","label":"Objective-C Catch"},{"default":false,"filter":"objc_throw","label":"Objective-C Throw"},{"default":false,"filter":"swift_catch","label":"Swift Catch"},{"default":false,"filter":"swift_throw","label":"Swift Throw"}],"supportTerminateDebuggee":true,"supportsCompletionsRequest":false,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":false,"supportsHitConditionalBreakpoints":true,"supportsLoadedSourcesRequest":false,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsProgressReporting":true,"supportsRestartFrame":false,"supportsRestartRequest":false,"supportsRunInTerminalRequest":true,"supportsSetVariable":true,"supportsStepBack":false,"supportsStepInTargetsRequest":false,"supportsValueFormattingOptions":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
  --> 
  Content-Length: 871
  
  {"command":"launch","type":"request","arguments":{"program":"/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.test_runInTerminal/a.out","args":["foobar"],"env":["FOO=bar"],"stopOnEntry":true,"disableASLR":true,"initCommands":["settings clear -all","settings set symbols.enable-external-lookup false","settings set target.inherit-tcc true","settings set target.detach-on-error false","settings set target.auto-apply-fixits false","settings set plugin.process.gdb-remote.packet-timeout 60","settings set symbols.clang-modules-cache-path \"/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex/module-cache-lldb/lldb-api\"","settings set use-color false","setting set target.prefer-dynamic-value no-dynamic-values"],"runInTerminal":true},"seq":2}
  <-- 
  Content-Length: 679
  
  {"body":{"category":"console","output":"Running initCommands:\n(lldb) settings clear -all\n(lldb) settings set symbols.enable-external-lookup false\n(lldb) settings set target.inherit-tcc true\n(lldb) settings set target.detach-on-error false\n(lldb) settings set target.auto-apply-fixits false\n(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n(lldb) settings set symbols.clang-modules-cache-path \"/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n(lldb) settings set use-color false\n(lldb) setting set target.prefer-dynamic-value no-dynamic-values\n"},"event":"output","seq":0,"type":"event"}
  <-- 
  Content-Length: 472
  
  {"arguments":{"args":["/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/bin/lldb-vscode","--comm-file","/tmp/lit-tmp-sj_rgdfo/lldb-vscode-run-in-terminal-comm-82bc83","--launch-target","/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.test_runInTerminal/a.out","foobar"],"env":{"FOO":"bar"},"kind":"integrated"},"command":"runInTerminal","seq":1,"type":"request"}
  --> 
  Content-Length: 95
  
  {"type":"response","seq":-1,"request_seq":1,"success":true,"command":"runInTerminal","body":{}}
  <-- 
  Content-Length: 195
  
  {"command":"launch","message":"Failed to attach to the target process. Timed out trying to get messages from the runInTerminal launcher","request_seq":2,"seq":0,"success":false,"type":"response"}
  <-- 
  Content-Length: 299
  
  {"body":{"isLocalProcess":true,"name":"/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/lldb-test-build.noindex/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.test_runInTerminal/a.out","startMethod":"attach","systemProcessId":531529},"event":"process","seq":0,"type":"event"}
  <-- 
  Content-Length: 46
  
  {"event":"initialized","seq":0,"type":"event"}
  --> 
  Content-Length: 88
  
  {"command":"disconnect","type":"request","arguments":{"terminateDebuggee":true},"seq":3}
  <-- 
  Content-Length: 45
  
  {"event":"terminated","seq":0,"type":"event"}
  <-- 
  Content-Length: 81
  
  {"command":"disconnect","request_seq":3,"seq":0,"success":true,"type":"response"}
  
  ========= END =========
  
  --
  Command Output (stderr):
  --
  FAIL: LLDB (/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/bin/clang-x86_64) :: test_runInTerminal (TestVSCode_runInTerminal.TestVSCode_runInTerminal)
  ======================================================================
  FAIL: test_runInTerminal (TestVSCode_runInTerminal.TestVSCode_runInTerminal)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/local/google/home/aeubanks/repos/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 157, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/google/home/aeubanks/repos/llvm-project/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py", line 60, in test_runInTerminal
      self.build_and_launch(
    File "/usr/local/google/home/aeubanks/repos/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py", line 357, in build_and_launch
      return self.launch(program, args, cwd, env, stopOnEntry, disableASLR,
    File "/usr/local/google/home/aeubanks/repos/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py", line 333, in launch
      self.assertTrue(response['success'],
  AssertionError: False is not True : launch failed (Failed to attach to the target process. Timed out trying to get messages from the runInTerminal launcher)
  Config=x86_64-/usr/local/google/home/aeubanks/repos/llvm-project/build/cmake/bin/clang
  ----------------------------------------------------------------------
  Ran 1 test in 1.386s
  
  RESULT: FAILED (0 passes, 1 failures, 0 errors, 0 skipped, 0 expected failures, 0 unexpected successes)
  Timed out trying to get messages from the debug adaptor
  
  --
  
  ********************
  ********************
  Failed Tests (1):
    lldb-api :: tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
  
  
  Testing Time: 20.90s
    Failed: 1

any ideas on what's going wrong and/or how to debug?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93951/new/

https://reviews.llvm.org/D93951



More information about the lldb-commits mailing list