summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api
Commit message (Collapse)AuthorAgeFilesLines
...
* os.path.join does not always work for paths on remote platforms.Chaoren Lin2015-05-111-1/+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
* [TestEvents] Add a 'connected' state to include remote debugging.Siva Chandra2015-05-081-10/+20
| | | | | | | | | | | | | | Test Plan: dotest.py -p TestEvents Reviewers: vharron, chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9581 llvm-svn: 236800
* Enable TestChangeValueAPI on LinuxPavel Labath2015-05-051-2/+1
| | | | | | | | the test has passed in the last 300 runs, enabling to see what the build bot says. Also, downgrading skipIfGcc to XFAIL, with plans of enabling it in the future if it shows to be working. llvm-svn: 236496
* un-skipped a bunch of tests on LinuxVince Harron2015-05-041-2/+0
| | | | | | | | | Some have been marked as skipIfLinux for years. The seem to be passing so I've enabled them. Differential Revision: http://reviews.llvm.org/D9428 llvm-svn: 236403
* Enabling two watchpoint tests on linuxPavel Labath2015-04-302-2/+0
| | | | | | After recent changes, these tests should be stable. Please let me know if you still see failures. llvm-svn: 236226
* XFAILing TestPrintStackTraces on linux to stabilize the build botPavel Labath2015-04-171-6/+4
| | | | llvm-svn: 235169
* Exception registers aren't supported outside of DarwinVince Harron2015-04-151-9/+16
| | | | | | | | Updated test to match Differential Revision: http://reviews.llvm.org/D8812 llvm-svn: 234992
* Remove gcc xfail for TestTargetWatchAddress.Chaoren Lin2015-04-141-1/+0
| | | | llvm-svn: 234828
* Many many test failures after some recent changes. The problem is ↵Greg Clayton2015-04-021-1/+1
| | | | | | | | | | | | | | | | lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin". There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a: lldbtest.platformIsDarwin() which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function: lldbtest.getDarwinOSTriples() Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well. llvm-svn: 233933
* TestPrintStackTraces - made XFAIL more preciseVince Harron2015-03-311-1/+7
| | | | | | | Works with x86_64 inferior, fails w/i386 inferior - updated test to reflect llvm-svn: 233717
* Enabled a bunch of tests on LinuxVince Harron2015-03-312-2/+1
| | | | | | | | | Removed expectedFailureLinux from failures that I was unable to reproduce, updated and improved some other comments near XFAIL tests Differential Revision: http://reviews.llvm.org/D8676 llvm-svn: 233716
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-3032-66/+64
| | | | | | | | | | | | | | | | against remote platform. Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if / unless the target platform is in the provided platform list. Test Plan: ninja check-lldb shows no regressions. When running cross platform, tests which cannot run on the target platform are skipped. Differential Revision: http://reviews.llvm.org/D8665 llvm-svn: 233547
* Fix RegisterCommandsTestCase and HelloWorldTestCase tests which hang on OS X ↵Ilia K2015-03-261-0/+6
| | | | | | after TestBase.tearDown() llvm-svn: 233279
* xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot ↵Ying Chen2015-03-251-0/+1
| | | | | | | | | | | | | | | | | | green Summary: -Refer to bug https://buganizer.corp.google.com/issues/19893563 -Test log http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/1145 Test Plan: Run tests with different compiler and archs locally Reviewers: sivachandra, ovyalov, chaoren, vharron Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8573 llvm-svn: 233157
* Don't clobber CFLAGS_EXTRAS in tests.Robert Flack2015-03-245-5/+5
| | | | | | | | | | | | | | | | | To run tests against a different target platform many extra compiler flags are needed to specify sysroot, include dirs, etc. The environment variable CFLAGS_EXTRAS seems suited for this purpose except that several Makefiles clobber the current flags. This change modifies all of these to add to CFLAGS_EXTRAS instead. Test Plan: Verify no regressions in ninja check-lldb. Run tests using CFLAGS_EXTRAS to specify cross compilation flags for a different target running lldb-server platform. Differential Revision: http://reviews.llvm.org/D8559 llvm-svn: 233066
* Use -fno-limit-debug-info instead of -fstandalone-debug in testsVince Harron2015-03-151-1/+1
| | | | | | | | | | | | | This fixes tests on clang-3.4 AFAICT, these flags have the same affect and -fstandalone-debug wasn't added until after clang-3.4 Committed to try to fix buildbot Differential Revision: http://reviews.llvm.org/D8347 llvm-svn: 232326
* Make TestSBFrameFindValue compatible with remote targetsTamas Berghammer2015-03-131-1/+1
| | | | llvm-svn: 232171
* Avoid a failing test case by fixing things so the compiler generates a line ↵Greg Clayton2015-03-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table entry for line the very start of the printf() before any values have been loaded into registers. The issue was the previous code tried to stop on the following code in main.c: 21 // Stop here and set values 22 printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", 23 val, 24 mine.first_val, mine.second_val, mine.third_val, 25 ptr->first_val, ptr->second_val, ptr->third_val); We we set a source regex breakpoint on "// Stop here and set values" we would set a breakpoint on line 22 as expected. The problem is the most recent clang compiler generates a line table like this 0x1000: main.c:23 // Loading of "val" into a register 0x1010: main.c:24 // Load mine.first_val, mine.second_val, mine.third_val values into registers or on the stack 0x1020: main.c:25 // Load ptr->first_val, ptr->second_val, ptr->third_val values into registers or on the stack 0x1030: main.c:22 // Call to printf In this test, we run to line 22, then we use python to modify the value of "val" and then continue to another breakpoint and try to read the STDOUT from the printf to verify the values changed correctly. With the above line table the value for "val" had already been loaded into a register so the string from printf would be incorrect. Doing an easy fix for now by changing the code to: 21 // Stop here and set values 22 printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", val, 23 mine.first_val, mine.second_val, mine.third_val, 24 ptr->first_val, ptr->second_val, ptr->third_val); Now we get a line table entry for line 22 that is before any locals are read from the stack into registers. I need to follow up with the compiler guys and see if we can get a fix for this as anyone setting file + line breeakpoints might be very surprised to have code from lines below the current line already have had their code run. llvm-svn: 232068
* Fix ProcessIO test failuresPavel Labath2015-03-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: There was a race condition regarding the output of the inferior process. The reading of the output is performed on a separate thread, and there was no guarantee that the output will get eventually consumed. Because of that, it was happening that calling Process::GetSTDOUT was not returning anything even though the process was terminated and would definitely not produce any further output. This was usually happening only under very heavy system load, but it can be reproduced by placing an usleep in the stdio thread (Process::STDIOReadThreadBytesReceived). This patch addresses this by adding synchronization capabilities to the Communication thread. After calling Communication::SynchronizeWithReadThread one can be sure that all pending input has been processed by the read thread. This function is then called after every public event which stops the process to obtain the entire process output. Test Plan: TestProcessIO.py should now succeed every time instead of flaking in and out. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8246 llvm-svn: 232023
* Restore commented setTearDownCleanup in ↵Oleksiy Vyalov2015-03-101-1/+1
| | | | | | TestHelloWorld.test_with_dwarf_and_attach_to_process_with_id_api. llvm-svn: 231737
* Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer ↵Oleksiy Vyalov2015-03-101-3/+1
| | | | | | | | - in order to allow modules caching from remote targets. http://reviews.llvm.org/D8037 llvm-svn: 231734
* Improve ValueObject::GetValueDidChange test; Add a comment for itIlia K2015-03-062-1/+16
| | | | | | | | | | | | | | Summary: This patch adds a few comments for GetValueDidChange and contains improvements for TestValueVarUpdate.py test which checks ValueObject::GetValueDidChange for complex types. Reviewers: zturner, granata.enrico, clayborg Reviewed By: clayborg Subscribers: jingham, lldb-commits, granata.enrico, zturner, clayborg Differential Revision: http://reviews.llvm.org/D8103 llvm-svn: 231526
* XFAIL tests that are known to fail occasionally on LinuxVince Harron2015-03-055-0/+8
| | | | | | | | Trying to get the build green so we can notice new failures easier. Differential Revision: http://reviews.llvm.org/D8039 llvm-svn: 231407
* Applying D7950 to four near copies of the file.Chaoren Lin2015-03-022-42/+48
| | | | | | | | | | | | | | Summary: Using std::thread/random instead of pthread/rand. Two of them also suffered from the synchronization problem in D7916. Reviewers: clayborg, zturner, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7991 llvm-svn: 230993
* Use -fstandalone-debug for few tests to get around a Clang optimizationVince Harron2015-02-281-0/+7
| | | | | | | | | | | | | | | | | | | clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD targets. Other targets do not, which causes several tests to fail. This flag enables FullDebugInfo for all targets. Fixes the following tests: TestCallStdStringFunction.py TestDataFormatterSkipSummary.py TestDataFormatterStdIterator.py TestDataFormatterStdList.py TestDataFormatterStdString.py TestSBValuePersist.py TestStringPrinter.py TestTypeCompletion.py llvm-svn: 230831
* Fix TestProcessIO.py when run against a remote targetVince Harron2015-02-131-15/+22
| | | | | | | | | | | | | Fixed test case to copy redirected stdout/stderr files from remote target to host llgs wasn't bothering to put the pty master file handle in the right place if stdout/stderr were redirected to a file. It is still needed for stdin. Corrected some log message text llvm-svn: 229141
* Fix 'process launch -i' for remote processesVince Harron2015-02-101-6/+19
| | | | | | | | | | | | | | | | | | We want to forward stdin when stdio is not disabled and when we're not redirecting stdin from a file. renamed m_stdio_disable to m_stdin_forward and inverted value because that's what we want to remember. There was previously a bug that if you redirected stdin from a file, stdout and stderr would also be redirected to /dev/null Adds support for remote target to TestProcessIO.py Fixes ProcessIOTestCase.test_stdin_redirection_with_dwarf for remote Linux targets llvm-svn: 228744
* Check-in generated test makefilesPavel Labath2015-02-051-0/+4
| | | | | | for rationale, see D7407. llvm-svn: 228314
* Fix TestTargetAPI.py when run against remote host.Vince Harron2015-02-041-1/+9
| | | | | | | In tests where stdio is redirected to a file, the file must be copied back from the remote host for analysis by the test. llvm-svn: 228175
* Fix the test to disassemble as if at address zero, not at an invalid ↵Greg Clayton2015-01-271-1/+1
| | | | | | | | address. The default SBAddress constructor sets the offset to 0xffffffffffffffff and the section to NULL. This was causing problems on clang 602 branches that use MemoryObjects to as the container for opcode bytes instead of a plain array of bytes. So we were asking for 3 bytes to be disassembled at address 0xffffffffffffffff which would cause an unsigned overflow and cause the MemoryObject to refuse to read anymore bytes. llvm-svn: 227153
* Fix a number of tests on Windows.Zachary Turner2015-01-141-1/+1
| | | | | | | These fix various issues with path handling and disable a few tests which use features of LLVM which are not yet supported on Windows. llvm-svn: 226042
* [TestEvents] Replace expectedFailureLinux with skipIfLinuxSiva Chandra2014-12-191-2/+5
| | | | | | | | | | | | | | | | | | | | | Summary: If we do not mark them as skip, they are still executed, which in turn is leading to an assertion failure. The change also adds skipIfLinux to a testlet which was not previously marked with skipIfLinux. This is because running even that test let leads to an assertion failure. Test Plan: dotest.py -C clang -p TestEvents.py Reviewers: vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6715 llvm-svn: 224644
* Now that AddressOf() does sane things with const results, this check is ↵Enrico Granata2014-12-151-4/+0
| | | | | | wrong. Since this is actually quite orthogonal to what this test is all about, actually get rid of the assertions llvm-svn: 224290
* Add a test case to validate that AddressOf() and GetLoadAddress() work on a ↵Enrico Granata2014-12-122-0/+43
| | | | | | ValueObjectConstResult. This test passing is the baseline of functionality we want to ensure for our const results llvm-svn: 224151
* Disable the remaining ProcessIO test on Windows.Zachary Turner2014-12-101-1/+1
| | | | | | | This still relies on PutSTDIN, just indirectly. So it was hanging due to not being able to get stdin from the test. llvm-svn: 223983
* Skip TestExprPathSynthetic test on FreeBSD, Linux & Windows.Oleksiy Vyalov2014-12-101-1/+2
| | | | llvm-svn: 223905
* Extend ValueObject::GetExpressionPath() to do something reasonable for ↵Enrico Granata2014-12-092-0/+23
| | | | | | | | | | | | | | | | | | | synthetic children Because of the way they are created, synthetic children cannot (in general) have a sane expression path A solution to this would be letting the parent front-end generate expression paths for its children Doing so requires a significant amount of refactoring, and might not always lead to better results (esp. w.r.t. C++ templates) This commit takes a simpler approach: - if a synthetic child is of pointer type and it's a target pointer, then emit *((T)value) - if a synthetic child is a non-pointer, but its location is in the target, then emit *((T*)loadAddr) - if a synthetic child has a value, emit ((T)value) - else, don't emit anything Fixes rdar://18442386 llvm-svn: 223836
* Add the ability for an SBValue to create a persisted version of itself.Enrico Granata2014-12-083-0/+116
| | | | | | | | | | | | Such a persisted version is equivalent to evaluating the value via the expression evaluator, and holding on to the $n result of the expression, except this API can be used on SBValues that do not obviously come from an expression (e.g. are the result of a memory lookup) Expose this via SBValue::Persist() in our public API layer, and ValueObject::Persist() in the lldb_private layer Includes testcase Fixes rdar://19136664 llvm-svn: 223711
* Disable GetSTDOUT, GetSTDERR, and PutSTDIN on Windows.Zachary Turner2014-11-251-5/+10
| | | | | | | | | | These methods are difficult / impossible to implement in a way that is semantically equivalent to the expectations set by LLDB for using them. In the future, we should find an alternative strategy (for example, i/o redirection) for achieving similar functionality, and hopefully deprecate these APIs someday. llvm-svn: 222775
* Mark 9 lldb unit tests for ubuntu as XFAIL.Siva Chandra2014-11-222-0/+3
| | | | | | | | | | | | | | | | | | | | The following lldb unit tests fail check-lldb on ubuntu: TestDataFormatterStdMap.py TestDataFormatterStdVBool.py TestDataFormatterStdVector.py TestDataFormatterSynthVal.py TestEvents.py TestInitializerList.py TestMemoryHistory.py TestReportData.py TestValueVarUpdate.py These unit test failures are for non-core functionality. The intent is to reduce the check-lldb FAILS to core functionality FAILS and then circle back later and fix these FAILS at a later date. llvm-svn: 222608
* Add decorator for FreeBSD failureEd Maste2014-11-201-0/+1
| | | | | | llvm.org/pr21620 llvm-svn: 222442
* Add decorator for intermittently failing test on FreeBSDEd Maste2014-11-171-0/+1
| | | | | | | | | | This test has intermittently failed on FreeBSD for quite some time when run as part of the full test suite. It generally passes when run by itself. Mark as expected failure for now to reduce buildbot noise. llvm.org/pr15039 test fails intermittently on FreeBSD llvm-svn: 222134
* Add -std=c99 for building the test case of TestValueVarUpdate - for Siva ↵Shawn Best2014-11-111-0/+1
| | | | | | Chandra : http://reviews.llvm.org/D6201 llvm-svn: 221694
* Fix a problem where ValueObjectVariable was not correctly setting its 'has ↵Enrico Granata2014-11-043-0/+84
| | | | | | value changed' flag for scalar valued variables. This fixes rdar://17851144 llvm-svn: 221298
* Fixed SBTarget::ReadMemory() to work correctly and the TestTargetAPI.py test ↵Greg Clayton2014-11-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | case that was reading target memory in TargetAPITestCase.test_read_memory_with_dsym and TargetAPITestCase.test_read_memory_with_dwarf. The problem was that SBTarget::ReadMemory() was making a new section offset lldb_private::Address by doing: size_t SBTarget::ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error) { ... lldb_private::Address addr_priv(addr.GetFileAddress(), NULL); bytes_read = target_sp->ReadMemory(addr_priv, false, buf, size, err_priv); This is wrong. If you get the file addresss from the "addr" argument and try to read memory using that, it will think the file address is a load address and it will try to resolve it accordingly. This will work fine if your executable is loaded at the same address (no slide), but it won't work if there is a slide. The fix is to just pass along the "addr.ref()" instead of making a new addr_priv as this will pass along the lldb_private::Address that is inside the SBAddress (which is what we want), and not always change it into something that becomes a load address (if we are running), or abmigious file address (think address zero when you have 150 shared libraries that have sections that start at zero, which one would you pick). The main reason for passing a section offset address to SBTarget::ReadMemory() is so you _can_ read from the actual section + offset that is specified in the SBAddress. llvm-svn: 221213
* Fixed a test suite error on MacOSX where people were using ".data" as the ↵Greg Clayton2014-11-031-1/+10
| | | | | | data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX). llvm-svn: 221197
* Fixed a test suite error on MacOSX where people were using ".data" as the ↵Greg Clayton2014-11-031-1/+9
| | | | | | data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX). llvm-svn: 221196
* Temporarily disable test on FreeBSD that is assertingEd Maste2014-10-291-0/+1
| | | | | | llvm.org/pr21325 llvm-svn: 220871
* Added the ability to add attributes to inlineSean Callanan2014-10-281-1/+2
| | | | | | | | | | | testcases. Also fixed one of the testcases to not run on the platforms that don't support Objective-C. We want to do better with the Objective-C attribute but we'll do that in a future commit. llvm-svn: 220820
* Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.Todd Fiala2014-10-261-0/+20
| | | | | | | | | | | | | | | | Similar to a recent test I fixed for gdb-remote attach scenarios, this fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and later, where ptrace starts requiring a ptracer to be an ancestor of the inferior to be ptraced. This change checks for Linux and the ptrace-related flags. If they're found, it tries to switch on the "allow any ptracer" mode for the inferior as the first statements in the program. It's a best-effort solution - if the prctl call fails, the failure is ignored, and probably will lead to the test failing. The ptrace security behavior can be modified system-wide, but is outside the scope of the test to address. Hence I went with this particular solution. llvm-svn: 220650
OpenPOWER on IntegriCloud