summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-28552-28036/+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
* Changes for Bug 17384Ravitheja Addepally2015-10-281-4/+9
| | | | | | | | | | | | | | | | | | | | | | | Summary: Virtual dynamic shared objects, or vdso files were not loaded for Linux OS.In Bug 17384 the call stack could not be unwinded from functions residing in the vdso object. This commit adds support for loading such files by reading the Aux vectors since a vdso is invisibily mapped to the inferiors address space and the actual file is not present in the filesystem. The presence of the vdso is detected by inspecting the Aux vector for AT_SYSINFO_EHDR tag. Reviewers: lldb-commits, ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14118 llvm-svn: 251505
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-27164-164/+164
| | | | llvm-svn: 251444
* Fix race condition in process resumePavel Labath2015-10-271-1/+0
| | | | | | | | | | | | | | | | | | Summary: Gdb-remote's async thread sent out the eBroadcastBitRunPacketSent message *before* actually sending out the continue packet. Since it's this message the actually triggers the public state transition, it could happen (and it did happen in TestAttachResume, which does an "process interrupt" right after a continue) that we attempt to stop the inferior before it was actually started (which obviously did not end well). This fixes the problem by moving the broadcast after the packet was actually sent. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14083 llvm-svn: 251399
* Change TestTypeCompletion to not rely on std::stringEnrico Granata2015-10-262-22/+43
| | | | | | On some combination of platform and c++ library, this dependency was causing the test to fail for reasons tangential to its real objective llvm-svn: 251368
* Fixed the test suite on MacOSX so that ↵Greg Clayton2015-10-261-6/+0
| | | | | | | | | | "test/api/multithreaded/TestMultithreaded.py" works without errors. The problem was that the @skipIfNoSBHeaders on darwin was trying to use self.lib_dir when it hadn't been set yet. I looked at the code and places were required to set "self.lib_dir" for no real reason as all places that used it just used the LLDB_LIB_DIR environment variable. So I removed all uses of self.lib_dir and replaced them to use 'os.environ["LLDB_LIB_DIR"]'. Did the same for self.implib_dir. llvm-svn: 251315
* Convert `long` to `int`, and portably detect all integral types.Zachary Turner2015-10-261-3/+3
| | | | llvm-svn: 251305
* Python3 - Change `dict.has_key(x)` to `x in dict`Zachary Turner2015-10-261-1/+1
| | | | llvm-svn: 251304
* Convert deprecated unittest method names.Zachary Turner2015-10-264-6/+6
| | | | | | | Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. llvm-svn: 251303
* Fix usages of range() and xrange() for Python 3.Zachary Turner2015-10-263-4/+4
| | | | llvm-svn: 251302
* Port the python api decorator to use test categoriesPavel Labath2015-10-2617-20/+21
| | | | | | | | | | | | | | | | | | 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
* Lower the depth of the recursion in this test since it would on occasion ↵Enrico Granata2015-10-241-1/+1
| | | | | | timeout and add noise to test runs llvm-svn: 251161
* [TestBreakpointCommand] Fix after r251121Siva Chandra2015-10-231-3/+3
| | | | | | | | | | | | | | | Summary: "from __future__ import print_function" was added to the test file but not to the embedded interpreter. This change uses file.write instead to avoid all problems with print. Reviewers: zturner Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D14029 llvm-svn: 251150
* Make uses of unicode literals portable.Zachary Turner2015-10-232-2/+8
| | | | | | | | | Six provides six.u() which resolves to either u"" or "" depending on Python version, and and six.unichr() which resolves to either unichr() or chr() depending on Python version. Use these functions anywhere where we were relying on u"" or unichr(). llvm-svn: 251139
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-23170-88/+427
| | | | | | | | | | | | | 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
* Enable the libc++ tests on linuxPavel Labath2015-10-239-18/+18
| | | | | | | | | | | | | | | Summary: The list of loaded modules which skip_if_library_missing is depending on is not available on linux until after we run the target. This causes the tests to be wrongfully skipped. This commit moves the skip call after the run command. Reviewers: granata.enrico, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13985 llvm-svn: 251102
* Update every test to import `lldb_shared`.Zachary Turner2015-10-22162-1216/+328
| | | | | | | | | | | | | | | | | | | | | 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
* Fix libstdc++ data formatters on Ubuntu 15.10 x86_64Todd Fiala2015-10-222-13/+15
| | | | | | See http://reviews.llvm.org/D13964 for details. llvm-svn: 250965
* [SBValue] Add a method GetNumChildren(uint32_t max)Siva Chandra2015-10-213-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Along with this, support for an optional argument to the "num_children" method of a Python synthetic child provider has also been added. These have been added with the following use case in mind: Synthetic child providers currently have a method "has_children" and "num_children". While the former is good enough to know if there are children, it does not give any insight into how many children there are. Though the latter serves this purpose, calculating the number for children of a data structure could be an O(N) operation if the data structure has N children. The new method added in this change provide a middle ground. One can call GetNumChildren(K) to know if a child exists at an index K which can be as large as the callers tolerance can be. If the caller wants to know about children beyond K, it can make an other call with 2K. If the synthetic child provider maintains state about it counting till K previosly, then the next call is only an O(K) operation. Infact, all calls made progressively with steps of K will be O(K) operations. Reviewers: vharron, clayborg, granata.enrico Subscribers: labath, lldb-commits Differential Revision: http://reviews.llvm.org/D13778 llvm-svn: 250930
* Use six to portably handle module renames in Python 2 and 3Zachary Turner2015-10-214-4/+2
| | | | llvm-svn: 250915
* [DataFormatters] Make libc++ list loop detection linearPavel Labath2015-10-213-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Loop detection code is being called before every element access. Although it tries to cache some of the data by remembering the loop-free initial segment, every time it needs to increase this segment, it will start from scratch. For the typical usage pattern, where one accesses the elements in order, the loop detection will need to be run after every access, resulting in quadratic behavior. This behavior is noticable even for the default 255 element limit. In this commit, I rewrite the algorithm to be truly incremental -- it maintains the state of its loop-detection runners between calls, and reuses them when it needs to check another segment. This way, each part of the list is scanned only once, resulting in linear behavior. Also note that I have changed the operator== of ListEntry to do the comparison based on the value() function (instead of relying on ValueObjectSP equality). In my experiments, I kept getting different ValueObjectSPs when going through the same element twice. Reviewers: granata.enrico Subscribers: lldb-commits, sivachandra Differential Revision: http://reviews.llvm.org/D13902 llvm-svn: 250890
* Adjust TestCompletion.py and TestDumpDynamic.py after recent changes.Siva Chandra2015-10-202-2/+2
| | | | | | | | | | Reviewers: zturner, spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13882 llvm-svn: 250782
* Add a data formatter for __NSArray0, the type of empty arraysEnrico Granata2015-10-141-0/+2
| | | | llvm-svn: 250341
* ArchSpec: fix unintentional promotion of unspecified unknowns to specified ↵Todd Fiala2015-10-131-7/+7
| | | | | | | | | | | | | | | | | | | | | unknowns * ArchSpec::MergeFrom() would erroneously promote an unspecified unknown to a specified unknown when both the ArchSpec and the merged in ArchSpec were both unspecified unknowns. This no longer happens, which fixes issues with global module cache lookup in some situations. * Added ArchSpec::DumpTriple(Stream&) that now properly prints unspecified unknowns as '*' and specified unknows as 'unknown'. This makes it trivial to tell the difference between the two. Converted printing code over ot using DumpTriple() rather than building from scratch. * Fixed up a couple places that were not guaranteeing that an unspecified unknown was recorded as such. llvm-svn: 250253
* Xfail a watchpoint test on Windows, until Windows implements watchpoints.Adrian McCarthy2015-10-131-0/+1
| | | | llvm-svn: 250189
* TestAttachResume is still flaky on linux. mark it as suchPavel Labath2015-10-121-0/+1
| | | | llvm-svn: 250069
* Improve TestValueOfVectorVariableTamas Berghammer2015-10-121-10/+3
| | | | | | | * XFAIL it for android arm/aarch64 as watchpoints aren't supported there * Remove the dwarf/dsym test separation as they will be generated automatically llvm-svn: 250024
* X86: Change FTAG register size in FXSAVE structureAbhishek Aggarwal2015-10-122-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Changed from 16 bits to 8 bits for Intel Architecture -- FXSAVE structure now conforms with the layout of FXSAVE area specified by IA Architecture Software Developer Manual - Modified Linux and FreeBSD specific files to support this change -- MacOSX already uses 8 bits for ftag register - Modified TestRegisters.py and a.cpp: -- Change allows 8 bit comparison of ftag values -- Change resolves Bug 24733: Removed XFAIL for Clang as the test works and passes for Clang compiler as well -- Change provides a Generic/Better way of testing Bug 24457 and Bug 25050 by using 'int3' inline assembly in inferior Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ovyalov, jingham, clayborg Subscribers: tfiala, emaste Differential Revision: http://reviews.llvm.org/D13587 llvm-svn: 250022
* [TestValueOfVectorVariable] Reduce the vector size to 4.Siva Chandra2015-10-092-4/+6
| | | | | | | | | | | | Summary: On x86, we only have 4 watchpoint registers. Reviewers: mohit.bhakkad Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13608 llvm-svn: 249916
* Correction in rL249838: Moving test to appropriate directoryMohit K. Bhakkad2015-10-093-0/+75
| | | | llvm-svn: 249897
* This test is useless. It doesn't work and it fails on MacOSX. Removing it.Greg Clayton2015-10-072-78/+0
| | | | llvm-svn: 249613
* This is the work I was building up to with my patches yesterdayEnrico Granata2015-10-077-36/+36
| | | | | | | | | Introduce the notion of Language-based formatter prefix/suffix This is meant for languages that share certain data types but present them in syntatically different ways, such that LLDB can now have language-based awareness of which of the syntax variations it has to present to the user when formatting those values This is goodness for new languages and interoperability, but is NFC for existing languages. As such, existing tests cover this llvm-svn: 249587
* Resumbit "Fix race condition during process detach"Pavel Labath2015-10-071-1/+0
| | | | | | | This is a resubmission of r248371. It also incorporates the process event hijack patch by Kyrill Lapshin in D12968. llvm-svn: 249554
* XFAIL new dwo test failing with totclang on linux i386Tamas Berghammer2015-10-071-0/+1
| | | | llvm-svn: 249539
* Run tests with dwo symbol filesTamas Berghammer2015-10-071-0/+1
| | | | | | | | | | dwo symbol files are generated when code compiled with the "-gsplit-dwarf" command option (https://gcc.gnu.org/wiki/DebugFission). This CL modifies the test system to run tests with inferiors compile with the "-gsplit-dwarf" Differential revision: http://reviews.llvm.org/D13300 llvm-svn: 249530
* Route the preferred-display-language mechanism to the ValueObjectPrinter and ↵Enrico Granata2015-10-071-2/+0
| | | | | | actually fill in a few gaps for dynamic and synthetic values to be able to adopt this in useful ways llvm-svn: 249507
* Rename a test case to avoid name conflictTamas Berghammer2015-10-061-0/+0
| | | | | | | | | Rename the python source file for DataFormatterOSTypeTestCase to match the purpose of the test and to avoid a name conflict with DataFormatterBoolRefPtr. The name conflict caused a race condition in the test runner what we have to address separately. llvm-svn: 249407
* Fix TestCompDirSymLink.py - remove existing symlink leftovers if previous ↵Oleksiy Vyalov2015-10-021-0/+2
| | | | | | | | test run was terminated (e.g., due timeout). llvm-svn: 249203
* Change expected stop reason in TestInferiorAssert for Android API <= 16Tamas Berghammer2015-10-021-1/+5
| | | | llvm-svn: 249120
* Teach 'type lookup' to pull types from clang modules; also add a test caseEnrico Granata2015-10-023-0/+71
| | | | llvm-svn: 249117
* XFAIL 2 test in TestTargetCommands on android-aarch64Tamas Berghammer2015-09-301-0/+2
| | | | | | The 2 test just get enabled with the recemt test system refactor. llvm-svn: 248901
* Fix TestAttachDenied on linuxPavel Labath2015-09-302-4/+5
| | | | | | | | | | This test was timing out because the test inferior was forking a child, which was not terminated correctly. The test contained provisions to terminate this child, but these were no longer working. The idea was to wake up upon receiving SIGTERM and then kill the child. However, this was failing because the test first tried to use SIGHUP, which ended up killing the inferior. Fix: make sure we catch SIGHUP also. llvm-svn: 248889
* Merge dwarf and dsym testsTamas Berghammer2015-09-30159-2912/+833
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Skipping TestAttachDenied.py on Linux as it is hanging on a buildbot after ↵Todd Fiala2015-09-291-0/+1
| | | | | | | | r248834. I'll track down what is happening here. llvm-svn: 248846
* Enable test_create_after_attach_with_dwarf_and_popen on linuxPavel Labath2015-09-291-1/+0
| | | | | | The test still remains XTIMEOUTed. Will remove that as well if it turns out its passing. llvm-svn: 248790
* Revert "Fix race condition during process detach"Pavel Labath2015-09-281-0/+1
| | | | | | This fix is not correct on its own until D12968 is resolved. Will resumbit once that is done. llvm-svn: 248702
* Re-enable FreeBSD tests do not hang locallyEd Maste2015-09-252-2/+2
| | | | | | | | | These tests used to hang on the old FreeBSD buildbot, which has been retired. They do not hang when run locally, but do fail. llvm.org/pr24939 llvm-svn: 248577
* Re-enable some skipped tests on FreeBSDEd Maste2015-09-252-5/+0
| | | | | | | | | | | | | These tests were skipped because they hung the old FreeBSD buildbot. They pass (and do not hang) when run locally so enable them again. We will investigate further if they hang again once the new FreeBSD buildbot is installed. llvm.org/pr16684 llvm.org/pr18200 llvm.org/pr18230 llvm-svn: 248574
* Fix race condition during process detachPavel Labath2015-09-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following situation occured in TestAttachResume: The inferior was stoped at a breakpoint and we did a continue, immediately followed by a detach. Since there was a trap instruction under the IP, the continue did a step-over-breakpoint before resuming the inferior for real. In some cases, the detach command was executed between these two events (after the step-over stop, but before continue). Here, public state was running, but private state was stopped. This caused a problem because HaltForDestroyOrDetach was checking the public state to see whether it needs to stop the process (call Halt()), but Halt() was checking the private state and concluded that there is nothing for it to do. Solution: Instead of Halt() call SendAsyncInterrupt(), which will then cause Halt() to be executed in the context of the private state thread. I also rename HaltForDestroyOrDetach to reflect it does not call halt directly. Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13056 llvm-svn: 248371
* Update TestChangeProcessGroup to remove obsolete workaround.Chaoren Lin2015-09-221-3/+0
| | | | | | | | | | | | Expression evaluation in syscalls should work now. Reviewers: labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12976 llvm-svn: 248301
OpenPOWER on IntegriCloud