summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb-server] Set a more generous timeout when testing gdbremote.Davide Italiano2018-04-061-1/+1
| | | | | | | One of our downstream bot is struggling under load, but this value should be enough for everyone. llvm-svn: 329426
* [debugserver] Fix LC_BUILD_VERSION load command handling.Frederic Riss2018-04-062-0/+120
| | | | | | | | | | | | | | | | | | | | | | Summary: In one of the 2 places the LC_BUILD_VERSION load command is handled, there is a bug preventing us from actually handling them (the address where to read the load command was not updated). This patch factors reading the deployment target load commands into a helper and adds testing for the 2 code paths calling the helper. The testing is a little bit complicated because the only times those load commands matter is when debugging a simulator process. I added a new decorator to check that a specific SDK is available. The actual testing was fairly easy once I knew how to run a simulated process. Reviewers: jasonmolenda, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D45298 llvm-svn: 329374
* [LLDB][PPC64] Fix TestGdbRemoteAuxvSupportPavel Labath2018-03-261-0/+15
| | | | | | | | | | | | | | | Summary: PPC64's auxvec has a special key that must be ignored. Reviewers: clayborg, labath Reviewed By: clayborg, labath Subscribers: alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D43771 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 328486
* Fix some tests for PPC64le architecturePavel Labath2018-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Fix test jump for powerpc64le Jumping directly to the return line on power architecture dos not means returning the value that is seen on the code. The last test fails, because it needs the execution of some assembly in the beginning of the function. Avoiding this test for this architecture. - Avoid evaluate environ variable name on Linux On Linux the Symbol environ conflicts with another variable, then in order to avoid it, this test was moved into a specific test, which is not supported if the OS is Linux. - Added PPC64le as MIPS behavior Checking the disassembler output, on PPC64le machines behaves as MPIS. Added method to identify PPC64le architecture and checking it when disassembling instructions in the test case. Reviewers: labath Reviewed By: labath Subscribers: clayborg, labath, luporl, alexandreyy, sdardis, ki.stfu, arichardson Differential Revision: https://reviews.llvm.org/D44101 Patch by Leonardo Bianconi <leonardo.bianconi@eldorado.org.br>. llvm-svn: 327977
* [test] Skip flaky tests in TestMiSyntax on DarwinVedant Kumar2018-03-191-0/+3
| | | | | | These tests tend to time out locally and on our bots. llvm-svn: 327906
* [dotest] Clean up test folder clean-upPavel Labath2018-03-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements a unified way of cleaning the build folder of each test. This is done by completely removing the build folder before each test, in the respective setUp() method. Previously, we were using a combination of several methods, each with it's own drawbacks: - nuking the entire build tree before running dotest: the issue here is that this did not take place if you ran dotest manually - running "make clean" before the main "make" target: this relied on the clean command being correctly implemented. This was usually true, but not always. - for files which were not produced by make, each python file was responsible for ensuring their deleting, using a variety of methods. With this approach, the previous methods become redundant. I remove the first two, since they are centralized. For the other various bits of clean-up code in python files, I indend to delete it when I come across it. Reviewers: aprantl Subscribers: emaste, ki.stfu, mgorny, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D44526 llvm-svn: 327703
* Skip more lldb-mi tests which time out on DarwinVedant Kumar2018-03-161-0/+3
| | | | | | Bot failure: https://ci.swift.org/job/oss-lldb-incremental-osx/1097/testReport/junit/TestMiTarget/MiTargetTestCase/test_lldbmi_target_attach_wait_for/ llvm-svn: 327692
* Next batch of test-tree-cleaning changesPavel Labath2018-03-154-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The changes here fall into several categories. - some tests were redirecting inferior stdout/err to a file. For these I make sure we use an absolute path for the file. I also create a lldbutil.read_file_on_target helper function to encapsulate the differences between reading a file locally and remotely. - some tests were redirecting the pexpect I/O into a file. For these I use a python StringIO object to avoid creating a file altogether. - the TestSettings inferior was creating a file. Here, I make sure the inferior is launched with pwd=build-dir so that the files end up created there. - lldb-mi --log (used by some tests) creates a log file in PWD without the ability say differently. To make this work I make sure to run lldb-mi with PWD=build_dir. This in turn necessitated a couple of changes in other lldb-mi tests, which were using relative paths to access the source tree. Reviewers: aprantl Subscribers: ki.stfu, mehdi_amini, lldb-commits Differential Revision: https://reviews.llvm.org/D44159 llvm-svn: 327625
* [test] Skip more lldb-mi tests which occasionally time out on DarwinVedant Kumar2018-03-141-1/+6
| | | | llvm-svn: 327586
* [test] Skip some lldb-mi tests which time out on DarwinVedant Kumar2018-03-142-0/+11
| | | | | | These don't always timeout, but it's inconvenient when they do. llvm-svn: 327568
* [test] Delete some xfailed lldb-mi testsVedant Kumar2018-03-147-638/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first pass at removing some lldb-mi tests which have been xfailed and unmaintained for a while. We have open PRs for most of these tests already. I've opened up the following additional PRs: llvm.org/PR36739 - lldb-mi driver exits properly llvm.org/PR36740 - lldb-mi -gdb-set and -gdb-show llvm.org/PR36741 - lldb-mi -symbol-xxx The motivation here is to address timeout and pexpect-related issues in the test suite. This was discussed on lldb-dev in the thread: "increase timeout for tests?". After this change, the lldb-mi tests seem to be in better health (on Darwin at least). I consistently get: $ ./bin/llvm-dotest -p TestMi =================== Test Result Summary =================== Test Methods: 101 Reruns: 0 Success: 88 Expected Failure: 0 Failure: 0 Error: 0 Exceptional Exit: 0 Unexpected Success: 0 Skip: 13 Timeout: 0 Expected Timeout: 0 llvm-svn: 327552
* [LLDB][PPC64] Fix single step and LldbGdbServer testsPavel Labath2018-03-083-6/+11
| | | | | | | | | | | | | | | | | | Summary: On PPC64, the tested functions were being entered through their local entry point, while the tests expected the program to stop at the function start address, that, for PPC64, corresponds to the global entry point. To fix the issue, the test program was modified to call the functions to be tested through function pointers, which, on PPC64, force the calls through the global entry point, while not affecting the test on other platforms. Reviewers: clayborg, labath Reviewed By: labath Subscribers: alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D43768 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 327013
* Add test for lldb-mi interpreterAdrian Prantl2018-03-062-0/+39
| | | | | | | | | | Test that "lldb-mi --interpreter" can interpret "target list" CLI command. Patch by Alex Polyakov! Differential Revision: https://reviews.llvm.org/D44040 llvm-svn: 326847
* [LLDB][PPC64] Fixed issues with expedited registersPavel Labath2018-03-061-0/+2
| | | | | | | | | | | | | | | | | Summary: - reg_nums were missing the end marker entry - marked FP test to be skipped for ppc64 Reviewers: labath, clayborg Reviewed By: labath, clayborg Subscribers: alexandreyy, lbianc, nemanjai, kbarton Differential Revision: https://reviews.llvm.org/D43767 Patch by Leandro Lupori <leandro.lupori@gmail.com> llvm-svn: 326775
* [test] Skip pexpect-based lldb-mi tests on DarwinVedant Kumar2018-03-054-1/+20
| | | | | | | | | | | | | | | These tests fail with a relatively frequently on Darwin machines with errors such as: File ".../lldb/third_party/Python/module/pexpect-2.4/pexpect.py", line 1444, in expect_loop raise EOF(str(e) + '\n' + str(self)) EOF: End Of File (EOF) in read_nonblocking(). Empty string style platform. The unpredictable failures make these tests noisy. rdar://37046976 llvm-svn: 326739
* Adapt some tests to work with PPC64le architecturePavel Labath2018-02-281-2/+3
| | | | | | | | | | | | | | | Summary: Merge branch 'master' into adaptPPC64tests Reviewers: clayborg, alexandreyy, labath Reviewed By: clayborg, alexandreyy Subscribers: luporl, lbianc, alexandreyy, lldb-commits Differential Revision: https://reviews.llvm.org/D42917 Patch by Ana Julia Caetano <ana.caetano@eldorado.org.br>. llvm-svn: 326369
* Move TestGdbRemoteExitCode next to the other llgs testsPavel Labath2018-02-273-363/+0
| | | | | | | This test contained a copy of the inferior used by most of llgs test. This was done to enable better paralelization, but now it's irrelevant. llvm-svn: 326218
* Fix a couple of more tests to not create files in the source treePavel Labath2018-02-212-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These were not being flaky, but they're still making the tree dirty. These tests were using lldbutil.append_to_process_working_directory to derive the file path so I fix them by modifying the function to return the build directory for local tests. Technically, now the path returned by this function does not point to the process working directory for local tests, but I think it makes sense to keep the function name, as I think we should move towards launching the process in the build directory (and I intend to change this for the handful of inferiors that actually care about their PWD, for example because they need to create files there). Reviewers: davide, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43506 llvm-svn: 325690
* Shorten socket names in TestPlatformProcessConnectPavel Labath2018-02-161-3/+3
| | | | | | | | | | | The test was generating long unix socket names, and the addition of a new folder in the previous patch pushed it over the limit (although linux has a fairly generous limit for path names, this does not apply to unix sockets). Modify the test to use a shorter name instead. llvm-svn: 325340
* [lldb-mi] This test now passes consistently, unXFAIL it.Davide Italiano2018-02-091-1/+0
| | | | llvm-svn: 324768
* Compile the LLDB tests out-of-tree.Adrian Prantl2018-01-305-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of a discussion on lldb-dev, see http://lists.llvm.org/pipermail/lldb-dev/2018-January/013111.html for background. For each test (should be eventually: each test configuration) a separate build directory is created and we execute make VPATH=$srcdir/path/to/test -C $builddir/path/to/test -f $srcdir/path/to/test/Makefile -I $srcdir/path/to/test In order to make this work all LLDB tests need to be updated to find the executable in the test build directory, since CWD still points at the test's source directory, which is a requirement for unittest2. Although we have done extensive testing, I'm expecting that this first attempt will break a few bots. Please DO NOT HESITATE TO REVERT this patch in order to get the bots green again. We will likely have to iterate on this some more. Differential Revision: https://reviews.llvm.org/D42281 llvm-svn: 323803
* [test-suite] UNXfail several tests that now pass locally.Davide Italiano2018-01-291-2/+0
| | | | | | | Another step towards enabling unexpected successes as failures by default. llvm-svn: 323707
* Move getBuildArtifact() from TestBase to Base and derive MiTestCaseBase from itAdrian Prantl2018-01-231-1/+1
| | | | | | Thanks to Pavel Labath for pointing this out! llvm-svn: 323219
* Wrap all references to build artifacts in the LLDB testsuite (NFC)Adrian Prantl2018-01-197-33/+39
| | | | | | | | | in TestBase::getBuildArtifact(). This NFC commit is in preparation for https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree). Differential Revision: https://reviews.llvm.org/D42280 llvm-svn: 323007
* Remove getCategories mechanism of specifying test categoriesPavel Labath2017-11-022-3/+1
| | | | | | | | | | | | | | | | | | Summary: This mechanism was mostly redundant with the file-based .categories mechanism, and it was interfering with it, as any test which implemented a getCategories method would not inherit the filesystem categories. This patch removes it. The existing categories are preserved either by adding a .categories file, or using the @add_test_categories decorator. Reviewers: jingham, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39515 llvm-svn: 317277
* Use ipv4 localhost address in lldb-server testsPavel Labath2017-10-231-1/+1
| | | | | | | | | | | | Since the ipv6 patch, we've experienced occasional flakyness in lldb-server tests. This was due to the fact that lldb-server was trying to listen on both v4 and v6 localhost sockets (and consider it a success if at least one of them succeeded), while the test framework was only trying to connect to the v4 one. This change makes sure lldb-server only listens on the v4 socket. llvm-svn: 316391
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-2521-0/+103
| | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these tests, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures. I have seen some instability with the armv7 test runs, I may submit additional patches to address this. arm64 looks good. I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 314132
* Revert "Initial patchset to get the testsuite running against armv7 and ↵Chris Bieneman2017-09-2521-103/+0
| | | | | | | | | | | | | arm64 iOS devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures." This patch has been causing LLDB test failures on ObjC tests. A test log may still be available here: http://lab.llvm.org:8080/green/view/LLDB/job/lldb/1650/ This reverts commit r314038. llvm-svn: 314122
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-2221-0/+103
| | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures. I have seen some instability with the armv7 test runs, I may submit additional patches to address this. arm64 looks good. I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 314038
* Revert this patch; I was emailing with Eugene and they have some other ↵Jason Molenda2017-09-2121-103/+0
| | | | | | | | | changes going in today and don't want the two changes to confuse the situation with the build bots. I'll commit tomorrow once they're known good. llvm-svn: 313934
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-2121-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. There will be some smaller follow-on patches. The changes to tools/lldb-server are verbose and I'm not thrilled with having to skip all of these tests manually. There are a few places where I'm making the assumption that "armv7", "armv7k", "arm64" means it's an ios device, and I need to review & clean these up with an OS check as well. (Android will show up as "arm" and "aarch64" so by pure luck they shouldn't cause problems, but it's not an assumption I want to rely on). I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 313932
* Fix lldb-mi test data_read_memory_bytes_globalTed Woodward2017-09-072-4/+4
| | | | | | | | | | | | | | | | | | | | Summary: Test was skipped because -data-evaluate-expression was thought to not work on globals. This is not the case - the issue was clang removes debug info for globals in cpp files that are not used. Add a reference to the globals in question, and fix memory patter in test to match memory pattern in testcase. Reviewers: ki.stfu, abidh Reviewed By: ki.stfu Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D37533 llvm-svn: 312726
* Skip test_lldbmi_var_update on Darwin.Sean Callanan2017-07-241-0/+1
| | | | llvm-svn: 308919
* [LLDB][MIPS] Skip TestGdbRemoteSingleStep and TestGdbRemote_vCont.py.Nitesh Jain2017-06-142-0/+3
| | | | | | | | The step count depends on code generated by compiler (GCC/Clang). It will also vary for different MIPS arch variant. Hence skipping these test for MIPS. Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 305383
* Add missing 'arch' key to valid qHostInfo keysFrancis Ricci2017-05-051-0/+1
| | | | | | | | | | | | | | Summary: 'arch' is a valid qHostInfo key, but the unit test for qHostInfo did not include it in the set of possible keys. Reviewers: tfiala, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D32711 llvm-svn: 302260
* [LLDB][MIPS] Forgot to add check in commit rl301530Nitesh Jain2017-04-271-2/+4
| | | | | | | Reviewers: ki.stfu, labath Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 301537
* [LLDB][MIPS] Fix TestMiExec.py failure.Nitesh Jain2017-04-271-2/+8
| | | | | | | | | | Reviewers: ki.stfu, labath Subscribers: jaydeep, bhushan, lldb-commits, slthakur Differential Revision: https://reviews.llvm.org/D32340 llvm-svn: 301530
* Enable lldm-mi commands -stack-list-locals -stack-list-variables and ↵Ilia K2017-04-043-0/+106
| | | | | | | | | | | | | | | | -var-create to work only with variables in scope Patch by ayuckhulk Reviewers: abidh, lldb-commits, ki.stfu Reviewed By: ki.stfu Tags: #lldb Differential Revision: https://reviews.llvm.org/D31073 llvm-svn: 299417
* Remove HostThreadLinux/Free/NetBSDPavel Labath2017-03-173-0/+69
| | | | | | | | | | | | | | | | | | | | | | Summary: These classes existed only because of the GetName() static function, which can be moved to a more natural place anyway. I move the linux version to NativeProcessLinux (and get rid of ProcFileReader), the freebsd version to ProcessFreeBSD (and fix a bug where it was using the current process ID, instead of the inferior pid), and remove the NetBSD version (which was probably incorrect anyway, as it assumes the current process instead of the inferior. I also add an llgs test to that verifies thread names are read correctly. Reviewers: zturner, krytarowski, emaste Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D30981 llvm-svn: 298058
* BreakpointResolverFileLine: Restrict move-to-nearest-code from moving across ↵Pavel Labath2017-03-152-19/+31
| | | | | | | | | | | | | | | | | | | | | | | | | function boundaries Summary: This fixes the case where a user tries to set a breakpoint on a source line outside of any function (e.g. because that code is #ifdefed out, or the compiler did not emit code for the function, etc.) and we would silently move the breakpoint to the next function. Now we check whether the line range of the resolved symbol context function matches the original line number. We reject any breakpoint locations that appear to move the breakpoint into a new function. This filtering only happens if we have full debug info available (e.g. in case of -gline-tables-only compilation, we still set the breakpoint on the nearest source line). Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30817 llvm-svn: 297817
* Disable the lldb-mi tests on remote platforms.Sean Callanan2017-03-0416-0/+64
| | | | | | | Currently on remote platforms the lldb-mi tests fail, which means they time out. Given how many of the lldb-mi tests there are, this means a long wait. llvm-svn: 296951
* Fix flakyness in TestGdbRemoteHostInfoPavel Labath2017-03-022-10/+0
| | | | | | | | | this test was using the VPATH hack to avoid having a copy of the inferior source code. This makes the test fail if in happens to run concurrently with a test in the parent folder. Fix that by moving it up to the parent. llvm-svn: 296741
* Add a comment to describe purpose of signal-filtering testEugene Zemtsov2017-02-281-0/+2
| | | | llvm-svn: 296427
* Support NetBSD Thread ID in lldb-server testsKamil Rytarowski2017-02-272-0/+10
| | | | | | | | | | | | | | | | | | | | | Summary: Native Thread ID is retrieved with _lwp_self() on NetBSD. The returned value is of type int32_t, but for consistency with other Operating Systems cast it to uint64_t. Sponsored by <The NetBSD Foundation> Reviewers: joerg, labath, clayborg, emaste Reviewed By: labath, clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D30374 llvm-svn: 296360
* Hardware breakpoints for Linux on Arm/AArch64 targetsOmair Javaid2017-02-242-14/+61
| | | | | | | | Please look at below differential link for upstream discussion. Differential revision: https://reviews.llvm.org/D29669 llvm-svn: 296119
* Implement QPassSignals GDB package in lldb-serverPavel Labath2017-02-244-1/+157
| | | | | | | | | | | | | | | Summary: QPassSignals package allows lldb client to tell lldb-server to ignore certain types of signals and re-inject them back to inferior without stopping execution. Reviewers: jmajors, labath Subscribers: danalbert, srhines, emaste, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D30286 Author: Eugene Zemtsov <ezemtsov@google.com> llvm-svn: 296101
* Finish the reformatting of the lldb-server test executablesPavel Labath2017-02-233-366/+316
| | | | | | This also reformats the executables in subfolders of lldb-server tests. llvm-svn: 295952
* Reformat inferior's main.cpp in lldb-server testPavel Labath2017-02-232-333/+302
| | | | | | | | | | | | | | | | | Summary: main.cpp is complete mess of tabs and spaces. This change brings it to compliance with LLVM coding style. Reviewers: jmajors, labath Reviewed By: jmajors, labath Subscribers: krytarowski, jingham, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D30234 Author: Eugene Zemtsov <ezemtsov@google.com> llvm-svn: 295950
* [LLDB][MIPS] Fix TestMiExec and TestMiData failuresNitesh Jain2017-02-082-3/+19
| | | | | Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 294418
* Prevent client from querying each thread's PC at each stop.Pavel Labath2017-01-201-3/+116
| | | | | | | | | | | | | | | | | | Summary: The server was no longer sending the thread PCs the way the client expected them. I changed the server to send them back as a threadstop info field, similar to the Apple version of the server. I also changed the client to look for them there, before querying the server. I added a test to ensure the server doesn't stop sending them. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D28880 Author: Jason Majors llvm-svn: 292611
OpenPOWER on IntegriCloud