summaryrefslogtreecommitdiff
path: root/lldb/test/API/commands/target/basic/TestTargetCommand.py
AgeCommit message (Collapse)Author
2025-02-28[lldb] fix(lldb/**.py): fix invalid escape sequences (#94034)Eisuke Kawashima
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-11-08[lldb] Fixed TestTargetCommand.py in case of Windows host and Linux target ↵Dmitry Vasilyev
(#115470) Fixed TestTargetCommand.py in case of Windows host and Linux target.
2023-11-16Clarify error messages on corefiles that no plugin handles (#72559)Jason Molenda
These error messages are written in a way that makes sense to an lldb developer, but not to an end user who asks lldb to run on a compressed corefile or whatever. Simplfy the messages.
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2022-08-12[lldb] Skip target variable tests on Darwin because of chained fixupsJonas Devlieghere
When targeting macOS Ventura, ld64 will use authenticated fixups for x86_64 as well as arm64 (where that has always been the case). This results in test failures when using an Xcode 14 toolchain on an Intel mac running macOS Ventura: Failed Tests (3): lldb-api :: commands/target/basic/TestTargetCommand.py lldb-api :: lang/c/global_variables/TestGlobalVariables.py lldb-api :: lang/cpp/char8_t/TestCxxChar8_t.py Rather than trying to come up with a sophisticated decorator based off the deployment target, I marked them all as skipped with a comment explaining why. Differential revision: https://reviews.llvm.org/D131741
2022-06-27Have CommandObjectParsed check for "commands that take no arguments".Jim Ingham
This is currently being done in an ad hoc way, and so for some commands it isn't being checked. We have the info to make this check, since commands are supposed to add their arguments to the m_arguments field of the CommandObject. This change uses that info to check whether the command received arguments in error. A handful of commands weren't defining their argument types, I also had to fix them. And a bunch of commands were checking for arguments by hand, so I removed those checks in favor of the CommandObject one. That also meant I had to change some tests that were checking for the ad hoc error outputs. Differential Revision: https://reviews.llvm.org/D128453
2022-06-17[lldb][tests] Automatically call compute_mydir (NFC)Dave Lee
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py. Differential Revision: https://reviews.llvm.org/D128077
2022-06-17[lldb] [test] Update baseline test status for FreeBSDMichał Górny
Fixes #19721 Fixes #18440 Partially fixes bug #47660 Fixes #47761 Fixes #47763 Sponsored by: The FreeBSD Foundation
2022-01-15[lldb] Correctly display the number of types foundJonas Devlieghere
Correctly display the number of types found for `target modules lookup --type` and add a test. Fixes #53219
2021-10-25[lldb] Skip tests for target var without a proc on both arm64 & arm64eJonas Devlieghere
LLDB needs to be taught about chained fixups. <rdar://problem/37773624>
2021-10-17[lldb] Skip target variable test on ASJonas Devlieghere
2021-09-30[lldb] Remove support for replaying the test suite from a reproducerJonas Devlieghere
This patch removes the infrastructure to replay the test suite from a reproducer, as well as the modifications made to the individual tests.
2020-10-08[LLDB] On Windows, fix testsAlexandre Ganea
This patch fixes a few issues seen when running `ninja check-lldb` in a Release build with VS2017: - Some binaries couldn't be found (such as lldb-vscode.exe), because .exe wasn't appended to the file name. - Many tests used to fail since our installed locale is in French - the OS error messages are not emitted in English. - Our codepage being Windows-1252, python failed to decode some error messages with accentuations. Differential Revision: https://reviews.llvm.org/D88975
2020-07-29[lldb] Improve platform handling in CreateTargetInternalJonas Devlieghere
Currently, `target create` has no --platform option. However, TargetList::CreateTargetInternal which is called under the hood, will return an error when either no platform or multiple matching platforms are found, saying that a platform should be specified with --platform. This patch adds the platform option, but that doesn't solve either of these errors. - If more than one platform matches, specifying the platform isn't going to fix that. The current code will only look at the architecture instead. I've updated the error message to ask the user to specify an architecture. - If no architecture is found, specifying a new one via platform isn't going to change that either because we already try to find one that matches the given architecture. Differential revision: https://reviews.llvm.org/D84809
2020-05-25[lldb/Test] Add a trace method to replace print statements.Jonas Devlieghere
Many tests use (commented out) print statement for debugging the test itself. This patch adds a new trace method to lldbtest to reuse the existing tracing infrastructure and replace these print statements. Differential revision: https://reviews.llvm.org/D80448
2020-05-07[lldb/Test] Skip more tests that are not expected to work with passive replayJonas Devlieghere
This skips some tests that pass with active replay (which doesn't check the output) but fail with passive replay. Valid reasons for this include: - Checking the output of the process (which doesn't run during replay), - Checking files that cannot be captured in the VFS (non-existing or unreadable files or files that are removed during test), Unfortunately there's no good way to mark a test as supported for active replay but unsupported for passive replay because the number and order of API calls needs to be identical during capture and replay. I don't think this is a huge loss however.
2020-05-04[lldb/test] Fix wrong target command failure message on WindowsMed Ismail Bennani
This patch fixes the test failure happening on Windows introduced by `015117411e11458f9816ba4359246132164a4297`. Since the failure message comes from the OS, the test needs to support both UNIX and Windows messages. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-05-04[lldb/Host] Improve error messages on unowned read filesMed Ismail Bennani
When trying to read a core file that is not owned by the user running lldb and that doesn't have read permission on the file, lldb shows a misleading error message: ``` Unable to find process plug-in for core file ``` This is due to the fact that currently, lldb doesn't check the file ownership. And when trying to to open and read a core file, the syscall fails, which prevents a process to be created. Since lldb already have a portable `open` syscall interface, lets take advantage of that and delegate the error handling to the syscall itself. This way, no matter if the file exists or if the user has proper ownership, lldb will always try to open the file, and behave accordingly to the error code returned. rdar://42630030 https://reviews.llvm.org/D78712 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-02-18[TestTargetCommand] Remove another reference to a stale rdar.Davide Italiano
The test passes, and the rdar is closed.
2020-02-18[TestTargetCommand] `target var` without a process doesn't work on arm64e.Davide Italiano
lldb needs to know about chains of authenticated relocations. <rdar://problem/37773624>
2020-02-11[lldb][test] Remove symlink for API tests.Jordan Rupprecht
Summary: Moves lldbsuite tests to lldb/test/API. This is a largely mechanical change, moved with the following steps: ``` rm lldb/test/API/testcases mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}} mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done ``` lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure. Reviewers: labath, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D71151