summaryrefslogtreecommitdiffstats
path: root/lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename test/tools/lldb-gdbserver to test/tools/lldb-serverRobert Flack2015-03-061-1208/+0
| | | | | | | | As requested in http://reviews.llvm.org/D7545 this change moves test/tools/lldb-gdbserver to test/tools/lldb-server ot match the name of the target being tested. Differential Revision: http://reviews.llvm.org/D8061 llvm-svn: 231479
* Merge lldb-platform and lldb-gdbserver into a single binaryTamas Berghammer2015-02-181-1/+1
| | | | | | | | | | | | | This commit merges lldb-platform and lldb-gdbserver into a single binary of the same size as each of the previous individual binaries. Execution mode is controlled by the first argument being either platform or gdbserver. Patch from: flackr <flackr@google.com> Differential revision: http://reviews.llvm.org/D7545 llvm-svn: 229683
* Have llgs tests output their traces into session dirPavel Labath2015-02-041-1/+3
| | | | | | | | | | | | Summary: This reduces the bloat in the source tree and makes the tests more consistent. Reviewers: vharron, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7373 llvm-svn: 228134
* Properly specify a few checksum values for llgs tests.Stephane Sezer2014-11-201-1/+1
| | | | | | | | | | | | | | Summary: In noack mode, these checksums are ignored by llgs, but some implementations need them still. Specify these checksums to ease integration. Test Plan: Run the tests before and after the change and make sure nothing breaks. Reviewers: clayborg, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6343 llvm-svn: 222441
* Properly specify the regex used to match register indexes.Stephane Sezer2014-11-141-1/+1
| | | | | | | | | | | | | | Summary: Something like "core:1" would match and try to be interpreted by the following code otherwise. Test Plan: Run tests and make sure the ones failing previously now pass. Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6257 llvm-svn: 221980
* Specify checksums properly for llgs test suite packets.Stephane Sezer2014-11-131-5/+5
| | | | | | | | | | | | | | Summary: These checksums are ignored by llgs but some implementations require them to be specified properly. Test Plan: Re-run llgs tests with the checksums and make sure we don't break anything. Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6254 llvm-svn: 221927
* Fix llgs to send triple for non-Apple platforms and lldb to interpret correctly.Todd Fiala2014-08-261-0/+1
| | | | | | | | | | | | | This change addresses this bug: http://llvm.org/bugs/show_bug.cgi?id=20755 This change: * Modifies llgs to send triple instead of cputype and cpusubtype when not on Apple platforms in qProcessInfo. * Modifies lldb's GDBRemoteCommunicationClient to handle the triple returned from qProcessInfo if given. When given, it will prefer to use triple over cputype and cpusubtype. * Adds gdb-remote protocol tests to verify that cputype and cpusubtype are specified on darwin, and that triple is specified on Linux. llvm-svn: 216470
* llgs: corrected Linux signal reception notification for SIGABRT, SIGSEGV and ↵Todd Fiala2014-08-121-5/+8
| | | | | | | | | their ilk. Added llgs/debugserver gdb-remote tests around SIGABRT and SIGSEGV signal reception notification. Found a few bugs in exception signal handling in Linux llgs. Fixed those. llvm-svn: 215458
* Add $vAttach support to llgs.Todd Fiala2014-07-291-2/+11
| | | | | | Also adds a new test case for vAttach;{pid} for llgs and debugserver. llvm-svn: 214236
* llgs: add --reverse-connect support.Todd Fiala2014-07-261-5/+50
| | | | | | Also includes --reverse-connect tests for llgs and debugserver. llvm-svn: 214031
* Fixes a number of issue related to test portability on Windows.Zachary Turner2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 99% of this CL is simply moving calls to "import pexpect" to a more narrow scope - i.e. the function that actually runs a particular test. This way the test suite can run on Windows, which doesn't have pexpect, and the individual tests that use pexpect can be disabled on a platform-specific basis. Additionally, this CL fixes a few other cases of non-portability. Notably, using "ps" to get the command line, and os.uname() to determine the architecture don't work on Windows. Finally, this also adds a stubbed out builder_win32 module. The full test suite runs correctly on Windows after this CL, although there is still some work remaining on the C++ side to fix one-shot script commands from LLDB (e.g. script print "foo"), which currently deadlock. Reviewed by: Todd Fiala Differential Revision: http://reviews.llvm.org/D4573 llvm-svn: 213343
* gdb-remote test noise suppression on MacOSX.Todd Fiala2014-07-161-0/+4
| | | | | | | | | | | | | | | | | | | | This change adds a member to the base test case for gdb-remote that indicates whether a stub makes two X stop notification reports on kill commands. This is set to true for debugserver tests. The test for killing an attached process after it's first stop notification has been modified to look at that flag and add an extra X packet matcher so the "unmatched packet warning" doesn't get emitted for the second X on MacOSX with debugserver. I also broke those tests out of the monolithic TestLldbGdbServer mega test case and put it in its own, new TestGdbRemoteKill.py file and test case. Tested: Ubuntu 14.04 x86_64, clang-3.5 built lldb, no test failures. MacOSX 10.9.4, Xcode 6.0 Beta 3 built lldb, no test failures. llvm-svn: 213166
* Modified gdb-remote tests to run with automatically-chosen ports.Todd Fiala2014-07-141-5/+109
| | | | | | | | | | | | Now that llgs supports communicating the 0-port choose-a-port mechanism and can communicate that back to a caller via the --named-pipe option (at parity with debugserver), we use this mechanism to always start llgs and debugserver gdb-remote protocol tests without needing to use some port arbitration mechanism. This eliminates some potential intermittent failures vs. the previous random port and collision-avoidance strategy used. llvm-svn: 212923
* Added llgs --named-pipe support and program_name-version_number printout ↵Todd Fiala2014-07-111-0/+3
| | | | | | | | | | | support. Added a unit test to test debugserver and llgs compliance on --named-pipe support. Modified llgs to implement --named-pipe support. (Note: need to revisit with new generic pipe support). llvm-svn: 212854
* Skip tests that are intermittent on Linux, fix gdb-remote port-grabbing code.Todd Fiala2014-07-091-33/+43
| | | | | | | | | | | | | Marked skipped for Linux: TestCallStopAndContinue TestConvenienceVariables TestStopHookMultipleThreads Fixed up gdb-remote port-grabbing code to use a random port in a wide range, and to allow that to fail more gracefully. This appears to have solved some gdb-remote intermittent failing behavior. llvm-svn: 212662
* Add lldb-gdbserver support for Linux x86_64.Todd Fiala2014-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | | This change brings in lldb-gdbserver (llgs) specifically for Linux x86_64. (More architectures coming soon). Not every debugserver option is covered yet. Currently the lldb-gdbserver command line can start unattached, start attached to a pid (process-name attach not supported yet), or accept lldb attaching and launching a process or connecting by process id. The history of this large change can be found here: https://github.com/tfiala/lldb/tree/dev-tfiala-native-protocol-linux-x86_64 Until mid/late April, I was not sharing the work and continued to rebase it off of head (developed via id tfiala@google.com). I switched over to user todd.fiala@gmail.com in the middle, and once I went to github, I did merges rather than rebasing so I could share with others. llvm-svn: 212069
* Implemented gdb-remote protocol tests for vCont;s and vCont;s:{thread}Todd Fiala2014-06-271-1/+173
| | | | | | | | | | | | | Also added tests for presence of vCont;c, vCont;C, vCont;s, vCont;S as returned by vCont? query. Broke out single step functionality from TestLldbGdbServer into base class. Used by new TestGdbRemoteSingleStep (using $s) and TestGdbRemote_vCont. Also part of llgs wrap-up, see: https://github.com/tfiala/lldb/issues/12 llvm-svn: 211965
* Added gdb-remote tests for Q{Save,Restore}RegisterState.Todd Fiala2014-06-201-1/+176
| | | | | | | | | Tests for both thread suffix and no thread suffix execution. Moved some bit-flipping helper methods from TestLldbGdbServer into the base GdbRemoteTestCaseBase class. llvm-svn: 211381
* Fixed up gdb-remote auxv regex issues with binary data.Todd Fiala2014-06-191-1/+14
| | | | | | | | | | | | | | | | | | | | Fixes two causes for https://github.com/tfiala/lldb/issues/7. 1. Ensures the inferior program has started executing, by printing a message on output first thing (per the "message:" command line arg) and waiting for that text to arrive before doing any checks related to auxv support. 2. Fixes up auxv-related regex patterns to be compiled with the Python re.MULTILINE and re.DOTALL options. The multiline is needed because the binary data can include what look like newlines when interpreted as text, and the DOTALL is needed to have the (.*) content portion match newlines. Added interrupt packet helper methods to add interrupt test sequence packets and parse the results from them. llvm-svn: 211283
* Added gdb-remote auxv test for chunked reads.Todd Fiala2014-06-171-0/+34
| | | | | | | | Verifies that a sum of offset,length auxv reads matches a single large read, and that the auxv data extracted from them match. llvm-svn: 211127
* Added gdb-remote auxv tests.Todd Fiala2014-06-171-1/+52
| | | | | | | | | | | | | | | | | First batch of auxv-related tests from llgs branch. Includes helpers for unescaping gdb-remote binary-escaped data, converting binary data from inferior endian-ness to integral values, etc. Tests on debugserver are expected to be skipped since it doesn't support auxv and the tests are geared to be skipped on platforms that don't broadcast support for the feature in qSupported. (llgs is listed as XFAIL since qSupported support in llgs upstream is not there, so the support check cannot work in upstream llgs.) llvm-svn: 211105
* Minor gdb-remote test QListThreadsInStopReply changes from llgs branch.Todd Fiala2014-06-151-0/+1
| | | | llvm-svn: 211006
* Added several gdb-remote tests around QListThreadsInStopReply.Todd Fiala2014-06-141-1/+1
| | | | llvm-svn: 210982
* Added gdb-remote expedited register dupe check.Todd Fiala2014-06-141-2/+14
| | | | | | | | | | | | | The llgs branch had a bug where register sets were not terminated with LLDB_INVALID_REGNUM so the expedite register loop was issuing duplicate registers. This test was added to catch the problem. Enhanced the key-val collection method to optionally (and by default) support capturing duplicate values for a given key. When that happens and if permitted, it promotes a single key to a list and appends values to it. llvm-svn: 210963
* Sync accumulated minor diffs in llgs branch gdb-remote tests.Todd Fiala2014-06-131-14/+39
| | | | | | | | I've been making some subtle changes to the gdb-remote tests as I implement them in the llgs branch. This check-in rectifies the set of diffs that have accumulated in the llgs branch that were not present upstream. llvm-svn: 210957
* Added gdb-remote stop packet expedited register tests.Todd Fiala2014-06-131-0/+543
Expedited registers currently checked for are pc, fp and sp. Also broke out the gdb-remote base test case logic into class gdbremote_testcase.GdbRemoteTestCaseBase in the new gdbremote_testcase.py file. TestGdbRemoteExpeditedRegisters.py is the first gdb-remote area to be contained in its own test case class file. The monolithic TestLldbGdbServer.py has been modified to derive from gdbremote_testcase.GdbRemoteTestCaseBase. Soon I will pull out all the gdb-remote functional area tests from that class into separate classes. I'm intending to start all GdbRemote test cases with GdbRemote so it is easy to run them all with a -p pattern match on the test run infrastructure. Also scanned and removed all cases of whitespace-only lines in the files I touched. llvm-svn: 210931
OpenPOWER on IntegriCloud