summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-75/+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
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-271-1/+1
| | | | llvm-svn: 251444
* 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-8/+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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix up bad compiler spec on ConstVariableTestCase; fixup two more OS X ↵Todd Fiala2015-09-141-3/+10
| | | | | | unexpected successes. llvm-svn: 247591
* Enable TestFdLeak on linuxPavel Labath2015-09-031-1/+0
| | | | | | it has been consistently passing at least the last 100 builds on the bot. llvm-svn: 246761
* Correct failure decorator in test_fd_leak_multitargetEd Maste2015-06-291-1/+1
| | | | | | | | | | | | | | The random module in Python 2.7.8 and later leaks /dev/[u]random into children. The test is expected to fail, not be flakey. This will be fixed in Python 2.7.10 for some operating systems, but not all e.g. OS X 10.4. llvm.org/pr23983 bugs.freebsd.org/197376 bugs.python.org/issue23458 llvm-svn: 240958
* Added expectedFlakey test decoratorVince Harron2015-06-261-2/+2
| | | | | | | | | | | | | | | | | SUMMARY Flakey tests get two chances to pass Also, switched a bunch of tests to use new decorator. TEST PLAN Add one of these decorators to a test Edit a test to pass on the first invocation, confirm test appears as pass Edit a test to pass on the first invocation, pass on the second, confirm test appears as xfail Edit a test to fail on two consecutive runs, confirm test appears in results as fail/error Differential Revision: http://reviews.llvm.org/D10721 llvm-svn: 240789
* [TestGdbRemoteAbort] Skip on API 16 Android devicesSiva Chandra2015-06-051-3/+3
| | | | | | | | | | | | | | | | Summary: This change also adds the infrastructure required to specify the API levels for which tests should be skipped. Reviewers: chying, labath Reviewed By: labath Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10282 llvm-svn: 239183
* Mark the other test of TestFdLeak also as xfail to keep the bot green.Siva Chandra2015-05-021-0/+1
| | | | | | | | | | | | | | | | Summary: r235916 marked only one of the tests as xfail, but the other also has been failing intermitantly on the buildbot. Reviewers: chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9452 llvm-svn: 236366
* XFail flakey test.Chaoren Lin2015-04-271-0/+1
| | | | llvm-svn: 235916
* Skip fdleak tests on androidTamas Berghammer2015-03-131-2/+5
| | | | | | | | | Android have more file descriptor opened by the shell what are inherited to the process (different ones on device and on emulator). Differential revision: http://reviews.llvm.org/D8299 llvm-svn: 232150
* Disable file descriptor leak tests on python >=2.7.8Pavel Labath2015-02-231-3/+3
| | | | | | this version introduced an internal leak, which we cannot reasonably fix. llvm-svn: 230215
* Add decorator for fd leak test failing on FreeBSDEd Maste2015-02-181-0/+3
| | | | | | | | | An fd leak comes from Python on FreeBSD FreeBSD ports PR: https://bugs.freebsd.org/197376 Python issue: https://bugs.python.org/issue23458 llvm-svn: 229704
* Fix TestFdLeak.py on Mac.Pavel Labath2015-02-091-5/+3
| | | | | | bug introduced in D7466. For some reason target.Launch behaves differently on linux and mac. llvm-svn: 228582
* Fix descriptor leak in multi-target debuggingPavel Labath2015-02-091-0/+23
| | | | | | | | | | | | | | | Summary: When debugging two targets concurrently, the pseude terminal master fd from the first one would leak into the second. This fixes the problem by setting O_CLOEXEC on the master fd. Test included. Reviewers: clayborg, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7466 llvm-svn: 228570
* Avoid leaking log file descriptors into the inferior process.Pavel Labath2015-02-051-4/+16
| | | | | | | | | | | | | | Summary: This commit adds a new open flag File::eOpenOptionCloseOnExec (i.e., O_CLOEXEC), and adds it to the list of flags when opening log files (#ifndef windows). A regression test is included. Reviewers: vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7412 llvm-svn: 228310
* Avoid leakage of file descriptors in LLDB and LLGSPavel Labath2015-02-041-0/+32
Summary: Both LLDB and LLGS are leaking file descriptors into the debugged process. This plugs the leak by closing the unneeded descriptors. In one case I use O_CLOEXEC, which I hope is supported on relevant platforms. I also added a regression test and plugged a fd leak in dosep.py. Reviewers: vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7372 llvm-svn: 228130
OpenPOWER on IntegriCloud