llvm-project/lldb/test
Todd Fiala 62b2317fd8 Added gdb remote protocol tests across all qRegisterInfo responses.
Added support for gdb remote protocol capture/playback where there is a query/multiple-response
pattern.  The new playback entry supports:

- a general query command (key: next_query or query)
- an optional first-query command if that differs from the subsequent queries (key: first_query)
- an end regex for matching anything that would signify that the query/multi-response
  iteration has come to an end.  An assumption is that the end regex is not a content
  package we care about aside from ending the iteration. (key: end_regex)
- an optional 0-based index appended to the end of the query command 
  (key: append_iteration_suffix), default: False.
- a key used to collect responses from the query.  Any response from the gdb remote
  that doesn't match the end-of-iteration regex is captured in the playback context
  dictionary using the key specified.  That key will be an array, where each array
  entry is one of the responses from the query/multi-response iteration. (key: save_key).
- a runaway response value, defaulting to 10k, where if this many responses is captured,
  assume the ending condition regex is invalid, or the debug monitor is doing something
  goofy that is going to blow out memory or time. (key: runaway_response_count, default: 10000)

See the lldbgdbserverutils.MultiResponseGdbRemoteEntry class for details.

A MultiResponseGdbRemoteEntry is added by adding an element to the GdbRemoteTestSequence
(via GdbRemoteTestSequence.add_log_lines), using a dictionary, where the "type" key
is set to "multi_response", and the rest of the keys in the dictionary entry are
set to the keys documented for MultiResponseGdbRemoteEntry.

Added helper functions to add the required entry to grab all qRegisterInfo responses.
Added another helper to parse the qRegisterInfo response packets into an array of
dictionaries, where each key:value in the dictionary comes from the register info
response packet.

Added a test to verify that a generic register exists for the program counter,
frame pointer, stack pointer and cpu flags across all register info responses.

Added a test to verify that at least one register set exists across all register
info responses.

llvm-svn: 209170
2014-05-19 22:35:24 +00:00
..
api Fix broken TestMultithreaded on Linux. 2014-05-13 17:20:17 +00:00
arm_emulation Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
attic Initial commit of a new testsuite feature: test categories. 2012-09-21 19:10:53 +00:00
benchmarks Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
example Initial commit of a new testsuite feature: test categories. 2012-09-21 19:10:53 +00:00
expression_command Fix interval recalculation in the event that usleep is interrupted 2014-04-29 18:09:44 +00:00
functionalities Switch to Darwin decorator for tests that XPASS on FreeBSD 2014-04-22 13:42:05 +00:00
help Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
lang Switch to Darwin decorator for tests that XPASS on FreeBSD 2014-04-22 13:42:05 +00:00
linux/builtin_trap Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
logging I changed the logging test to just test that logging doesn't crash and does produce output. That's 2014-03-19 23:55:54 +00:00
macosx Add a new SBThread::SafeToCallFunctions API; this calls over to 2014-05-13 22:02:48 +00:00
make This commit reworks how the thread plan's ShouldStopHere mechanism works, so that it is useful not only 2014-03-13 02:47:14 +00:00
pexpect-2.4 Eliminate kernel warning when running tests on FreeBSD 2014-02-18 21:33:10 +00:00
plugins Fix test execution on FreeBSD versions other than 9.x 2013-07-25 13:24:34 +00:00
python_api I removed SetCallback from the Python API's since it wasn't actually useful, and added SetScriptCallbackFunction, 2014-04-03 00:50:56 +00:00
settings Modify TestSettings test for stderr.txt/stdout.txt to ignore an 2014-04-25 21:04:48 +00:00
source-manager Correctly set the working directory when launching processes for both local and remote targets. 2013-12-13 19:18:59 +00:00
terminal Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
tools/lldb-gdbserver Added gdb remote protocol tests across all qRegisterInfo responses. 2014-05-19 22:35:24 +00:00
types Check if "golden_output.txt" exists before trying to delete it rather than just raising an uncaught error. 2014-03-19 19:45:37 +00:00
unittest2 Added a simple legend to the unit test 'dots' output, to aid understandability. 2013-09-25 20:47:51 +00:00
warnings/uuid Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
.categories Initial commit of a new testsuite feature: test categories. 2012-09-21 19:10:53 +00:00
CMakeLists.txt Unset CFLAGS/CXXFLAGS when running tests via cmake/make check targets 2013-05-13 21:41:35 +00:00
Makefile Unset CFLAGS/CXXFLAGS when running tests via cmake/make check targets 2013-05-13 21:41:35 +00:00
README-TestSuite Fix a typo. 2013-08-13 14:06:16 +00:00
argparse_compat.py Include a small argparse compatibility layer for Python < 2.7 2013-02-16 09:05:23 +00:00
bench-history Add bench entries. 2011-11-29 19:13:38 +00:00
bench.py Establish a baseline for bench.py score by using a fixed lldb executable as the 2011-10-26 22:58:02 +00:00
blacklist.py
crashinfo.c Alignment fix 2014-01-08 03:14:18 +00:00
dosep.ty Update 'running threaded' messages after option parsing change 2014-03-25 15:17:23 +00:00
dotest.py Added two new test types: @debugserver_test and @llgs_test. 2014-04-28 04:49:40 +00:00
lldbbench.py Tests decorated with @benchmarks_test do not participate in the remote-macosx test suite run. 2012-04-19 23:50:00 +00:00
lldbtest.py Added two new test types: @debugserver_test and @llgs_test. 2014-04-28 04:49:40 +00:00
lldbutil.py Print the new eStopReasonExec in stop_reason_to_str. 2014-04-03 01:25:28 +00:00
progress.py The new progress bar mode was losing us information compared to the old dots mode in that we would have no way of knowing about test failures (short of peeking into the test result directory.. and you're not supposed to peek!) 2013-02-09 00:37:07 +00:00
redo.py The new ReadStringFromMemory() API does not work correctly with NSStrings that have an explicit length and no NULL terminator 2013-04-23 20:05:05 +00:00