teak-llvm/lldb/packages/Python/lldbsuite/test
Frederic Riss 1739b7d076 Really test type lookup in TestCppTypeLookup.py
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
2018-05-08 03:08:46 +00:00
..
android/platform Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
api [test] Replace some references to Apple-internal bugs 2018-03-13 23:37:11 +00:00
arm ObjectFileELF: Add support for arbitrarily named code sections 2018-04-30 13:23:47 +00:00
attic *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
benchmarks Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
driver/batch_mode Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
example Remove getCategories mechanism of specifying test categories 2017-11-02 22:13:09 +00:00
expression_command Use the DWARF linkage name when importing C++ methods. 2018-03-27 19:40:50 +00:00
functionalities [lit, lldbsuite] Fixes for several tests LLDB tests for Python 3 or Windows 2018-05-07 21:57:00 +00:00
help Fix the formatting for help on option value types. 2017-07-27 00:18:18 +00:00
issue_verification test infra: clear file-charged issues on rerun of file 2016-10-01 00:17:08 +00:00
lang Really test type lookup in TestCppTypeLookup.py 2018-05-08 03:08:46 +00:00
linux [dotest] Clean up test folder clean-up 2018-03-16 12:04:46 +00:00
logging Last batch of test-tree cleaning changes 2018-03-21 15:29:32 +00:00
macosx [dotest] Clean up test folder clean-up 2018-03-16 12:04:46 +00:00
make [lit, lldbsuite] Update the lldbsuite to correctly run tests on windows and windows server 2018-04-24 17:08:05 +00:00
plugins [dotest] Clean up test folder clean-up 2018-03-16 12:04:46 +00:00
python_api [lit, lldbsuite] Fixes for several tests LLDB tests for Python 3 or Windows 2018-05-07 21:57:00 +00:00
sample_test Add a lldbutils routine that gathers up the boiler-plate 2017-07-06 02:18:16 +00:00
settings Fix the .experimental. settings feature so that we don't return an error 2018-05-01 22:49:01 +00:00
source-manager Last batch of test-tree cleaning changes 2018-03-21 15:29:32 +00:00
terminal Next batch of test-tree-cleaning changes 2018-03-15 13:47:09 +00:00
test_runner added Linux support for test timeout sampling 2016-09-26 20:25:47 +00:00
tools Fixup r331049 (FileSpec auto-normalization) 2018-04-30 12:59:14 +00:00
types Fix remote tests broken by r325690 2018-02-21 17:55:22 +00:00
warnings/uuid [dotest] Clean up test folder clean-up 2018-03-16 12:04:46 +00:00
__init__.py
.categories
bench.py Remove obsolete file 2018-02-06 21:04:06 +00:00
concurrent_base.py Move "concurrent events" tests back into one folder 2018-02-27 02:01:30 +00:00
configuration.py Remove vestigial remnants of the test crash info hook 2018-02-14 16:08:26 +00:00
darwin_log.py Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
decorators.py [lit, lldbsuite] Fixes for several tests LLDB tests for Python 3 or Windows 2018-05-07 21:57:00 +00:00
dosep.py Two more dosep-paralellization fallout fixes 2018-02-19 17:23:13 +00:00
dotest_args.py [dotest] Fix syntax error and typo. 2018-04-12 09:35:17 +00:00
dotest.py Test Commit: fix a comment to be grammatically correct 2018-05-07 21:19:14 +00:00
lldb_pylint_helper.py
lldbbench.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbcurses.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbdwarf.py [LLDB][MIPS] Fix TestLldbGdbServer failure for MIPS 2017-01-10 09:33:43 +00:00
lldbinline.py [dotest] Make the set of tests independent of the test configuration 2018-04-24 10:51:44 +00:00
lldbpexpect.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbplatform.py Initial patchset to get the testsuite running against armv7 and arm64 iOS devices. 2017-09-25 18:19:39 +00:00
lldbplatformutil.py Adapt some tests to work with PPC64le architecture 2018-02-28 20:57:26 +00:00
lldbtest_config.py [test] Skip a test when using an out-of-tree debugserver 2018-03-08 19:46:39 +00:00
lldbtest.py [dotest] Make the set of tests independent of the test configuration 2018-04-24 10:51:44 +00:00
lldbutil.py Allow relative file paths when settings source breakpoints 2018-04-13 14:52:54 +00:00
lock.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Makefile
README-TestSuite Add a sample_test directory with simple starter 2017-03-01 20:25:48 +00:00
redo.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
test_categories.py Add a "watchpoint" test category and annotate tests appropriately 2017-10-31 15:27:19 +00:00
test_result.py Remove vestigial remnants of the test crash info hook 2018-02-14 16:08:26 +00:00