summaryrefslogtreecommitdiffstats
path: root/lldb/test/expression_command/call-function
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-285-209/+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-273-3/+3
| | | | llvm-svn: 251444
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-233-0/+6
| | | | | | | | | | | | | 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-223-22/+6
| | | | | | | | | | | | | | | | | | | | | 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
* Convert expectedFlakeyDarwin to expectedFlakeyDsym for ↵Todd Fiala2015-10-061-1/+1
| | | | | | | | | TestCallUserDefinedFunction.py Closes: https://llvm.org/bugs/show_bug.cgi?id=25076 llvm-svn: 249425
* Switching TestCallUserDefinedFunction from xfail to flaky on OS X.Todd Fiala2015-10-061-1/+1
| | | | | | | This is passing 50/50 times for me. Moving to flaky as precautionary measure. llvm-svn: 249419
* Merge dwarf and dsym testsTamas Berghammer2015-09-303-45/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove expectedFailureFreeBSD from now-passing testEd Maste2015-09-141-1/+0
| | | | | | | | ExprCommandCallUserDefinedFunction::test_with_dwarf llvm.org/pr20274 llvm-svn: 247596
* Cleaned up a few unexpected successes on OS XTodd Fiala2015-09-141-2/+0
| | | | | | | | | TestCallStdStringFunction TestCallWithTimeout TestConstVariables TestClassTypes llvm-svn: 247576
* XFAIL tests that try to call a function in the inferior.Zachary Turner2015-09-111-0/+1
| | | | | | llvm.org/pr21765 llvm-svn: 247456
* [Windows] XFAIL tests that depend on expression name lookup.Zachary Turner2015-08-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Name lookup doesn't work properly with Windows targets. This is most likely due to issues with name mangling, although there is at least one set of debug info related issues as well, since some of the name lookup requests appear to be failing on types rather than symbols. Specifically, this patch XFAILS the following set of tests: TestChar1632T.py TestRdar12991846.py TestConstVariables.py TestCallCPPFunction.py TestCallStopAndContinue.py TestCallUserDefinedFunction.py TestCModules.py TestCPPThis.py TestExprs2.py TestOverloadedFunctions.py TestRvalueReferences.py And fixing the underlying issue is tracked in http://llvm.org/pr24489 llvm-svn: 245338
* Expression evaluation, a new ThreadPlanCallFunctionUsingABI for executing a ↵Ewan Crawford2015-07-142-0/+93
| | | | | | | | | | | | | | | | | | | | function call on target via register manipulation For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support. Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls. In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation. To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter. The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values. Reviewers: jingham, spyffe Subscribers: emaste, lldb-commits, ted, ADodds, deepak2427 Differential Revision: http://reviews.llvm.org/D9404 llvm-svn: 242137
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-012-2/+2
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Added expectedFlakey test decoratorVince Harron2015-06-261-2/+2
| | | | | | | | | | | | | | | | | SUMMARY Flakey tests get two chances to pass Also, switched a bunch of tests to use new decorator. TEST PLAN Add one of these decorators to a test Edit a test to pass on the first invocation, confirm test appears as pass Edit a test to pass on the first invocation, pass on the second, confirm test appears as xfail Edit a test to fail on two consecutive runs, confirm test appears in results as fail/error Differential Revision: http://reviews.llvm.org/D10721 llvm-svn: 240789
* Use wildcard instead of relying on shell globbing.Chaoren Lin2015-06-021-1/+1
| | | | | | | | | | Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10194 llvm-svn: 238859
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-272-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: Before: AssertionError: False is not True : Process is launched successfully After: AssertionError: False is not True : Command 'run a.out' failed. >>> error: invalid target, create a target using the 'target create' command >>> Process could not be launched successfully Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D9948 llvm-svn: 238363
* Enable TestCallStopAndContinue on FreeBSDEd Maste2015-05-081-1/+0
| | | | | | | | | | It's reported to pass consistently on Linux now, and it passed for me in local testing on FreeBSD. Remove the expectedFailureFreeBSD decorator for now. llvm.org/pr20274 llvm-svn: 236853
* Enable TestCallStopAndContinue on LinuxPavel Labath2015-05-051-1/+0
| | | | | | | This test has been working reliably for me in the last 300 test runs. Enabling to see what the buildbot thinks... llvm-svn: 236495
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-302-2/+2
| | | | | | | | | | | | | | | | 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
* Don't clobber CFLAGS_EXTRAS in tests.Robert Flack2015-03-241-1/+1
| | | | | | | | | | | | | | | | | 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
* Enable TestCallStdStringFunction for GCC.Siva Chandra2015-03-181-1/+0
| | | | | | | | | | | | Test Plan: dotest.py -C gcc -p TestCallStdStringFunction Reviewers: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8426 llvm-svn: 232687
* 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
* 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
* Modify call-function and rdar-12437442 tests to clean up all files produced ↵Todd Fiala2014-09-081-0/+3
| | | | | | during test run. llvm-svn: 217387
* Add FreeBSD failure decorator for TestCallStopAndContinueEd Maste2014-07-121-0/+1
| | | | | | | | | | The testrun now completes successfully on my FreeBSD 11.0-CURRENT laptop. There are some intermittent failures on the FreeBSD buildbot still, which should be addressed in later commits. llvm.org/pr20274 llvm-svn: 212878
* Flipped intermittent test failures from skip to XFAIL.Todd Fiala2014-07-101-3/+3
| | | | | | | | | | | | | | | | | | The following intermittently-failing tests have been flipped from skip to XFAIL on some combo of Linux and MacOSX: TestCallStopAndContinue.py (Linux, MacOSX) TestCallWithTimeout.py (Linux) TestConvenienceVariables.py (Linux) TestStopHookMultipleThreads.py (Linux) The following new tests have been marked XFAIL but are just intermittently failing: TestMultipleDebug.py (definitely intermittent on MacOSX, not sure I've seen it pass yet on Linux) llvm-svn: 212762
* Skip tests that are intermittent on Linux, fix gdb-remote port-grabbing code.Todd Fiala2014-07-091-0/+1
| | | | | | | | | | | | | 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
* Skip TestCallStopAndContinue and TestCallThatRestarts on Darwin.Todd Fiala2014-07-091-0/+2
| | | | | | | | | These are failing intermittently. See http://llvm.org/bugs/show_bug.cgi?id=19246 for TestCallThatRestarts. Also applies to Linux. See http://llvm.org/bugs/show_bug.cgi?id=20274 for TestCallStopAndContinue. llvm-svn: 212660
* If a hand-called function is interrupted by hitting a breakpoint, then Jim Ingham2014-07-082-0/+73
| | | | | | | when you continue to finish off the function call, the expression result will be included as part of the thread stop info. llvm-svn: 212506
* Expected failure printing std::string::c_str() due to flubbing the typedef ↵Jim Ingham2014-03-191-6/+4
| | | | | | lookup. llvm-svn: 204206
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-101-1/+1
| | | | | | | | | | "mydir" inside each test case. This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated. Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. llvm-svn: 196985
* Annotate test that fails on the FreeBSD buildbotEd Maste2013-11-211-0/+1
| | | | | | llvm.org/pr17807 llvm-svn: 195361
* Expression evaluation works on FreeBSD after switch to MCJITEd Maste2013-08-301-1/+0
| | | | | | http://www.llvm.org/pr16697 llvm-svn: 189668
* Mark additional icc test failures as expected fail.Matt Kopec2013-08-021-0/+1
| | | | llvm-svn: 187660
* tests: Mark expected FreeBSD failures due to pr16697Ed Maste2013-07-241-0/+1
| | | | | | | These fail due to: error: Expression can't be run, because there is no JIT compiled function llvm-svn: 187072
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-151-1/+1
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Update TestCallStdStringFunction to expected fail for gcc and account for ↵Matt Kopec2013-03-011-2/+3
| | | | | | | | multiple breakpoint locations. Patch from Ashok Thirumurthi. llvm-svn: 176357
* Skip tests that assert on Linux in ↵Daniel Malea2013-02-131-1/+1
| | | | | | | | RecordLayoutBuilder::updateExternalFieldOffset() - Filed bugzilla PR-15256 llvm-svn: 175065
* Mark expected failures on Linux (due to bugzilla #14437)Daniel Malea2012-11-271-0/+1
| | | | llvm-svn: 168727
* Linux test case fixesDaniel Malea2012-11-211-1/+1
| | | | | | | | - missing includes in cpp test programs - mismatched dwarf/dsym test cases - make "com.apple.main-thread" expected string conditional on darwin platform llvm-svn: 168452
* Reverting unwanted changes to the test suiteEnrico Granata2012-10-241-1/+1
| | | | llvm-svn: 166627
* Reverting the changes to Scalar since this class needs to follow C rules for ↵Enrico Granata2012-10-241-1/+1
| | | | | | type promotion llvm-svn: 166626
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-222-6/+2
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* Removing the @expectedFailurei386 decorator from test cases that now work as ↵Enrico Granata2012-04-241-2/+0
| | | | | | a result of the latest changes to Value.cpp llvm-svn: 155419
* Add expected failure decorators for test cases which are failing for i386 ↵Johnny Chen2012-04-191-0/+2
| | | | | | | | architecture. Plus fix some test cases to skip/succeed for i386. llvm-svn: 155087
* Add a new option to the test driver, -N dsym or -N dwarf, in order to ↵Johnny Chen2012-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exclude tests decorated with either @dsym_test or @dwarf_test to be executed during the testsuite run. There are still lots of Test*.py files which have not been decorated with the new decorator. An example: # From TestMyFirstWatchpoint.py -> class HelloWatchpointTestCase(TestBase): mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint") @dsym_test def test_hello_watchpoint_with_dsym_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDsym(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() @dwarf_test def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDwarf(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() # Invocation -> [17:50:14] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug LLDB-137 Path: /Volumes/data/lldb/svn/ToT URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk Repository Root: https://johnny@llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 154133 Node Kind: directory Schedule: normal Last Changed Author: gclayton Last Changed Rev: 154109 Last Changed Date: 2012-04-05 10:43:02 -0700 (Thu, 05 Apr 2012) Session logs for test failures/errors/unexpected successes will go into directory '2012-04-05-17_50_49' Command invoked: python ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py compilers=['clang'] Configuration: arch=x86_64 compiler=clang ---------------------------------------------------------------------- Collected 2 tests 1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... skipped 'dsym tests' 2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... ok ---------------------------------------------------------------------- Ran 2 tests in 1.138s OK (skipped=1) Session logs for test failures/errors/unexpected successes can be found in directory '2012-04-05-17_50_49' [17:50:50] johnny:/Volumes/data/lldb/svn/ToT/test $ llvm-svn: 154154
* Removed the @expectedFailure decorators from test cases. They have been ↵Johnny Chen2011-10-241-5/+3
| | | | | | fixed with the r142717 check-in. llvm-svn: 142823
* Add @expectedFailure for TestCallStdStringFunction.py (radar was filed) andJohnny Chen2011-06-281-2/+4
| | | | | | | remove @expectedFailure from TestObjCMethods.py's print_ivars_correctly() function (it has been passing for a while). llvm-svn: 134022
* Add radar info.Johnny Chen2011-05-191-0/+1
| | | | llvm-svn: 131681
* Add TestCallStdStringFunction.py which calls std::string member functions ↵Johnny Chen2011-05-193-0/+78
while stopped on a breakpoint. llvm-svn: 131680
OpenPOWER on IntegriCloud