summaryrefslogtreecommitdiff
path: root/lldb/test/API/lang/cpp/thread_local/TestThreadLocal.py
AgeCommit message (Collapse)Author
2024-02-13[lldb][test] Switch LLDB API tests from vendored unittest2 to unittest (#79945)Jordan Rupprecht
This removes the dependency LLDB API tests have on lldb/third_party/Python/module/unittest2, and instead uses the standard one provided by Python. This does not actually remove the vendored dep yet, nor update the docs. I'll do both those once this sticks. Non-trivial changes to call out: - expected failures (i.e. "bugnumber") don't have a reason anymore, so those params were removed - `assertItemsEqual` is now called `assertCountEqual` - When a test is marked xfail, our copy of unittest2 considers failures during teardown to be OK, but modern unittest does not. See TestThreadLocal.py. (Very likely could be a real bug/leak). - Our copy of unittest2 was patched to print all test results, even ones that don't happen, e.g. `(5 passes, 0 failures, 1 errors, 0 skipped, ...)`, but standard unittest prints a terser message that omits test result types that didn't happen, e.g. `OK (skipped=1)`. Our lit integration parses this stderr and needs to be updated w/ that expectation. I tested this w/ `ninja check-lldb-api` on Linux. There's a good chance non-Linux tests have similar quirks, but I'm not able to uncover those.
2024-01-19Skip TestThreadLocal.py on darwin temporarily for linker issueJason Molenda
The new static linker in Xcode 15 does not emit the necessary symbols for file static thread local storage, causing this test to fail when used. The old static linker is still available as ld-classic in Xcode 15, but it has to be invoked specially, and the new static linker will be fixed at some point. I may try to add linker name and versioning information in lldb/packages/Python/lldbsuite/test/decorators.py like we do with the compiler / compiler_version, so it can be xfailed for known problematic static linker name / versions, but until I get that sorted I'm skipping this test to unblock the CI bots.
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-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
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-03[lldb] [test] Update XFAILs/skips for FreeBSDMichał Górny
Update expected failures and test skips based on common results for the old and new FreeBSD plugins.
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-03-18[lldb/testsuite] Rewrite TestThreadLocal.pyFred Riss
It was an inline test before. Clang stopped emitting line information for the TLS initialization and the inline test didn't have a way to break before it anymore. This rewrites the test as a full-fldeged python test and improves the checking of the error case to verify that the failure we are looking for is related to the TLS setup not being complete.
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