summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp
Commit message (Collapse)AuthorAgeFilesLines
* [testsuite] Skip an already failing test on MacOS.Davide Italiano2018-10-301-0/+1
| | | | | | | | Due to some libcxx changes to inlining, this now also crashes, so it gets reported as "failure" by the bot. This commit doesn't really change the status quo, just placates the bots. llvm-svn: 345668
* Changing test names in TestDataFormatterLibcxxVariant.py and ↵Shafik Yaghmour2018-10-121-1/+1
| | | | | | TestStdFunctionStepIntoCallable.py to be unique, NFC llvm-svn: 344407
* Adding support to step into the callable wrapped by libc++ std::functionShafik Yaghmour2018-10-123-0/+116
| | | | | | | | rdar://problem/14365983 Differential Revision: https://reviews.llvm.org/D52851 llvm-svn: 344371
* Avoid using short identifiers in some testsPavel Labath2018-08-312-20/+20
| | | | | | | | | This applies the same workaround as r321271 to other tests. The root problem is that lldb finds an internal symbol with the same name in the debug info of system libraries, and then fails to disambiguate between the two. llvm-svn: 341235
* [lldbsuite, windows] Mark tests as XFAIL on Windows or skip themStella Stamenova2018-08-021-0/+1
| | | | | | | | | | | | | | Summary: 1) Several tests that are flakey on windows fail the run even if they are marked as expected to be flakey. This is because they fail frequently enough that even a retry won't help 2) Skip several tests on Windows that will occasionally hang rather than failing or exiting. This is causing the entire test suite to hang Reviewers: asmith, labath, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D50198 llvm-svn: 338769
* Fix whitespace in the python test suite.Raphael Isemann2018-07-275-8/+8
| | | | | | | | | | | | | Summary: The test suite has often unnecessary trailing whitespace, and sometimes unnecessary trailing lines or a missing final new line. This patch just strips trailing whitespace/lines and adds missing newlines at the end. Subscribers: ki.stfu, JDevlieghere, christof, lldb-commits Differential Revision: https://reviews.llvm.org/D49943 llvm-svn: 338171
* [lldbsuite] The test inside TestOverloadedFunctions.py has the wrong class nameStella Stamenova2018-07-121-1/+1
| | | | | | | | | | | | | | Summary: It looks like the test file was copied from TestCPPStaticMethods.py because they have the same name. This means that the two tests will try to write to the same output files and will either overwrite each other's output or occasionally cause failures because they can't both access the same file. Reviewers: asmith, zturner Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49261 llvm-svn: 336960
* [lldbsuite, windows] Don't crash LLDB when we try to retrieve a register on ↵Stella Stamenova2018-07-021-10/+9
| | | | | | | | | | | | | | | | Windows Summary: 1) When ReadRegister is called with a null register into on Windows, rather than crashing due to an access violation, simply return false. Not all registers and properties will be read or calculated correctly, but that is consistent with other platforms that also return false in that case 2) Update a couple of tests to reference pr37995 as their reason for failure since it is much more accurate. Support for floating point registers doesn't exist on Windows at all, rather than having issues. Reviewers: asmith, labath, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48844 llvm-svn: 336147
* Android.rules: Use libc++ by defaultPavel Labath2018-06-221-0/+5
| | | | | | | | | | | | | | | | libstdc++ will soon be dropped from the android NDK. This patch makes sure we are prepared for that by using libc++ in tests by default (i.e., except for libstdc++ data formatter tests). Only a couple of small tweaks were needed to make this work: - Add the libc++ include paths to CXXFLAGS only. This was necessary to make the tests compile with -fmodules. The modules tests have been disabled, but this way, they will be ready for them if they are enabled. - in one test I had to add an explicit std::string copy to make sure the copy constructor is there for the expression evaluator to find it. llvm-svn: 335344
* Make test sources compatible with android+libcxx+modulesPavel Labath2018-06-206-54/+53
| | | | | | | | | | | | | | In a modules build, android is very picky about which symbols are visible after including libc++ headers (e.g. <cstdio> defines only std::printf and not ::printf). This consolidates the tests where this was an issue to always include the <c???> version of the headers and prefixes the symbols with std:: as necessary. Apart from that, there is no functional change in the tests. llvm-svn: 335149
* Exempt some compilers from new static variable test.Jonas Devlieghere2018-06-121-8/+34
| | | | | | | | Apparently some compilers generate incomplete debug information which caused the updated test to fail. Therefore I've extracted the new check into a separate test case with the necessary decorators. llvm-svn: 334456
* [Test] Update static variable test.Jonas Devlieghere2018-06-111-4/+23
| | | | | | | | | | Before Pavel's change in r334181, we were printing too many global variables. This patch updates the test suite to ensure we don't regress again in the future. rdar://problem/29180927 llvm-svn: 334454
* [lit, windows] Disable a number of tests that are failing on WindowsStella Stamenova2018-06-074-0/+5
| | | | | | | | | | | | | | Summary: They all correspond to bugs that are already logged and I've added the appropriate (or most appropriate) bug numbers. This leaves only a handful of failing tests. Reviewers: asmith, zturner, labath Reviewed By: zturner Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D47892 llvm-svn: 334210
* Typo fixes.Bruce Mitchener2018-05-291-1/+1
| | | | | | | | | | Reviewers: javed.absar Subscribers: ki.stfu, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D47421 llvm-svn: 333399
* Really test type lookup in TestCppTypeLookup.pyFrederic Riss2018-05-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ... and fix one bug found this way. Currently, the test works not because types are looked up correctly, but because by injecting local variables we also materialize the types for Clang. If we disable the local variable injection, then one check fails. The reason of the failure is that FindTypes is run with max_matches==1 and this value is passed down to the symbol lookup functions. When the search is performed only on the basename (like it's the case for an entity defined in the root namespace), then the search will stop after having found one match on the basename. But that match might be in a namespace, we were really just looking up the basename in the accelerator tables. The solution is to not pass max_matches down, but to search without a limit and let RemoveMismatchedTypes do its job afterwards. Note the patch includes 2 hunks with the same change, but only the latter is tested. I couldn't find a way to create a testcase for the other branch of the if ('image lookup -t' allows me to get there, but it only ever returns one type anyway). Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D46548 llvm-svn: 331719
* Fix type_lookup test to make buildbots happyEugene Zemtsov2018-05-013-3/+3
| | | | llvm-svn: 331242
* Fix expression parser to not accept any type whose basename matches for a ↵Greg Clayton2018-04-303-0/+159
| | | | | | | | | | type that must exist at root level This patch fixes an issue where we weren't looking for exact matches in the expression parser and also fixed the type lookup logic in the Module.cpp. Tests added to make sure we don't regress. Differential Revision: https://reviews.llvm.org/D46128 llvm-svn: 331227
* Fix a crash when resolving overloads of C++ virtual methods.Adrian Prantl2018-04-203-0/+25
| | | | | | | | | The isOverload() method needs to account for situations where the two methods being compared don't have the same number of arguments. rdar://problem/39542960 llvm-svn: 330450
* Support template template parametersFrederic Riss2018-04-022-0/+35
| | | | | | | | | | | | | | | | | | Summary: We would fail to resolve (and thus display the value of) any templated type which contained a template template argument even though we don't really use template arguments. This patch adds minimal support for template template arguments, but I doubt we need any more than that. Reviewers: clayborg, jingham Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D44613 llvm-svn: 328984
* Revert r328715. Wasn't wrong, just not the issue.Jim Ingham2018-03-281-1/+0
| | | | llvm-svn: 328721
* Explicitly import subprocessJim Ingham2018-03-281-0/+1
| | | | | | | For some reason on one of our bots subprocess wasn't already imported. Do so explicitly. llvm-svn: 328715
* Add support for __attribute__(trivial_abi).Jim Ingham2018-03-233-0/+115
| | | | | | <rdar://problem/36035075>, <rdar://problem/36035039> llvm-svn: 328389
* Fix TestOperatorOverload for 32-bit buildsPavel Labath2018-03-212-14/+4
| | | | | | | | | | | | - use more goodies from Makefile.rules to correctly build a 32-bit binary. - avoid hardcoding typeof(nil) in the test. This should partially fix the linux bot. There is still one assertion failure remaining, which I'll have to investigate separately, as I am not experiencing it locally. llvm-svn: 328083
* [Testsuite] Modernize this test to be run out-of-tree.Davide Italiano2018-03-201-5/+3
| | | | | | | | New tests should run the make syntax voodoo $@ and $< instead of hardcoding the names. We should also document how to write one, it's on my list. llvm-svn: 328062
* [ExpressionParser] Re-implement r327356 in a less disruptive way.Davide Italiano2018-03-204-0/+61
| | | | | | | | | | | | Instead of applying the sledgehammer of refusing to insert any C++ symbol in the ASTContext, try to validate the decl if what we have is an operator. There was other code in lldb which was responsible for this, just not really exposed (or used) in this codepath. Also, add a better/more comprehensive test. <rdar://problem/35645893> llvm-svn: 328025
* Modernize a test.Jim Ingham2018-03-191-29/+2
| | | | llvm-svn: 327924
* [DWARFASTParserClang] Complete external record types before using them as a ↵Frederic Riss2018-03-163-0/+31
| | | | | | | | | | | | | | | | | | decl context. Summary: When in a gmodules-like debugging scenario, you can have a parent decl context that gets imported from an external AST. When this happens, we must be careful to complete this type before adding children to it, otherwise it sometimes results in a crash. Reviewers: clayborg, jingham Subscribers: aprantl, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D43592 llvm-svn: 327750
* [test] Replace some references to Apple-internal bugsVedant Kumar2018-03-134-13/+3
| | | | | | | This removes around 10 references to Apple-internal radars. I've filed fresh bugs on bugs.llvm.org as appropriate for open issues. llvm-svn: 327463
* Make TestDynamicValueSameBase gcc-compatiblePavel Labath2018-03-011-3/+7
| | | | | | | | | | gcc will say that the type of "this" is "T * const", clang "T *". Compare the unqualified type names to erase the difference between the two, as the constness is not a part of this test. FWIW, I think that the gcc behavior makes more sense here. llvm-svn: 326449
* We were getting the wrong dynamic type if there were two classes with the ↵Jim Ingham2018-03-013-0/+99
| | | | | | | | | | | | | | same basename. There's a bug in FindTypes, it ignores the exact flag if you pass a name that doesn't begin with :: and pass eTypeClassAny for the type. In this case we always know that the name we get from the vtable name is absolute so we can work around the bug by prepending the "::". This doesn't fix the FindTypes bug. <rdar://problem/38010986> llvm-svn: 326412
* Mark test_*int*_t_dwarf as failing on FreeBSDEd Maste2018-02-271-0/+9
| | | | | | | | | | | | Further investigation required; tests will be enabled on the buildbot worker soon. Marking failing tests for now in order to start with a green buildbot while investigation takes place. This is a recommit of r326134, with the required import added. llvm.org/pr36527 llvm-svn: 326166
* Revert r326134 due to broken buildbotEd Maste2018-02-261-8/+0
| | | | llvm-svn: 326139
* Mark test_*int*_t_dwarf as failing on FreeBSDEd Maste2018-02-261-0/+8
| | | | | | | | | | Further investigation required; tests will be enabled on the buildbot worker soon. Marking failing tests for now in order to start with a green buildbot while investigation takes place. llvm.org/pr36527 llvm-svn: 326134
* Only throw -fPIC when building a shared libraryAaron Smith2018-02-082-4/+0
| | | | | | | | | | | | | | | | | | Summary: Update makefiles to specify -fPIC in Makefile.rules and only throw -fPIC when building a shared library. This change is necessary to allow building the lldb tests on Windows where -fPIC is not a valid option. Update a few places to Python 3.x syntax Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: stella.stamenova, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42994 llvm-svn: 324671
* Compile the LLDB tests out-of-tree.Adrian Prantl2018-01-3010-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Skip TestWithModuleDebugging on i386 linux (pr36146)Pavel Labath2018-01-301-0/+1
| | | | | | It fails due to an assertion (if these are enabled). llvm-svn: 323736
* Fix linux fallout from c++ gmodules enablePavel Labath2018-01-261-2/+4
| | | | | | | | | | | TestLibcxxListLoop - fails because the evil "define private public" trick does not work with gmodules. The purpose of the test is not to test debug info parsing so I just mark it as no_debug_info_testcase. In the long term it may be interesting to write a mock std::list which will allow us to test bad inputs to data formatters more easily. TestGModules - seems to be a genuine bug. Filed pr36107 and xfailed. llvm-svn: 323520
* Wrap all references to build artifacts in the LLDB testsuite (NFC)Adrian Prantl2018-01-1938-58/+57
| | | | | | | | | 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
* Skip TestFunctionTemplateParameterPack.py, which unexpectedly asserts (PR35920)Vedant Kumar2018-01-121-1/+7
| | | | | | | | | | This test stresses expression evaluation support for template functions. Currently the support is rudimentary, and running this test causes assertion failures in clang. This test cannot be XFAIL'ed because the test harness treats assertion failures as unexpected events. For now, the test must be skipped. llvm-svn: 322340
* Look for external types in all clang modules imported by the current symbol ↵Adrian Prantl2018-01-047-0/+51
| | | | | | | | | | | | | file. This fixes a bug in -gmodules DWARF handling when debugging without a .dSYM bundle that was particularly noticable when debugging LLVM itself. Debugging without clang modules and DWO handling should be unaffected by this patch. <rdar://problem/32436209> llvm-svn: 321802
* Work around test failures on red-hat linuxPavel Labath2017-12-211-1/+1
| | | | | | | | | | | | | | | | Two tests were failing because the debugger was picking up multiply defined internal symbols from the system libraries. This is a bug, as there should be no ambiguity because the tests are defining variables with should shadow these symbols, but lldb is not smart enough to figure that out. I work around the issue by renaming the variables in these tests, and in exchange I create a self-contained test which reproduces the issue without depending on the system libraries. This increases the predictability of our test suite. llvm-svn: 321271
* [TestCppScope] This test now passes on Darwin.Davide Italiano2017-12-121-5/+0
| | | | | | | | | I tested on x86-64 and Jason on embedded architectures. This cleans up another couple of reported unexpected successes. <rdar://problem/28623427> llvm-svn: 320452
* Makefile.rules: compile all tests with -fno-limit-debug-infoPavel Labath2017-12-043-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This flag is on by default for darwin and freebsd, but off for linux. Without it, clang will sometimes not emit debug info for types like std::string. Whether it does this, and which tests will fail because of that depends on the linux distro and c++ library version. A bunch of tests were already setting these flags manually, but here instead I take a whole sale approach and enable this flag for all tests. Any test which does not want to have this flag (right now we have one such test) can turn it off explicitly via CFLAGS_EXTRAS+=$(LIMIT_DEBUG_INFO_FLAGS) This fixes a bunch of data formatter tests on red-hat. Reviewers: davide, jankratochvil Subscribers: emaste, aprantl, krytarowski, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D40717 llvm-svn: 319653
* Support scoped enums in the DWARF AST parserTamas Berghammer2017-11-071-2/+2
| | | | | | | | Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D39545 llvm-svn: 317563
* remove FreeBSD xfail decorator from TestCppNsImportEd Maste2017-08-101-1/+0
| | | | | | | | | | The Linux xfail decorator was removed in r272326 with the claim that the test "runs reliably on the linux x86 buildbot." It also runs reliably on FreeBSD for me. llvm.org/pr25925 llvm-svn: 310644
* RFix PR33875 by distinguishing between DWO and clang modules.Adrian Prantl2017-07-241-2/+0
| | | | | | | | This reapplies https://reviews.llvm.org/D35740 with a tweak to find the section by name rather than type. Section types don't distinguish between regular sections and their DWO counterparts. llvm-svn: 308905
* Revert "Fix PR33875 by distinguishing between DWO and clang modules"Adrian Prantl2017-07-231-0/+2
| | | | | | This reverts commit r308850. llvm-svn: 308851
* Fix PR33875 by distinguishing between DWO and clang modulesAdrian Prantl2017-07-231-2/+0
| | | | | | | | | | | | | | The DWO handling code can get confused by clang modules which also use skeleton CUs to point to the object file with the full debug info. This patch detects whether an object is a "real" DWO or a clang module and prevents LLDB from interpreting clang modules as DWO. This fixes the regression in TestWithModuleDebugging. http://llvm.org/bugs/show_bug.cgi?id=33875 Differential Revision: https://reviews.llvm.org/D35740 llvm-svn: 308850
* XFail TestWithModuleDebugging on linux (bug 33875)Pavel Labath2017-07-211-0/+2
| | | | llvm-svn: 308732
* Added a testcase for local/namespaced name conflicts.Sean Callanan2017-05-313-0/+39
| | | | | | | | | This works on SVN but is a bit fragile on the Swift branch. I'm adding the test to both, so we have this path covered. <rdar://problem/32372372> llvm-svn: 304314
OpenPOWER on IntegriCloud