summaryrefslogtreecommitdiffstats
path: root/lldb/test/tools/lldb-server/TestLldbGdbServer.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-1471/+0
| | | | | | | | | | | This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-271-1/+1
| | | | llvm-svn: 251444
* Remove use of octal literals.Zachary Turner2015-10-261-6/+6
| | | | | | | | | | | Python 3 has a different syntax for octal literals than Python 2 and they are incompatible with each other. Six doesn't provide a transparent wrapper around this, so the most sane thing to do is to not use octal literals. If you need an octal literal, use a decimal literal and if it's not obvious what the value is, provide the value in octal as a comment. llvm-svn: 251328
* Convert deprecated unittest method names.Zachary Turner2015-10-261-13/+13
| | | | | | | Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. llvm-svn: 251303
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-1/+3
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Update every test to import `lldb_shared`.Zachary Turner2015-10-221-5/+3
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-184/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently most of the test files have a separate dwarf and a separate dsym test with almost identical content (only the build step is different). With adding dwo symbol file handling to the test suit it would increase this to a 3-way duplication. The purpose of this change is to eliminate this redundancy with generating 2 test case (one dwarf and one dsym) for each test function specified (dwo handling will be added at a later commit). Main design goals: * There should be no boilerplate code in each test file to support the multiple debug info in most of the tests (custom scenarios are acceptable in special cases) so adding a new test case is easier and we can't miss one of the debug info type. * In case of a test failure, the debug symbols used during the test run have to be cleanly visible from the output of dotest.py to make debugging easier both from build bot logs and from local test runs * Each test case should have a unique, fully qualified name so we can run exactly 1 test with "-f <test-case>.<test-function>" syntax * Test output should be grouped based on test files the same way as it happens now (displaying dwarf/dsym results separately isn't preferable) Proposed solution (main logic in lldbtest.py, rest of them are test cases fixed up for the new style): * Have only 1 test fuction in the test files what will run for all debug info separately and this test function should call just "self.build(...)" to build an inferior with the right debug info * When a class is created by python (the class object, not the class instance), we will generate a new test method for each debug info format in the test class with the name "<test-function>_<debug-info>" and remove the original test method. This way unittest2 see multiple test methods (1 for each debug info, pretty much as of now) and will handle the test selection and the failure reporting correctly (the debug info will be visible from the end of the test name) * Add new annotation @no_debug_info_test to disable the generation of multiple tests for each debug info format when the test don't have an inferior Differential revision: http://reviews.llvm.org/D13028 llvm-svn: 248883
* Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.Chaoren Lin2015-06-061-1/+1
| | | | | | | | | | | | | | Summary: Updated `append_to_remote_wd` to work for both remote and local. Reviewers: clayborg, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10288 llvm-svn: 239203
* Use new get_signal_number utility function for tests.Chaoren Lin2015-06-021-6/+6
| | | | | | | | | | | | | | | | Summary: This fixes TestLldbGdbServer and TestSendSignal from Windows to Android. This change depends on D10171. Reviewers: clayborg, ovyalov Reviewed By: clayborg, ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10172 llvm-svn: 238852
* Fix breakpoint setting in gdb remote test cases on armTamas Berghammer2015-05-281-2/+5
| | | | llvm-svn: 238411
* XPASS a bunch of GdbRemote/LldbGdbServer testsVince Harron2015-05-211-1/+0
| | | | | | | | | | | | Depends on r237932 "Fixed intermittent failures in TestGdbRemote*/TestLldbGdbServer" Test Plan: Ran dosep 100x, no failures in these tests Differential Revision: http://reviews.llvm.org/D9892 llvm-svn: 237933
* Fixed intermittent failures in TestGdbRemote*/TestLldbGdbServerVince Harron2015-05-211-0/+2
| | | | | | | | | | | | | | test/tools/lldb-server/commandline/Test* were actually executing in their parent directory. This looks fine at first because they aren't compiling an inferior executable. Unfortunately, they still call "make clean" during their cleanup, which is likely causing all kinds of havok in tests running in the parent directory Differential Revision: http://reviews.llvm.org/D9869 llvm-svn: 237932
* os.path.join does not always work for paths on remote platforms.Chaoren Lin2015-05-111-2/+1
| | | | | | | | | | | | | | | | Summary: Since we don't yet have remote windows debugging, it should be safe to assume that the remote target uses unix path separators. Reviewers: ovyalov, zturner, clayborg, vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9633 llvm-svn: 237006
* Bug 23051 - Fix zombie processes after lldb-server testsIlia K2015-04-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes the following bug: https://llvm.org/bugs/show_bug.cgi?id=23181 For some reason some lldb-server tests should be kicked using SIGHUP and SIGINT before termination, otherwise it will leave a zombie process. I think the reason is that the lldb-server will terminate a slave process if it gets the SIGHUP/SIGINT and if so it should be fixed in lldb-server. The solution is to terminate process like it does the pexpect (including the delayafterterminate interval). Also this patch reverts the following commits: * r234549 - Skip lldb-server tests according to bug 23181 * r234765 - Skip a few tests on OS X according to the bug 23181 * r234803 - Skip the TestGdbRemoteRegisterState.test_grp_register_save_restore_works_no_suffix_debugserver_dsym test on OS X according to the bug 23181 Test Plan: ``` $ ps | grep Z | grep a.out | wc -l 447 $ ./dosep.py --options "-v --executable $INSTALLDIR/bin/lldb" [...] $ ps | grep Z | grep a.out | wc -l 447 ``` Reviewers: jasonmolenda, clayborg, tberghammer Reviewed By: clayborg Subscribers: lldb-commits, dawn, tberghammer, clayborg, jasonmolenda Differential Revision: http://reviews.llvm.org/D9019 llvm-svn: 235008
* Skip a few tests on OS X according to the bug 23181Ilia K2015-04-131-0/+1
| | | | llvm-svn: 234765
* Skip lldb-server tests according to bug 23181Ilia K2015-04-101-0/+1
| | | | llvm-svn: 234549
* Fix AVX register detectionTamas Berghammer2015-03-251-3/+3
| | | | | | * Use target triple instead of host platform llvm-svn: 233194
* XFAIL flaky testsVince Harron2015-03-171-0/+1
| | | | llvm-svn: 232441
* Don't require AVX registers if the target CPU doesn't have themVince Harron2015-03-131-8/+24
| | | | | | | | TestLldbGdbServer was failing because it always assumed AVX is available on x86_64 Linux. This patch checks the target before asserting that AVX registers are available. llvm-svn: 232137
* Refactor GdbRemote test cases to support remote platformsTamas Berghammer2015-03-111-29/+41
| | | | | | | | | | | Previously these test cases execute lldb-server on the host and run the tests against it even if a remote platform was specified. With this CL these tests always test the communication with an lldb-server instance running on the target. Differential revision: http://reviews.llvm.org/D8202 llvm-svn: 231922
* Rename test/tools/lldb-gdbserver to test/tools/lldb-serverRobert Flack2015-03-061-0/+1500
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
OpenPOWER on IntegriCloud