summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/load_unload
AgeCommit message (Collapse)Author
2024-10-16[lldb] Support tests with nested make invocations on Windows 2/2 (#112360)Stefan Gränitz
Following up from https://github.com/llvm/llvm-project/pull/112342, we roll out the fix and quote nested `make` invocations in all API tests.
2024-07-16[LLDB] Make 'process load' take remote os path delimiter into account (#98690)Vladislav Dzhidzhoev
Currently, if we execute 'process load' with remote debugging, it uses the host's path delimiter to look up files on a target machine. If we run remote debugging of Linux target on Windows and execute "process load C:\foo\a.so", lldb-server tries to load \foo\a.so instead of /foo/a.so on the remote. It affects several API tests. This commit fixes that error. Also, it contains minor fixes for TestLoadUnload.py for testing on Windows host and Linux target.
2024-06-28[lldb][test][NFC] Remove BOM characters from tests (#97045)Michael Buch
These handful of tests had a BOM (Byte order mark) at the beginning of the file. This marker is unnecessary in our test files. The main motivation for this is that the `ast` python module breaks when passing a file to it with a BOM marker (and might break other tooling which doesn't expect it). E.g.,: ``` """Test that lldb command 'process signal SIGUSR1' to send a signal to the inferior works.""" ^ SyntaxError: invalid non-printable character U+FEFF ``` If anyone is aware of a good reason to keep it, happy to drop this.
2023-09-11[lldb] Correctly invalidate unloaded image tokens (#65945)David Spickett
Some functions in Process were using LLDB_INVALID_ADDRESS instead of LLDB_INVALID_TOKEN. The only visible effect of this appears to be that "process unload <tab>" would complete to 0 even after the image was unloaded. Since the command is checking for LLDB_INVALID_TOKEN. Everything else worked somehow. I've added a check to the existing load unload tests anyway. The tab completion cannot be checked as is, but when I make them more strict in a later patch it will be tested.
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-09-13[lldb] Fixed a number of typosGabriel Ravier
I went over the output of the following mess of a command: (ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less) and proceeded to spend a few days looking at it to find probable typos and fixed a few hundred of them in all of the llvm project (note, the ones I found are not anywhere near all of them, but it seems like a good start). Differential revision: https://reviews.llvm.org/D131122
2022-08-15[LLDB] Remove __future__ imports from testsDavid Spickett
Not needed now that we require python 3. Reviewed By: kastiglione, JDevlieghere Differential Revision: https://reviews.llvm.org/D131761
2022-07-13[LLDB] XFail TestLoadUnload.test_static_init_during_load AArch64/WindowsMuhammad Omair Javaid
This patch fixes marks TestLoadUnload.test_static_init_during_load as xfail for AArch64 windows. It is failing similar to Linux and already marked xfail for linux.
2022-07-06[LLDB] Remove TestLoadUnload.py Arm/Linux Xfail decoratorMuhammad Omair Javaid
This is a follow up on my last commit where one of the decorator was left unremoved. This patch removes Xfail decorator from TestLoadUnload.py as it is now passing on Arm/Linux buildbot.
2022-07-06[LLDB] Remove TestLoadUnload.py Arm/Linux Xfail decoratorMuhammad Omair Javaid
This patch removes Xfail decorator from TestLoadUnload.py as it is now passing on Arm/Linux buildbot.
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] XFAIL TestLoadUnload fails on Arm/Ubuntu JammyMuhammad Omair Javaid
This patch marks following tests as XFAIL for Arm/Ubuntu Jammy 22.04: test_lldb_process_load_and_unload_commands test_load_unload
2021-12-07Fix error reporting for "process load" and add a test for it.Jim Ingham
Differential Revision: https://reviews.llvm.org/D115017
2021-11-17[lldb/test] Added lldbutil function to test a breakpointSYNOPSYS\georgiev
Testing the breakpoint itself rather than the lldb string. Differential Revision: https://reviews.llvm.org/D111899
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-11-11[lldb][test] Remove not_remote_testsuite_ready in favor of skipIfRemote ↵Raphael Isemann
decorator Those two decorators have identical behaviour. This removes `not_remote_testsuite_ready` as `skipIfRemote` seems more consistent with the other decorator names we have Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D89376
2020-11-10[lldb] [test] Rename '.categories' to 'categories'Michał Górny
Make category-specifying files visible. There is really no good reason to keep them hidden, and having them visible increases the chances that someone will actually spot them. Differential Revision: https://reviews.llvm.org/D91065
2020-11-05[lldb] Enable FreeBSDRemote plugin by default and update test statusMichał Górny
The new FreeBSDRemote plugin has reached feature parity on i386 and amd64 targets. Use it by default on these architectures, while allowing the use of the legacy plugin via FREEBSD_LEGACY_PLUGIN envvar. Revisit the method of switching plugins. Apparently, the return value of PlatformFreeBSD::CanDebugProcess() is what really decides whether the legacy or the new plugin is used. Update the test status. Reenable the tests that were previously disabled on FreeBSD and do not cause hangs or are irrelevant to FreeBSD. Mark all tests that fail reliably as expectedFailure. For now, tests that are flaky (i.e. produce unstable results) are left enabled and cause unpredictable test failures. Differential Revision: https://reviews.llvm.org/D90757
2020-05-27[lldb/Reproducers] Skip or fix the remaining tests.Jonas Devlieghere
After this patch all remaining tests should pass on macOS when replayed from a reproducer. To capture the reproducers: ./bin/llvm-lit ../llvm-project/lldb/test/ --param lldb-run-with-repro=capture To replay the reproducers: ./bin/llvm-lit ../llvm-project/lldb/test/ --param lldb-run-with-repro=replay
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-18[lldb/Reproducers] Add skipIfReproducer to more testsJonas Devlieghere
Mark more tests as unsupported with reproducers.
2020-04-14[lldb/test] Fix TestLoadUnloadMed Ismail Bennani
Summary: [lldb/test] Fix TestLoadUnload failure introduced in e0dbd025131c4d77d8a5050a91d391d950529a8c It seems that `env_cmd_string` is declared and used few lines under this self.runCmd expression. I guess this is some left-over from an older version. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D78094
2020-04-14[LLDB] Remove xfail aarch64-linux from test_step_over_load*Muhammad Omair Javaid
test_step_over_load_with_svr4 and test_step_over_load now pass on aarch64 linux. Fixed by change-id: e0dbd025131c4d77d8a5050a91d391d950529a8c Differential Revision: https://reviews.llvm.org/D77662
2020-04-14[lldb/test] Make TestLoadUnload compatible with windowsPavel Labath
Summary: This patch introduces a header "dylib.h" which can be used in tests to handle shared libraries semi-portably. The shared library APIs on windows and posix systems look very different, but their underlying functionality is relatively similar, so the mapping is not difficult. It also introduces two new macros to wrap the functinality necessary to export/import function across the dll boundary on windows. Previously we had the LLDB_TEST_API macro for this purpose, which automagically changed meaning depending on whether we were building the shared library or the executable. While convenient for simple cases, this approach was not sufficient for the more complicated setups where one deals with multiple shared libraries. Lastly it rewrites TestLoadUnload, to make use of the new APIs. The trickiest aspect there is the handling of DYLD_LIBRARY_PATH on macos -- previously setting this variable was not needed as the test used @executable_path-relative dlopens, but the new generic api does not support that. Other systems do not support such dlopens either so the test already contained support for setting the appropriate path variable, and this patch just makes that logic more generic. In doesn't seem that the purpose of this test was to exercise @executable_path imports, so this should not be a problem. These changes are sufficient to make some of the TestLoadUnload tests pass on windows. Two other tests will start to pass once D77287 lands. Reviewers: amccarth, jingham, JDevlieghere, compnerd Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77662
2020-04-07[lldb] NFC: Fix trivial typo in comments, documents, and messagesKazuaki Ishizaki
Differential Revision: https://reviews.llvm.org/D77460
2020-02-20[lldb] Remove license headers from all test source filesRaphael Isemann
Summary: Around a third of our test sources have LLVM license headers. This patch removes those headers from all test sources and also fixes any tests that depended on the length of the license header. The reasons for this are: * A few tests verify line numbers and will start failing if the number of lines in the LLVM license header changes. Once I landed my patch for valid SourceLocations in debug info we will probably have even more tests that verify line numbers. * No other LLVM project is putting license headers in its test files to my knowledge. * They make the test sources much more verbose than they have to be. Several tests have longer license headers than the actual test source. For the record, the following tests had their line numbers changed to pass with the removal of the license header: lldb-api :: functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py lldb-shell :: Reproducer/TestGDBRemoteRepro.test lldb-shell :: Reproducer/TestMultipleTargets.test lldb-shell :: Reproducer/TestReuseDirectory.test lldb-shell :: ExecControl/StopHook/stop-hook-threads.test lldb-shell :: ExecControl/StopHook/stop-hook.test lldb-api :: lang/objc/exceptions/TestObjCExceptions.py Reviewers: #lldb, espindola, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: emaste, aprantl, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74839
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