summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/load_unload
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2814-547/+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-2/+4
| | | | | | | | | | | | | 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-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Last set of XFAILs for Windows.Zachary Turner2015-09-161-0/+1
| | | | llvm-svn: 247825
* Fix a bunch of portability issues in test executables.Zachary Turner2015-08-251-1/+5
| | | | llvm-svn: 245983
* Xfail test_dyld_library_path for Android.Chaoren Lin2015-07-221-0/+1
| | | | | | | | Originally, the source for the hidden lib_d and the regular lib_d were the same file, so we always got the "correct" source for each. Splitting them up in D11367 exposed a bug of showing the incorrect source file for the hidden lib_d. llvm-svn: 242862
* Update TestLoadUnload to use base Makefile.Chaoren Lin2015-07-219-81/+89
| | | | | | | | | | | | | | | | Summary: The current Makefile scheme only allows one dylib to be specified in each make invocation, so TestLoadUnload had a custom Makefile that's unrelated to the base Makefile.rules. This change uses recursive make invocations to bypass the single dylib restriction. See D11202 for more context. Reviewers: clayborg Subscribers: chaoren, lldb-commits Differential Revision: http://reviews.llvm.org/D11367 llvm-svn: 242813
* Improve XFAIL for test_lldb_process_load_and_unload_commandsTamas Berghammer2015-07-161-1/+1
| | | | llvm-svn: 242392
* Remove shell-specific code from TestLoadUnload Makefile.Chaoren Lin2015-07-151-5/+7
| | | | | | | | | | Reviewers: clayborg, sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11202 llvm-svn: 242332
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-3/+3
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestLoadUnload] Build the main inferior exe with -pie.Siva Chandra2015-06-181-1/+1
| | | | | | | | | | | | Test Plan: dotest.py -p TestLoadUnload on Android API >= 21 Reviewers: tberghammer Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10545 llvm-svn: 240048
* [TestLoadUnload] Enable for Android while skipping it for other remotes.Siva Chandra2015-06-173-41/+90
| | | | | | | | | | | | | | | | | | Summary: This change adds all the necessary infrastructure required to selectively enable and make TestLoadUnload work for Android. One test, which tests the module search paths, is still kept disabled for remote as search paths (because of module caching) are local anyway. Reviewers: tberghammer Reviewed By: tberghammer Subscribers: emaste, lldb-commits, tberghammer Differential Revision: http://reviews.llvm.org/D10469 llvm-svn: 239965
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-3/+3
| | | | | | | | | | | | | | | | | | | | | Summary: Before: AssertionError: False is not True : Process is launched successfully After: AssertionError: False is not True : Command 'run a.out' failed. >>> error: invalid target, create a target using the 'target create' command >>> Process could not be launched successfully Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D9948 llvm-svn: 238363
* Fix a few more test suite errors where a cleanup lambda was calling ↵Greg Clayton2015-04-021-2/+2
| | | | | | self.runCmd() which requires the command returns successfully. Using self.dbg.HandleCommand() doesn't require success. llvm-svn: 233934
* Many many test failures after some recent changes. The problem is ↵Greg Clayton2015-04-021-5/+5
| | | | | | | | | | | | | | | | lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin". There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a: lldbtest.platformIsDarwin() which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function: lldbtest.getDarwinOSTriples() Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well. llvm-svn: 233933
* Update sys.platform switched behavior in tests to use self.getPlatform ↵Robert Flack2015-04-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | (remote target platform) Uses target platform when determining which platform specific behavior to use or expect in tests. TestHelp.py was unchanged because this is asserting behavior of the local lldb binary. Test Plan: Run tests on different remote os. Several previously failing tests now pass: TestArrayTypes.py TestInferiorChanged.py TestInferiorCrashing.py TestIvarProtocols.py TestProcessIO.py TestPublicAPIHeaders.py TestRecursiveInferior.py Differential Revision: http://reviews.llvm.org/D8747 llvm-svn: 233805
* Fix the remaining two test failures caused by re-ordering of teardown.Zachary Turner2015-03-261-4/+0
| | | | | | | | | Previously we were using teardown hooks in these two instances to shutdown processes. TestBase already deletes all targets in its own teardown, which will kill processes, so these steps weren't necessary. llvm-svn: 233308
* Remove shell-globbing from all test makefiles.Zachary Turner2014-07-311-1/+1
| | | | llvm-svn: 214441
* 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
* This test is failing because expressions involving dlopen() currently do not ↵Enrico Granata2013-10-311-0/+1
| | | | | | | | work Mark it as expected to fail pending a fix llvm-svn: 193828
* Rename shared libraries for TestLoadUnload.py due to potential shared ↵Matt Kopec2013-09-173-21/+23
| | | | | | library name clashes. llvm-svn: 190884
* Add test suite support for TestLoadUnload.py for Linux.Matt Kopec2013-09-163-36/+77
| | | | llvm-svn: 190815
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* tests: Mark expected FreeBSD failures due to pr14424Ed Maste2013-07-301-0/+5
| | | | | | | These tests fail on FreeBSD due to missing build support, the same reason they fail on Linux. llvm-svn: 187416
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-151-5/+5
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Replace all "-gdwarf-2" with "-g" to use the compiler defaults.Greg Clayton2013-02-281-1/+1
| | | | llvm-svn: 176283
* Mark a few more tests as "basic_process".Jim Ingham2013-02-261-0/+3
| | | | llvm-svn: 176132
* Fix for TestSharedLib.py (on Linux)Daniel Malea2012-11-261-6/+4
| | | | | | | - use lldb 'settings' command to help testcase find shared library - pull up dyldPath variable from TestLoadUnload.py to fixture base class (applicable in multiple cases) llvm-svn: 168612
* Update test status on LinuxDaniel Malea2012-11-231-1/+5
| | | | | | | | | - add decorators @expectedFailLinux and @skipOnLinux - skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426 Patch by Ashok Thirumurthi! llvm-svn: 168529
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-221-13/+6
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* Make git not delete some empty dirs. Otherwise a git checkout would be ↵Filipe Cabecinhas2012-07-251-0/+0
| | | | | | different from an svn checkout. llvm-svn: 160717
* Fix Makefile to pass the correct -arch flag to the toolchains.Johnny Chen2012-05-161-1/+4
| | | | llvm-svn: 156882
* Make the test case more robust in terms of remote testsuite execution.Johnny Chen2012-04-241-6/+4
| | | | | | rdar://problem/11312971 llvm-svn: 155505
* Make sure the "synchronous breakpoint callbacks" get called before the ↵Jim Ingham2012-04-201-0/+27
| | | | | | | | | | | thread plan logic gets invoked, and if they ask to continue that should short-circuit the thread plans for that thread. Also add a bit more explanation for how this machinery is supposed to work. Also pass eExecutionPolicyOnlyWhenNeeded, not eExecutionPolicyAlways when evaluating the expression for breakpoint conditions. llvm-svn: 155236
* Add expected failure decorators for test cases which are failing for i386 ↵Johnny Chen2012-04-191-2/+2
| | | | | | | | architecture. Plus fix some test cases to skip/succeed for i386. llvm-svn: 155087
* Modify a couple of Makefiles to use clang instead of gcc, since gcc is being ↵Johnny Chen2012-01-121-4/+1
| | | | | | deprecated. llvm-svn: 148071
* rdar://problem/10501020Johnny Chen2011-11-301-1/+1
| | | | | | | | | | | | | | | | | ClangASTSource::~ClangASTSource() was calling ClangASTContext *scratch_clang_ast_context = m_target->GetScratchClangASTContext(); which had the side effect of deleting this very ClangASTSource instance. Not good. Change it to // We are in the process of destruction, don't create clang ast context on demand // by passing false to Target::GetScratchClangASTContext(create_on_demand). ClangASTContext *scratch_clang_ast_context = m_target->GetScratchClangASTContext(false); The Target::GetScratchClangASTContext(bool create_on_demand=true) has a new signature. llvm-svn: 145537
* rdar://problem/9211445Johnny Chen2011-11-301-4/+24
| | | | | | | | | | | | | Fix wrong test logic in test_modules_search_paths(). Add additional exercising of 'target modules search-paths list/query". There is a reproducible crash if 'target modules search-paths clear' is exercised during test teardown. So we currently comment out the stmt as follows: # Add teardown hook to clear image-search-paths after the test. # rdar://problem/10501020 # Uncomment the following to reproduce 10501020. #self.addTearDownHook(lambda: self.runCmd("target modules search-paths clear")) llvm-svn: 145466
* Moved many of the "settings" that used to be in "target.process.*" to justGreg Clayton2011-11-081-3/+3
| | | | | | | | be in the target. All of the environment, args, stdin/out/err files, etc have all been moved. Also re-enabled the ability to launch a process in a separate terminal on MacOSX. llvm-svn: 144061
* Conditionize the 'print "Set environment ..."' stmt.Johnny Chen2011-08-031-1/+2
| | | | llvm-svn: 136806
* Add a directory to make the second copy of libd.dylib in, so we don't haveJim Ingham2011-08-032-47/+44
| | | | | | | | to make & delete directories in the test case. Make a real copy of libd.dylib in that directory so the two libraries are actually different. Use (and remove) the DYLD_LIBRARY_PATH to point to the new library. llvm-svn: 136801
* Unquote the env_cmd_string variable.Johnny Chen2011-08-031-3/+3
| | | | | | Skip the test case test_dyld_library_path(self) because it causes the debugserver to crash. llvm-svn: 136796
* Don't set DYLD_LIBRARY_PATH in the Python environment (which will get passed ↵Jim Ingham2011-08-031-2/+2
| | | | | | | | | down to debugserver) but set it in the debugger settings (which will just get passed down to the target). llvm-svn: 136793
* Move top level test dirs inlined_breakpoints, load_unload, and ↵Johnny Chen2011-06-278-0/+394
embedded_interpreter to reside under functionalities. llvm-svn: 133918
OpenPOWER on IntegriCloud