summaryrefslogtreecommitdiffstats
path: root/lldb/test/expression_command
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2867-2579/+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-2723-23/+23
| | | | llvm-svn: 251444
* Port the python api decorator to use test categoriesPavel Labath2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | Summary: Per discussions on the mailing list, I have implemented a decorator which annotates individual test methods with categories. I have used this framework to replace the '-a' and '+a' command-line switches (now '-G pyapi' and '--skip-category pyapi') and the @python_api_test decorator (now @add_test_categories('pyapi')). The test suite now gives an error message suggesting the new options if the user specifies the deprecated +/-a switches. If the general direction is good, I will follow this up with other switches. Reviewers: tberghammer, tfiala, granata.enrico, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14020 llvm-svn: 251277
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-2323-0/+46
| | | | | | | | | | | | | 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-2223-171/+48
| | | | | | | | | | | | | | | | | | | | | 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-3023-174/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Last set of XFAILs for Windows.Zachary Turner2015-09-161-0/+1
| | | | llvm-svn: 247825
* Decorate flaky FreeBSD testEd Maste2015-09-161-0/+1
| | | | | | | | | | | | | ExprCommandWithTimeoutsTestCase::expectedFailureFreeBSD had an expectedFailureFreeBSD decorator, removed in r247799. It had been flakey on the FreeBSD buildbot but passed locally. John Wolfe has since observed a local failure, so add expectedFlakeyFreeBSD until we can investigate and likely increase the timeout in the test. llvm.org/pr19605 (FreeBSD) llvm.org/pr20275 (equivalent Linux issue) llvm-svn: 247822
* Remove expectedFailureFreeBSD from passing testEd Maste2015-09-161-1/+0
| | | | | | | | | | | | | ExprCommandWithTimeoutsTestCase::expectedFailureFreeBSD This test passes locally but was marked XFAIL due to failures on the FreeBSD buildbot. That buildbot has been retired as it was overloaded, and we will investigate again if this fails once a new buildbot is in place. llvm.org/pr19605 llvm-svn: 247799
* OS X unexpected success cleanupTodd Fiala2015-09-141-3/+7
| | | | | | | | | | TestPersistObjCPointeeType and TestObjCNewSyntax marked up to expect success on clang >= 7.0.0. TestMultipleDebuggers passed 25/25 times, taking off intermittent. If this changes, I'll make sure it goes into a flaky/flakey category. llvm-svn: 247601
* Remove expectedFailureFreeBSD from now-passing testEd Maste2015-09-141-1/+0
| | | | | | | | ExprCommandCallUserDefinedFunction::test_with_dwarf llvm.org/pr20274 llvm-svn: 247596
* Fix up bad compiler spec on ConstVariableTestCase; fixup two more OS X ↵Todd Fiala2015-09-141-1/+0
| | | | | | unexpected successes. llvm-svn: 247591
* Cleaned up a few unexpected successes on OS XTodd Fiala2015-09-142-3/+0
| | | | | | | | | TestCallStdStringFunction TestCallWithTimeout TestConstVariables TestClassTypes llvm-svn: 247576
* XFAIL miscellaneous tests on windows.Zachary Turner2015-09-111-0/+1
| | | | | | llvm.org/pr24778 llvm-svn: 247460
* XFAIL tests that try to call a function in the inferior.Zachary Turner2015-09-114-0/+6
| | | | | | llvm.org/pr21765 llvm-svn: 247456
* XFAIL TestFormatters on FreeBSDEd Maste2015-09-091-0/+2
| | | | | | | | | The test is hitting an assertion in Clang. This is an extension of r246766. llvm.org/pr24691 llvm-svn: 247141
* Set the default language to use when evaluating to that of the frame's CU.Dawn Perchik2015-09-042-53/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | * Use the frame's context (instead of just the target's) when evaluating, so that the language of the frame's CU can be used to select the compiler and/or compiler options to use when parsing the expression. This allows for modules built with mixed languages to be parsed in the context of their frame. * Add all C and C++ language variants when determining the language options to set. * Enable C++ language options when language is C or ObjC as a workaround since the expression parser uses features of C++ to capture values. * Enable ObjC language options when language is C++ as a workaround for ObjC requirements. * Disable C++11 language options when language is C++03. * Add test TestMixedLanguages.py to check that the language being used for evaluation is that of the frame. * Fix test TestExprOptions.py to check for C++11 instead of C++ since C++ has to be enabled for C, and remove redundant expr --language test for ObjC. * Fix TestPersistentPtrUpdate.py to not require C++11 in C. Reviewed by: clayborg, spyffe, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11102 llvm-svn: 246829
* Lookup function using full name if one with mangled name is not found.Siva Chandra2015-09-031-1/+0
| | | | | | | | | | | | | | Summary: Remove expected failure decorators from tests which now should start passing. Reviewers: clayborg, spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12613 llvm-svn: 246820
* XFAIL TestFormatters on android (llvm.org/pr24691)Pavel Labath2015-09-031-0/+2
| | | | | | the test is hitting an assertion in clang. llvm-svn: 246766
* Fix a bunch of portability issues in test executables.Zachary Turner2015-08-253-4/+5
| | | | llvm-svn: 245983
* Increase timeout in TestExpressionInSyscallPavel Labath2015-08-211-1/+1
| | | | | | test times out on the windows->android buildbot (probably due to android emulator being slow) llvm-svn: 245691
* [Windows] XFAIL tests that require calling a function in target.Zachary Turner2015-08-206-0/+7
| | | | | | | This has known issues on Windows. Fixing this is tracked by http://llvm.org/pr21765 llvm-svn: 245630
* Increase timeout in TestCallWithTimeout to reduce flakynessPavel Labath2015-08-201-3/+3
| | | | | | | The test was flaky on the android buildbot, because the 10ms test completed before we got a chance to interrupt it. I increase the duration to 50ms to hopefully get more consistent results. llvm-svn: 245555
* Increase timeout in TestCallThatRestartsPavel Labath2015-08-191-0/+2
| | | | | | | | the test was failing on android because processing 30 signals involved a lot of round-trips, which was not possible in the 0.5s default timeout. After the increase the test seems to pass reliably. llvm-svn: 245448
* On Linux, clear the signal mask of the launched inferiorPavel Labath2015-08-191-1/+0
| | | | | | | | | | | | | | | | | | | Summary: Due to fork()/execve(), the launched inferior inherits the signal mask of its parent (lldb-server). But because lldb-server modifies its signal mask (It blocks SIGCHLD, for example), the inferior starts with some signals being initially blocked. One consequence is that TestCallThatRestarts.ExprCommandThatRestartsTestCase (test/expression_command/call-restarts) fails because sigchld_handler() in lotta-signals.c is not called, due to the SIGCHLD signal being blocked. To prevent the signal masking done by lldb-server from affecting the created inferior, the signal mask of the inferior is now cleared before the execve(). Patch by: Yacine Belkadi Reviewers: ovyalov, labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12138 llvm-svn: 245436
* [Windows] XFAIL tests that depend on expression name lookup.Zachary Turner2015-08-183-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Set orig_eax to -1 for Linux x86 platformsRavitheja Addepally2015-08-131-1/+0
| | | | | | | | | | | | | | | | | Summary: For Linux x86 based environments the orig_eax/orig_rax register should be set to -1 to prevent the instruction pointer to be decremented, which was the cause for the SIGILL exception. Fix for Bug 23659 Reviewers: zturner, ashok.thirumurthi, mikesart, jingham, clayborg Subscribers: clayborg, labath Differential Revision: http://reviews.llvm.org/D11411 llvm-svn: 244875
* Fix comment in TestExprOptions to match change of language from ObjC to ObjC++.Dawn Perchik2015-07-281-1/+1
| | | | llvm-svn: 243488
* Fix test suite. For now we can't disable C++ for expressions since the ↵Greg Clayton2015-07-271-1/+1
| | | | | | return value is returned as a reference and this test fails on MacOSX. llvm-svn: 243342
* Only test ObjC expression options on Darwin.Chaoren Lin2015-07-271-44/+52
| | | | | | | | | | Reviewers: dawn, emaste, vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11539 llvm-svn: 243329
* XFAIL TestExprOptions on FreeBSD.Ed Maste2015-07-271-0/+1
| | | | | | r243230 XFAILed it for Linux; it also fails on FreeBSD. llvm-svn: 243307
* XFAIL TestExprOptions on Linux.Chaoren Lin2015-07-251-0/+1
| | | | llvm-svn: 243230
* Shorten the lldb timeout, we were seeing occasional failure becauseJim Ingham2015-07-251-1/+1
| | | | | | | | lldb didn't wake up before the target function got a chance to complete. <rdar://problem/21990308> llvm-svn: 243193
* Specify a language to use when parsing expressions.Dawn Perchik2015-07-254-0/+131
| | | | | | | | | | | | This patch adds the option -l/--language to the expression command, for use when setting the language options or choosing an alternate FE. If not specified, the target.language setting is used. Reviewed by: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11447 llvm-svn: 243187
* Eliminated a potential infinite recursion in structure layout when the originSean Callanan2015-07-201-0/+43
| | | | | | | | | | | for a CXXRecordDecl gets pointed at that record. This can happen when a type is imported out of and then into the target's AST context without being laid out. Also added a testcase that covers this scenario. <rdar://problem/21844453> llvm-svn: 242687
* Make this test case be somewhat less verbose when not asked toEnrico Granata2015-07-171-5/+6
| | | | llvm-svn: 242573
* 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
* Fixed a serious bug in DeportType where the types could retain DeclContexts thatSean Callanan2015-07-081-0/+6
| | | | | | | | | | | | | pointed into the artificial function constructed for the expression. I now make anything that pointed to the function as its DeclContext be global while the copy occurs; afterward I restored the old DeclContext. Added a testcase that make sure that this works properly and doesn't crash anything. <rdar://problem/21049838> llvm-svn: 241695
* Fix final wait in ExprSyscallTestCase for aarch64Tamas Berghammer2015-07-061-2/+4
| | | | llvm-svn: 241435
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-0114-15/+15
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Added expectedFlakey test decoratorVince Harron2015-06-263-4/+4
| | | | | | | | | | | | | | | | | 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
* Add a test for expression evaluation while inferior is blocked in a syscallPavel Labath2015-06-173-0/+106
| | | | | | | | | | | | | | Summary: The test is XFAILed for Linux x86_64 and i386 because of bug #23659. Test Plan: NFC Reviewers: tberghammer Subscribers: lldb-commits, emaste Differential Revision: http://reviews.llvm.org/D10519 llvm-svn: 239973
* 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
* Added a test that makes sure that structs returnedSean Callanan2015-05-281-0/+3
| | | | | | | | from expressions return intact. <rdar://problem/21146609> llvm-svn: 238512
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-2714-15/+15
| | | | | | | | | | | | | | | | | | | | | 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
* XFAIL'd some flakey tests on DarwinVince Harron2015-05-171-0/+1
| | | | llvm-svn: 237543
* Constant result ValueObjects are - well - constantEnrico Granata2015-05-163-0/+73
| | | | | | | | | | And they also do not have a thread/frame attached to them That makes dynamic and synthetic values attached to them impossible to update - which, among other things, makes it impossible to properly display persistent variables of types that could have such dynamic/persistent values Fix this by making it so that a ValueObject can control its constantness (hint: dynamic and synthetic values cannot be constant) and whether it wants to let itself be updated when an invalid thread is around llvm-svn: 237504
* Revert accidental file checkinVince Harron2015-05-121-1/+1
| | | | llvm-svn: 237184
OpenPOWER on IntegriCloud