summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/Reproducer
Commit message (Collapse)AuthorAgeFilesLines
* [lldb/Test] Disable TestSynchronous.test on Windows.Jonas Devlieghere2019-12-231-0/+1
| | | | | | The test was being skipped on the Windwos bot because it requires Python which was silently disabled because of a configuration issue. Now that the test runs, this fails as expected.
* Revert "Temporarily revert [lldb] e81268d - [lldb/Reproducers] Support ↵Eric Christopher2019-12-102-0/+35
| | | | | | | | | multiple GDB remotes" On multiple retry this issue won't duplicate - will revisit with author if duplication works again. This reverts commit c9e0b354e2749ce7ab553974692cb35c8651a869.
* Temporarily revert [lldb] e81268d - [lldb/Reproducers] Support multiple GDB ↵Eric Christopher2019-12-102-35/+0
| | | | | | | | | remotes This was causing a crash in opt+assert builds on linux and a follow-up message was posted. This reverts commit e81268d03e73aef4f9c7bd8ece8ad02f5b017dcf
* [lldb/Reproducers] Support multiple GDB remotesJonas Devlieghere2019-12-102-0/+35
| | | | | | | | | | | | | | | | When running the test suite with always capture on, a handful of tests are failing because they have multiple targets and therefore multiple GDB remote connections. The current reproducer infrastructure is capable of dealing with that. This patch reworks the GDB remote provider to support multiple GDB remote connections, similar to how the reproducers support shadowing multiple command interpreter inputs. The provider now keeps a list of packet recorders which deal with a single GDB remote connection. During replay we rely on the order of creation to match the number of packets to the GDB remote connection. Differential revision: https://reviews.llvm.org/D71105
* [lldb/Reproducer] Disable test on Windows to unblock the bot.Jonas Devlieghere2019-12-061-0/+1
| | | | http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja
* [lldb/Reproducers] Propagate LLDB_CAPTURE_REPRODUCER to the test suiteJonas Devlieghere2019-12-041-2/+5
|
* [lldb/Reproducers] Override capture with LLDB_CAPTURE_REPRODUCER env varJonas Devlieghere2019-12-042-0/+21
| | | | | | | | | | | | | | | | | | | | Make it possible to override reproducer capture with the LLDB_CAPTURE_REPRODUCER environment variable. The goal of this change is twofold. (1) I want to be able to enable capturing reproducers during regular test runs, both locally and on the bots. To do so I need a way to force capture. I cannot do this through the Python API, because reproducer capture must be enabled *before* the debugger initialized, which happens automatically when doing `import lldb`. (2) I want to provide an escape hatch for when reproducers are enabled by default. Downstream we have reproducer capture enabled by default in the driver. This patch solves both problems by overriding the reproducer mode based on the environment variable. Acceptable values are 0/1 and ON/OFF.
* [lldb/Reproducer] Add version checkJonas Devlieghere2019-12-031-0/+29
| | | | | | | | | | | | | | | | | | | To ensure a reproducer works correctly, the version of LLDB used for capture and replay must match. Right now the reproducer already contains the LLDB version. However, this is purely informative. LLDB will happily replay a reproducer generated with a different version of LLDB, which can cause subtle differences. This patch adds a version check which compares the current LLDB version with the one in the reproducer. If the version doesn't match, LLDB will refuse to replay. It also adds an escape hatch to make it possible to still replay the reproducer without having to mess with the recorded version. This might prove useful when you know two versions of LLDB match, even though the version string doesn't. This behavior is triggered by passing a new flag -reproducer-skip-version-check to the lldb driver. Differential revision: https://reviews.llvm.org/D70934
* [lldb] [test] XFAIL TestExpressionEvaluation on NetBSDMichał Górny2019-11-221-0/+1
|
* [Reproducer] Limit signals to macro define sin <csignal>Jonas Devlieghere2019-11-201-1/+0
| | | | SIGBUS is not part of the signal macros defined in the header <csignal>.
* [Reproducer] Generate LLDB reproducer on crashJonas Devlieghere2019-11-203-1/+28
| | | | | | | | | | | | | | | | | | | | This patch hooks the reproducer infrastructure with the signal handlers. When lldb crashes with reproducers capture enabled, it will now generate the reproducer and print a short message the standard out. This doesn't affect the pretty stack traces, which are still printed before. This patch also introduces a new reproducer sub-command that intentionally raises a given signal to test the reproducer signal handling. Currently the signal handler is doing too much work. Instead of copying over files into the reproducers in the signal handler, we should re-invoke ourselves with a special command line flag that looks at the VFS mapping and performs the copy. This is a NO-OP when reproducers are disabled. Differential revision: https://reviews.llvm.org/D70474
* [Reproducer] Enable crash reports for reproducer testsJonas Devlieghere2019-11-141-0/+2
| | | | | | | | | | | | | For some reason the reproducer tests seem really proficient at uncovering structural issues in LLDB related to how we tear down things, but of course only on the bots. The pretty stack trace helps a bit, but what I really want is the crash reports which contain much more information, such as what other threads we doing. Crash reports are automatically suppressed by lit. This patch (temporarily) disables that for the reproducer tests.
* [Reproducer] Discard reproducer directory if not generated.Jonas Devlieghere2019-11-122-0/+18
| | | | | If lldb was run in capture mode, but no reproducer was generated, make sure we clean up the reproducer directory.
* lldb: Skip reproducer+expression evaluation test on linuxPavel Labath2019-11-061-0/+3
| | | | It's flaky.
* [Reproducer] Add test case for expression evaluationJonas Devlieghere2019-11-052-0/+28
|
* [lldb/lit] Introduce %clang_host substitutionsPavel Labath2019-10-3110-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch addresses an ambiguity in how our existing tests invoke the compiler. Roughly two thirds of our current "shell" tests invoke the compiler to build the executables for the host. However, there is also a significant number of tests which don't build a host binary (because they don't need to run it) and instead they hardcode a certain target. We also have code which adds a bunch of default arguments to the %clang substitutions. However, most of these arguments only really make sense for the host compilation. So far, this has worked mostly ok, because the arguments we were adding were not conflicting with the target-hardcoding tests (though they did provoke an occasional "argument unused" warning). However, this started to break down when we wanted to use target-hardcoding clang-cl tests (D69031) because clang-cl has a substantially different command line, and it was getting very confused by some of the arguments we were adding on non-windows hosts. This patch avoid this problem by creating separate %clang(xx,_cl)_host substutitions, which are specifically meant to be used for compiling host binaries. All funny host-specific options are moved there. To ensure that the regular %clang substitutions are not used for compiling host binaries (skipping the extra arguments) I employ a little hac^H^H^Htrick -- I add an invalid --target argument to the %clang substitution, which means that one has to use an explicit --target in order for the compilation to succeed. Reviewers: JDevlieghere, aprantl, mstorsjo, espindola Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69619
* [Reproducer] XFAIL TestWorkingDir on WindowsJonas Devlieghere2019-10-181-0/+2
| | | | | | | | I'm having a hard time reproducing this and it's failing on the Windows bot. Temporarily X-failing this test while I continue to try building LLDB on Windows. llvm-svn: 375294
* [Reproducer] Set the working directory in the VFSJonas Devlieghere2019-10-171-3/+7
| | | | | | | | | Now that the VFS knows how to deal with virtual working directories, we can set the current working directory to the one we recorded during reproducer capture. This ensures that relative paths are resolved correctly during replay. llvm-svn: 375064
* [Reproducer] Support dumping the reproducer CWDJonas Devlieghere2019-10-172-1/+7
| | | | | | | Add support for dumping the current working directory with `reproducer dump -p cwd`. llvm-svn: 375061
* [Reproducer] Capture the debugger's working directoryJonas Devlieghere2019-10-171-0/+11
| | | | | | | | This patch extends the reproducer to capture the debugger's current working directory. This information will be used later to set the current working directory of the VFS. llvm-svn: 375059
* Re-land "[test] Split LLDB tests into API, Shell & Unit"Jonas Devlieghere2019-10-0922-0/+427
| | | | | | | The original patch got reverted because it broke `check-lldb` on a clean build. This fixes that. llvm-svn: 374201
* Revert [test] Split LLDB tests into API, Shell & UnitAdrian Prantl2019-10-0922-427/+0
| | | | | | | | as it appears to have broken check-lldb. This reverts r374184 (git commit 22314179f0660c172514b397060fd8f34b586e82) llvm-svn: 374187
* [test] Split LLDB tests into API, Shell & UnitJonas Devlieghere2019-10-0922-0/+427
LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the LLDB repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This layout makes it impossible to run just the lit tests. This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. This means there are now 3 directories under lit with 3 corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests. Finally, there's still the `check-lldb` target that runs all three test suites. Finally, this also renames the lit folder to `test` to match the LLVM repository layout. Differential revision: https://reviews.llvm.org/D68606 llvm-svn: 374184
OpenPOWER on IntegriCloud