summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python
Commit message (Collapse)AuthorAgeFilesLines
* Remove the -X option from dotest.pyZachary Turner2015-12-083-10/+3
| | | | | | | | This removes the option to exclude a single directory. This is part of an effort to remove unused options and cleanup the interface to the test suite. llvm-svn: 255048
* Remove the -g option from dotest.pyZachary Turner2015-12-083-11/+1
| | | | | | | | This removes the non-exclusive filterspec option as part of an effort to remove unused / deprecated command line options from dotest. llvm-svn: 255041
* Remove the -b option from dotest.pyZachary Turner2015-12-085-49/+0
| | | | | | | This removes the blacklist option as part of an effort to remove unused / unmaintained command line options from the test suite. llvm-svn: 255040
* Remove +b option from dotest.pyZachary Turner2015-12-084-22/+1
| | | | llvm-svn: 255037
* Remove the -D option from dotest.py.Zachary Turner2015-12-083-9/+0
| | | | | | | This removes the option to dump Python sys.path variable as part of an effort to remove unused options. llvm-svn: 255035
* flip on executable bit on test runner testsTodd Fiala2015-12-082-0/+0
| | | | llvm-svn: 255025
* Modify "platform connect" to connect to processes as wellTamas Berghammer2015-12-085-17/+87
| | | | | | | | | | | | | | | | | | | | | | | | The standard remote debugging workflow with gdb is to start the application on the remote host under gdbserver (e.g.: gdbserver :5039 a.out) and then connect to it with gdb. The same workflow is supported by debugserver/lldb-gdbserver with a very similar syntax but to access all features of lldb we need to be connected also to an lldb-platform instance running on the target. Before this change this had to be done manually with starting a separate lldb-platform on the target machine and then connecting to it with lldb before connecting to the process. This change modifies the behavior of "platform connect" with automatically connecting to the process instance if it was started by the remote platform. With this command replacing gdbserver in a gdb based worflow is usually as simple as replacing the command to execute gdbserver with executing lldb-platform. Differential revision: http://reviews.llvm.org/D14952 llvm-svn: 255016
* Add a new option to Platform::LoadImage to install the imageTamas Berghammer2015-12-081-8/+2
| | | | | | | | | | | | | | | | | | | | | This change introduce 3 different working mode for Platform::LoadImage depending on the file specs specified. * If only a remote file is specified then the remote file is loaded on the target (same behavior as before) * If only a local file is specified then the local file is installed to the current working directory and then loaded from there. * If both local and remote file is specified then the local file is installed to the specified location and then loaded from there. The same options are exposed on the SB API with a new method LoadImage method while the old signature presers its meaning. On the command line the installation of the shared library can be specified with the "--install" option of "process load". Differential revision: http://reviews.llvm.org/D15152 llvm-svn: 255014
* Fixup dotest.py on mac for the configuration packagePavel Labath2015-12-082-3/+3
| | | | llvm-svn: 255013
* Fixup dotest.py after the configuration package introductionPavel Labath2015-12-081-1/+1
| | | | llvm-svn: 255009
* Move LLDBTestResult class to its own module.Zachary Turner2015-12-083-231/+259
| | | | llvm-svn: 254983
* Get rid of global variables in dotest.pyZachary Turner2015-12-0821-721/+560
| | | | | | | | | | | | | | | | | | | | | | | | | | This moves all the global variables into a separate module called `configuration`. This has a number of advantages: 1. Configuration data is centrally maintained so it's easy to get a high level overview of what configuration data the test suite makes use of. 2. The method of sharing configuration data among different parts of the test suite becomes standardized. Previously we would put some things into the `lldb` module, some things into the `lldbtest_config` module, and some things would not get shared. Now everything is shared through one module and is available to the entire test suite. 3. It opens the door to moving some of the initialization code into the `configuration` module, simplifying the implementation of `dotest.py`. There are a few stragglers that didn't get converted over to using the `configuration` module in this patch, because it would have grown the size of the patch unnecessarily. This includes everything currently in the `lldbtest_config` module, as well as the `lldb.remote_platform` variable. We can address these in the future. llvm-svn: 254982
* Trying to submit 254476 one more time. This implement -gmodule debugging ↵Greg Clayton2015-12-081-2/+2
| | | | | | | | | | | | | | support. It was previously reverted due to issues that showed up only on linux. I was able to reproduce these issues and fix the underlying cause. So this is the same patch as 254476 with the following two fixes: - Fix not trying to complete classes that don't have external sources - Fix ClangASTSource::CompleteType() to check the decl context of types that it finds by basename to ensure we don't complete a type "S" with a type like "std::S". Before this fix ClangASTSource::CompleteType() would accept _any_ type that had a matching basename and copy it into the other type. <rdar://problem/22992457> llvm-svn: 254980
* Refactor ResultsFormatter creation into result_formatter.Todd Fiala2015-12-082-73/+133
| | | | | | | | | This cleans up dotest.py and is a pre-step for getting the test inferior runner to send post-inferior run events to the events collector, as this code needs to be accessed from within dosep.py. llvm-svn: 254979
* Add NetBSD in platform specific logging of the specified category in ↵Kamil Rytarowski2015-12-071-0/+3
| | | | | | | | | | | | | | RegisterCommandsTestCase() Summary: NetBSD soon will reuse this feature while running tests. Reviewers: emaste, tfiala, clayborg Subscribers: lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D15263 llvm-svn: 254949
* Add initial NetBSD support in lldbsuite/test/lldbtest.pyKamil Rytarowski2015-12-071-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Add new functions: - expectedFailureNetBSD() - expectedFlakeyNetBSD() - skipIfNetBSD() Add new NetBSD entry in: - getPlatform() - getHostPlatform() Assume that libc++ is installed and use the GNU toolchain Reviewers: joerg, emaste, tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15262 llvm-svn: 254948
* Return gmake as the default name for GNU make on NetBSDKamil Rytarowski2015-12-071-1/+1
| | | | | | | | | | | | | | | Summary: The base make(1) on NetBSD is BSD make. In the default installation of NetBSD GNU make comes via pkgsrc under the gmake name. Reviewers: emaste, tfiala, clayborg Subscribers: joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D15261 llvm-svn: 254947
* Rename test_results.py to result_formatter.py.Zachary Turner2015-12-075-19/+20
| | | | | | | | There is already a class called LLDBTestResults which I would like to move into a separate file, but the most appropriate filename was taken. llvm-svn: 254946
* getwd(3) with NULL pointer extension is supported on NetBSDKamil Rytarowski2015-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: The getwd() and getcwd() functions conform to IEEE Std 1003.1-1990 (POSIX.1). The IEEE Std 1003.1-2004 (POSIX.1) revision marked getwd() as legacy and recommended the use of getcwd() instead. The IEEE Std 1003.1-2008 (``POSIX.1'') revision removed getwd() from the specification. The ability to specify a NULL pointer and have getcwd() allocate memory as necessary is an extension. The getwd() function appeared in 4.0BSD. Reviewers: emaste, tfiala, clayborg Subscribers: lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D15260 llvm-svn: 254944
* Allow variable names to be quoted with -var-list-childrenChuck Ries2015-12-071-0/+3
| | | | | | | | Allow both '-var-list-children var0' and '-var-list-children "var0"' to be used with the -var-list-children command. GDB MI allows for this and it is necessary if the variable name contains spaces, such as var5.std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<cahr> > > >. Differential Revision: http://reviews.llvm.org/D15168 llvm-svn: 254941
* Recommit "Fix race during process interruption"Pavel Labath2015-12-072-3/+5
| | | | | | | | This is a resubmit of r254403, see that commit's message for context. This fixes an issue in the original commit, where we would incorrectly interrupt the process if the interrupt request came just as we were about to send the stopped event to the public. llvm-svn: 254902
* Make TestThreadStates more stablePavel Labath2015-12-071-25/+11
| | | | | | | | | | | | | | | | | | | | | Summary: Because of the large number of XFAILs TestThreadStates has decayed quite a bit. This commit does the following: - removes the "breakpoint list" expectations. Most tests have been failing on this, because the command output changed quite a while back. I remove it, because run_break_set_by_file_and_line already does a decent amount of checking - fixup test_state_after_expression: this was calling the wrong function by mistake. As now the function actually tests something (which we know is broken), I needed to XFAIL it as well. - replaces the sleep() with a proper wait-for-event functionality in parts which use async mode, to stabilize the one function that actually tests something. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15233 llvm-svn: 254901
* Added lldbsuite.lldb_test_root, switched formatter to use it.Todd Fiala2015-12-072-5/+10
| | | | llvm-svn: 254894
* [LLDB][MIPS] Marking some expected failuresMohit K. Bhakkad2015-12-072-11/+17
| | | | | | | | Reviewers: clayborg, zturner. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, tberghammer,lldb-commits. Differential Revision: http://reviews.llvm.org/D14944 llvm-svn: 254892
* Moved total test count and rerun count into summary counts.Todd Fiala2015-12-071-8/+22
| | | | llvm-svn: 254891
* Move test summary counts to end; simplify issue detail lineTodd Fiala2015-12-071-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test summary counts now show at the end, with issue details above. Issue details now print "ISSUE_TYPE: test method (relative path)". Relative paths are relative to the packages/Python/lldbsuite/test directory. Sample output: test/dotest.py --executable `pwd`/build/Debug/lldb --results-formatter lldbsuite.test.basic_results_formatter.BasicResultsFormatter --threads 12 Testing: 415 test suites, 12 threads 415 out of 415 test suites processed - TestLldbGdbServer.py Test Results Total Test Methods Run (excluding reruns): 2470 Test Method rerun count: 0 Details: UNEXPECTED SUCCESS: test_symbol_name_dsym (functionalities/completion/TestCompletion.py) UNEXPECTED SUCCESS: test_symbol_name_dwarf (functionalities/completion/TestCompletion.py) =================== Test Result Summary =================== Success: 1329 Expected Failure: 79 Failure: 0 Error: 0 Unexpected Success: 2 Skip: 1060 llvm-svn: 254890
* Define new builder_netbsdKamil Rytarowski2015-12-052-0/+6
| | | | | | | | | | | | Summary: This is used in tests. Reviewers: emaste, tfiala, clayborg Subscribers: zturner, lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D15065 llvm-svn: 254853
* [LLDB][MIPS] Fix TestConstVariables.pySagar Thakur2015-12-051-0/+1
| | | | | | | | | | | Patch by Nitesh Jain. Summary: There is no debug information generated for variable index with –O3 optimization flag. The DW_AT_location tag in DWARF debug_info section is empty. Reviewers: ovyalov, clayborg Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep Differential: http://reviews.llvm.org/D15224 llvm-svn: 254850
* Make TestThreadSpecificBreakpoint.py more focused.Zachary Turner2015-12-045-53/+143
| | | | | | | | | | | | | | | | This test would fail before if conditional breakpoints weren't working correctly, and the nature of the test (spinning up 10 threads, etc) opens the door to raciness. This patch vastly simplifies the test, removes the need for relying on conditional expression evaluation, and as a result makes the correctness of the test vastly easier to reason about and reduces flakiness. Differential Revision: http://reviews.llvm.org/D15241 Reviewed By: Jim Ingham llvm-svn: 254792
* Add a similar benchmark for our std::map performanceEnrico Granata2015-12-043-0/+75
| | | | llvm-svn: 254779
* Fix an issue where all tests marked with skip_if_callable would be skipped ↵Enrico Granata2015-12-041-4/+5
| | | | | | regardless of the actual callable llvm-svn: 254758
* Add a benchmark that validates how much time LLDB spends trying to fully ↵Enrico Granata2015-12-043-0/+75
| | | | | | | | print a fairly large std::list<T> This is meant to help me track optimizations to the libc++ std::list data formatter llvm-svn: 254755
* Marked TestModulesInlineFunctions.py XFAILTodd Fiala2015-12-041-0/+1
| | | | | | | Tracked here: https://llvm.org/bugs/show_bug.cgi?id=25743 llvm-svn: 254746
* Fix test error in TestObjCCheckers.pyTodd Fiala2015-12-041-1/+1
| | | | llvm-svn: 254744
* [LLDB][MIPS] Fix gdbremote_testcase.pyMohit K. Bhakkad2015-12-041-3/+9
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar. Differential Revision: http://reviews.llvm.org/D15103 llvm-svn: 254711
* [LLDB][MIPS] XFAIL TestCrashDuringStep.py for MIPSJaydeep Patil2015-12-041-0/+1
| | | | | | | | | | | SUMMARY: Marked TestCrashDuringStep.py as XFAIL for MIPS. The test generates IO error due to breakpoint at invalid address. Reviewers: clayborg, labath Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D15182 llvm-svn: 254710
* Un XFAIL some tests that are now passing on Windows.Zachary Turner2015-12-032-2/+0
| | | | llvm-svn: 254633
* Fix TestLoadUnload for Windows -> POSIX remote debuggingTamas Berghammer2015-12-031-1/+2
| | | | | | | | | | Previously we used sys.os.path for appending target pathes what failed when cased dlopen to fail on the target because of the '\'. The fix won't work for local Windows tests but dlopen don't available on Windows anyway so the test don't make sense in that context. llvm-svn: 254602
* Fix test result serialization to use bytes.Zachary Turner2015-12-022-16/+21
| | | | llvm-svn: 254563
* Candidate fixes for python2/3 compatible string handling in pickling support.Todd Fiala2015-12-022-4/+4
| | | | llvm-svn: 254550
* Make --results-file stdout implied if unspecified when using a results ↵Todd Fiala2015-12-021-3/+13
| | | | | | | | formatter. Also cleans up pylint warnings (stock settings) in the modified function. llvm-svn: 254546
* Adds candidate formatter for replacing legacy summary results.Todd Fiala2015-12-024-88/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also cleans up some usages of strings where symbolic names were safer and made more sense. Try a test run with something like this to check out the new basic results formatter (not used by default): time test/dotest.py --executable `pwd`/build/Debug/lldb --results-formatter lldbsuite.test.basic_results_formatter.BasicResultsFormatter --results-file stdout This will yield something like: Testing: 1 test suites, 8 threads 1 out of 1 test suites processed - TestHelp.py Test Results Total Test Methods Run (excluding reruns): 13 Test Method rerun count: 0 =================== Test Result Summary =================== Success: 13 Expected Failure: 0 Failure: 0 Error: 0 Unexpected Success: 0 Skip: 0 Whereas something with a bit of error will look more like this: 42 out of 42 test suites processed - TestSymbolTable.py Test Results Total Test Methods Run (excluding reruns): 166 Test Method rerun count: 0 =================== Test Result Summary =================== Success: 93 Expected Failure: 10 Failure: 2 Error: 2 Unexpected Success: 0 Skip: 59 Details: FAIL: TestModulesInlineFunctions.ModulesInlineFunctionsTestCase.test_expr_dsym (/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py) FAIL: TestModulesInlineFunctions.ModulesInlineFunctionsTestCase.test_expr_dwarf (/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py) ERROR: TestObjCCheckers.ObjCCheckerTestCase.test_objc_checker_dsym (/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py) ERROR: TestObjCCheckers.ObjCCheckerTestCase.test_objc_checker_dwarf (/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py) The Details header only prints if there are any issues to report. The Details section has tags that should get picked up using the normal issue text scrapers (e.g. buildbot). Test numbers reported are strictly test method runs. The rerun bit at the top is in support of the multi-pass test runner code (to run the low-load, single worker test pass for tests that failed the first run), which I'll be able to put up for review after this. ResultsFormatters now have the ability to indicate they replace the legacy summary, as this one does. Once we come to agreement on the exact format, I will switch us over to using this by default. llvm-svn: 254530
* XFAIL TestReturnValue for linux i386 clang 3.5-3.6Tamas Berghammer2015-12-021-0/+1
| | | | | | | The test failing most likely because clang 3.5 and 3.6 uses an incorrect ABI for returning small structs from a function. llvm-svn: 254507
* Fix "process load/unload" on androidTamas Berghammer2015-12-021-11/+13
| | | | | | | | | | | On android the symbols exposed by libdl (dlopen, dlclose, dlerror) prefixed by "__dl_". This change moves the handling of process load/unload to the platform object and override it for android to handle the special prefix. Differential revision: http://reviews.llvm.org/D11465 llvm-svn: 254504
* Revert "Added support for -gmodule debugging when debug info is left in the ↵Tamas Berghammer2015-12-021-2/+2
| | | | | | | | | .o files on Darwin." The commit caused a test failure on the linux buildbot in TestDataFormatterSynthVal. llvm-svn: 254502
* PTRACE ABI to read FXSAVE area for 32-bit inferiorAbhishek Aggarwal2015-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Problem occurs when: -- 32-bit inferiors run on x86_32 machine and the architecture doesn't have AVX feature -- This causes FPRType to be set to eFPRTypeFXSAVE -- PTRACE_GETFPREGS was being used to read FXSAVE area -- For 32-bit inferiors running on x86_32 machine, PTRACE_GETFPREGS reads FSAVE area and not FXSAVE area - Changed ptrace API to PTRACE_GETREGSET for 32-bit inferiors -- This reads FPR data in FXSAVE format. -- For 64-bit inferiors, no change has been made. - Modified XFAIL for TestReturnValue.py -- Earlier, this test was passing for Linux OS -- Now, it passes for Android OS as well Change-Id: Ieed72bc969b79516fc7b263b32493aa1e7a1a2ac Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ovyalov, jingham, lldb-commits, tberghammer, labath Subscribers: jevinskie, labath, tberghammer, danalbert Differential Revision: http://reviews.llvm.org/D15042 llvm-svn: 254499
* Added support for -gmodule debugging when debug info is left in the .o files ↵Greg Clayton2015-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | on Darwin. This is done by finding the types that are forward declarations that come from a module, and loading that module's debug info in a separate lldb_private::Module, and copying the type over into the current module using a ClangASTImporter object. ClangASTImporter objects are already used to copy types from on clang::ASTContext to another for expressions so the type copying code has been around for a while. A new FindTypes variant was added to SymbolVendor and SymbolFile: size_t SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types); size_t SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types); The CompilerContext is a way to represent the exact context of a type and pass it through an agnostic API boundary so that we can find that exact context elsewhere in another file. This was required here because we can have a module that has submodules, both of which have a "foo" type. I am not able to add tests for this yet as we currently don't build our C/C++/ObjC binaries with the clang binary that we build. There are some driver issues where it can't find the header files for the C and C++ standard library which makes compiling these tests hard. We can't also guarantee that if we are building with clang that it supporst the exact format of -gmodule debugging that we are trying to test. We have had other versions of clang that had a different implementation of -gmodule debugging that we are no longer supporting, so we can't enable tests if we are building with clang without compiling something and looking at the structure of the DWARF that was generated to ensure that it is the format we can actually use. llvm-svn: 254476
* Revert "Fix race during process interruption"Pavel Labath2015-12-012-5/+3
| | | | | | The android buildbot gets quite flaky after this change. I'm reverting it while I investigate. llvm-svn: 254430
* Fix race during process interruptionPavel Labath2015-12-012-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following situation was occuring in TestAttachResume: - we did a "continue" from a breakpoint (which involves a private start-stop to step over the breakpoint) - after receiving the stop-reply from the step-over, we issue a "detach" (which requires a process interrupt) - at this moment, the public state is "running", private state is "about-to-be-stopped" (the stopped event was broadcast, but it was not received yet) - StopForDestroyOrDetach (public thread) notes the public state is running, sends an interrupt request to the private thread - private thread gets the eBroadcastBitInterrupt (before the eStateStopped message), and asks the process plugin to stop (via Halt()) - process plugin says it has nothing to do as the process is already stopped - private thread shrugs and carries on. receives the stop event, restores the breakpoint and resumes the process. - after a while, the public thread times out and says it failed to stop the process This patch does the following: - splits Halt() into two functions, private and public, their usage depends on the context - public Halt(): sends eBroadcastBitInterrupt to the private thread and waits for the Stop event - HaltPrivate(): asks the plugin to stop and makes a note that the halt was requested. When the next stop event comes it sets the interrupt flag on it. - removes HijackPrivateProcessEvents(), as the only user (old Halt()) has gone away - removes the m_currently_handling_event hack, as the new Halt() does not need it - adds a use_run_lock parameter to public Halt() and WaitForProcessToStop(). This was needed because RunThreadPlan uses Halt() while holding the run lock and we don't want Halt() to take it away from him. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14989 llvm-svn: 254403
* [LLDB][MIPS] Change ARCHFLAG for MIPSJaydeep Patil2015-12-011-0/+3
| | | | | | | | | | | SUMMARY: For MIPS, ARCH is specified without m. Reviewers: clayborg Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D14978 llvm-svn: 254376
OpenPOWER on IntegriCloud