summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/hello_world
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-283-184/+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-2/+0
| | | | | | | | | | | | | | | | | | | | | | | 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-271-1/+1
| | | | llvm-svn: 251444
* Port the python api decorator to use test categoriesPavel Labath2015-10-261-3/+3
| | | | | | | | | | | | | | | | | | 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-231-0/+2
| | | | | | | | | | | | | 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-221-7/+2
| | | | | | | | | | | | | | | | | | | | | 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
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-85/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* XFAIL TestHelloWorld on Windows.Zachary Turner2015-09-011-0/+2
| | | | | | https://llvm.org/pr24600 llvm-svn: 246569
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-3/+3
| | | | | | | | | | | | | | | | against remote platform. Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if / unless the target platform is in the provided platform list. Test Plan: ninja check-lldb shows no regressions. When running cross platform, tests which cannot run on the target platform are skipped. Differential Revision: http://reviews.llvm.org/D8665 llvm-svn: 233547
* Fix RegisterCommandsTestCase and HelloWorldTestCase tests which hang on OS X ↵Ilia K2015-03-261-0/+6
| | | | | | after TestBase.tearDown() llvm-svn: 233279
* Restore commented setTearDownCleanup in ↵Oleksiy Vyalov2015-03-101-1/+1
| | | | | | TestHelloWorld.test_with_dwarf_and_attach_to_process_with_id_api. llvm-svn: 231737
* Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer ↵Oleksiy Vyalov2015-03-101-3/+1
| | | | | | | | - in order to allow modules caching from remote targets. http://reviews.llvm.org/D8037 llvm-svn: 231734
* Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.Todd Fiala2014-10-261-0/+20
| | | | | | | | | | | | | | | | Similar to a recent test I fixed for gdb-remote attach scenarios, this fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and later, where ptrace starts requiring a ptracer to be an ancestor of the inferior to be ptraced. This change checks for Linux and the ptrace-related flags. If they're found, it tries to switch on the "allow any ptracer" mode for the inferior as the first statements in the program. It's a best-effort solution - if the prctl call fails, the failure is ignored, and probably will lead to the test failing. The ptrace security behavior can be modified system-wide, but is outside the scope of the test to address. Hence I went with this particular solution. llvm-svn: 220650
* Correctly set the working directory when launching processes for both local ↵Greg Clayton2013-12-131-1/+1
| | | | | | and remote targets. llvm-svn: 197266
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-101-1/+1
| | | | | | | | | | "mydir" inside each test case. This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated. Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. llvm-svn: 196985
* Mark 32/64-bit tests as expected fail after root causing and referencing ↵Matt Kopec2013-09-261-0/+2
| | | | | | | | bugzilla. Fix TestFrames.py error to check against a None pc value. llvm-svn: 191470
* Attach by name tests now pass on FreeBSDEd Maste2013-08-301-1/+0
| | | | | | | | | | A FreeBSD implementation of Host::FindProcesses was added in r189295. Contrary to my earlier report of failing tests it seems all attach by name tests now pass. http://www.llvm.org/pr16699 llvm-svn: 189680
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
* Assorted test suite fixes as a result of GCC 4.8 validation effortsDaniel Malea2013-07-301-0/+7
| | | | | | | | | | | | - disable some TestConcurrentEvents cases (which are affected by llvm.org/pr16714 -- watchpoints in multithreaded programs) - relax number-of-bp-locations check in TestUniqueTypes/TestUnsignedTypes - skip TestDataFormatterStdVector cases with GCC 4.8 (known failure due to llvm.org/pr15301) - workaround for race condition in TestHelloWorld.py - update TestSettings.py to work on distros (like Fedora) that have /bin/cat hardlinked to /usr/bin/cat After these changes, the test suite should run cleanly against GCC 4.8 (with DWARF v4)! llvm-svn: 187451
* tests: Mark expected FreeBSD failures due to pr16699Ed Maste2013-07-251-0/+1
| | | | | | | | FreeBSD's Host class doesn't yet return a list of running processes, so 'platform process list' fails and attach by process name does not work. llvm-svn: 187142
* Re-enable tests disabled due to llvm.org/pr14541Daniel Malea2013-05-151-1/+0
| | | | | | | - "platform process list" command works on Linux now - "process attach -n" (attach to process by name also works on Linux now) llvm-svn: 181905
* Avoid hang in attach-by-name test caseDaniel Malea2013-04-011-1/+1
| | | | | | | - Check that process attach succeeded before attempting to WaitForProcessToStop (observed to cause hangs on Linux) - Update comment in TestHelloWorld case -- attaching by name still broken llvm-svn: 178491
* Fix misuse of python subprocess module (caused "leaking" processes and ↵Daniel Malea2013-02-151-10/+6
| | | | | | | | | | | garbling the terminal) - fixed cleanup of Popen objects by pushing spawn logic into test Base and out of test cases - connect subprocess stdin to PIPE (rather than the parent's STDIN) to fix silent terminal issue Tested on Linux and Mac OS X llvm-svn: 175301
* Test suite cleanup for Linux: mark test cases expected to fail due to open ↵Daniel Malea2012-12-191-0/+1
| | | | | | | | bugzillas - bugzillas covered: 14323, 14600, 14541, 14437, 14540, 14541 llvm-svn: 170564
* Second batch of adding @dsym_test/@dwarf_test decorators to existing test cases.Johnny Chen2012-04-061-0/+6
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* Add comment regarding TestHelloWorld.py's use of a dictionary to ↵Johnny Chen2012-01-181-0/+1
| | | | | | specify/overwrite the EXE name. llvm-svn: 148418
* Modify the test cases so that each uses a unique executable name for the ↵Johnny Chen2012-01-181-8/+15
| | | | | | | | | debugger to attach/launch. I've see cases where there are lingering processes ("hello_world") staying around and the test_with_dsym_and_attach_to_process_with_name_api() test case just hangs. llvm-svn: 148417
* Work in progress for:Johnny Chen2011-12-201-0/+7
| | | | | | | | | rdar://problem/10577182 Audit lldb API impl for places where we need to perform a NULL check Add a NULL check for SBTarget.AttachToProcessWithName() so it will not hang. llvm-svn: 146948
* Move hello_world to now reside under python_api dir.Johnny Chen2011-06-263-0/+199
llvm-svn: 133890
OpenPOWER on IntegriCloud