summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [TestBitfields] Correct the attribute name to "aligned" in the testcase.Siva Chandra2015-04-092-7/+2
| | | | | | | | | | | | | | | | | | Summary: This makes all parts of the test pass with Clang and GCC. They are enabled with this patch. Test Plan: dotest.py -C <clang|gcc> -p TestBitfields Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8874 llvm-svn: 234523
* Fix @skipUnlessPlatform and @skipIfPlatform decorators to work on classes.Robert Flack2015-04-092-36/+21
| | | | | | | | | | | | | | | | The decorators to skip if or unless certain platforms relied on calling skipTest, which only worked if they were decorating individual test cases. However for decorating entire classes it needs different behavior. This behavior is already encapsulated in unittest2.skipIf and unittest2.skipUnless so this modifies the platform decorators to use these unittest skip decorators. Test Plan: ./dotest.py -t -p TestObjCMethods2.py See skipped tests on linux, and see tests run on macosx. Differential Revision: http://reviews.llvm.org/D8903 llvm-svn: 234514
* Fix expectedFailureLLGS to expect failure when host platform is not linux.Robert Flack2015-04-091-2/+2
| | | | | | | | | | | | | | | expectedFailureLLGS has an early return false if the platform is not linux except it should be checking the target platform on which the server is running for remote tests. Test Plan: Verify expected failure when running from mac to remote linux llgs: TestBreakAfterJoin.py, TestCreateDuringStep.py, TestExitDuringBreak.py, TestProcessLaunch.py, TestThreadStates.py Differential Revision: http://reviews.llvm.org/D8869 llvm-svn: 234492
* Refactor ↵Ilia K2015-04-092-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMICmnLLDBDebuggerHandleEvents/CMICmnLLDBDebugSessionInfo/CMICmnLLDBDebugSessionInfoVarObj (MI) Summary: This patch includes the following changes: # Refactor GetVariableInfo/GetValueStringFormatted/GetValue to use the same code (MI) Also it expands the variable value format for strings (aka char*): was: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56",type="const char *",thread-id="1",has_more="0" ``` now: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56 \"ab\"",type="const char *",thread-id="1",has_more="0" ``` # Expand the variable value format for arrays (according to GDB) For example: was: ``` ^done,name="v3",numchild="2",value="{...}",type="char [2]",thread-id="1",has_more="0" ``` now: ``` ^done,name="v3",numchild="2",value="[2]",type="char [2]",thread-id="1",has_more="0" ``` # Rename MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry_default to test_lldbmi_gdb_show_process_stopatentry (MI) # Fix a comment in MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry (MI) # Refactor CMICmnLLDBUtilSBValue ## Add CMICmnLLDBUtilSBValue::IsPointerType/IsArrayType ## Refactor CMICmnLLDBUtilSBValue::GetValue ## Fix CMICmnLLDBUtilSBValue::IsChildCharType to ignore a number of childs ## Rename CMICmnLLDBUtilSBValue::IsChildCharType to IsFirstChildCharType ## Fix CMICmnLLDBUtilSBValue::GetValueCString to accept char[] # Minor changes in CMICmnLLDBUtilSBValue::GetValue # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo family functions (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo2 ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept args # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Add vArgInfo arg to CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo ## Move CMICmnLLDBDebugSessionInfo::GetFrameInfo/MIResponseFormFrameInfo to private namespace # Refactor CMICmnLLDBDebugSessionInfo::GetThreadFrames family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::GetThreadFrames2 ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept vnMaxDepth # Fix vnMaxDepth arg name in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Merge CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo functions into one # Don't modify fnName in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo3 ## Improve -CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept vnMaxDepth # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo2 ## Add CMICmnLLDBDebugSessionInfo::ThreadInfoFormat_e enum to specify thread format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept veThreadInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo (not needed because veThreadInfoFormat was added) # Move CMICmnLLDBDebugSessionInfo::GetThreadFrames to private namespace (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e enum to specify frame format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept veFrameInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (not needed because veFrameInfoFormat was added) # Remove duplicated level field in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBUtilSBValue::GetValue (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValue ## Use CMICmnLLDBUtilSBValue::GetSimpleValue in GetVlaue # Fix CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e::eFrameInfoFormat_AllArgumentsInSimpleForm which is used to get stack-args in simple form (i.e. show {...} for composite types). It can be done by calling MIResponseFormVariableInfo with vnMaxDepth=0. ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept veFrameInfoFormat ## Remove vnMaxDepth from CMICmnLLDBDebugSessionInfo::GetThreadFrames (we should use veFrameInfoFormat instead) # Refactor CMICmnLLDBUtilSBValue::GetValue to expand composite types (MI) ## Add CMICmnLLDBUtilSBValue::GetCompositeValue to expand composite types ## Add CMICmnLLDBUtilSBValue::m_pComposite to avoid multiple {...} in the code ## Improve CMICmnLLDBUtilSBValue::GetValue to accept vbExpandAggregates option (default=false) ## Clean up CMICmnLLDBDebugSessionInfo::GetVariableInfo to use CMICmnLLDBUtilSBValue::GetValue ## Remove the wrapping into {} in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo ## Fix MiStackTestCase.test_lldbmi_stack_list_locals test to expect result without superfluous space ' ' around the '{' or '}' brackets: was: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = { var_d = 30 }} ``` now: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = {var_d = 30}} ``` ## Fix vwrValue arg name in CMICmnLLDBUtilSBValue::GetSimpleValue (was vrValue) # Refactor CMICmnLLDBDebugSessionInfo::GetVariableInfo (MI) ## Remove vnMaxDepth/vbIsChildValue/vnDepth args in CMICmnLLDBDebugSessionInfo::GetVariableInfo ## Improve CMICmnLLDBDebugSessionInfo::GetVariableInfo to accept vwrStrValue ## Remove vwrMiValueList arg in CMICmnLLDBDebugSessionInfo::GetVariableInfo (we should use vwrStrValue instead) ## Fix CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo to Escape values was: ``` {name="p",value="0x0000000000000000 """} ``` now: ``` {name="p",value="0x0000000000000000 \"\""} ``` # Refactor CMICmnLLDBUtilSBValue ## Improve CMICmnLLDBUtilSBValue::GetValue to handle PrintExpandAggregates ## Improve CMICmnLLDBUtilSBValue::GetSimpleValue to handle vbHandleArrayType (use it to specify that array should be represented as simple type, i.e. value="[2]") # Add spacing between fields in CMICmnLLDBUtilSBValue::GetCompositeValue (MI) For example: was: ``` ^done,name="var3",numchild="3",value="{i = 3,inner = {l = 3},complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` now: ``` ^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` # Fix spacing in MiStackTestCase.test_lldbmi_stack_list_locals test (MI) Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8913 llvm-svn: 234476
* Fix resolution of certain recursive types.Stephane Sezer2015-04-084-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: If a struct type S has a member T that has a member that is a function that returns a typedef of S* the respective field would be duplicated, which caused an assert down the line in RecordLayoutBuilder. This patch adds a check that removes the possibility of trying to resolve the same type twice within the same callstack. This commit also adds unit tests for these failures. Fixes https://llvm.org/bugs/show_bug.cgi?id=20486. Patch by Cristian Hancila. Test Plan: Run unit tests. Reviewers: clayborg spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8561 llvm-svn: 234441
* Fix stepping a virtual thread when the python operating system was enabled.Greg Clayton2015-04-071-0/+69
| | | | | | | | | | | | The OperatingSystem plug-ins allow code to detect threads in memory and then say "memory thread 0x11111" is backed by the actual thread 1. You can then single step these virtual threads. A problem arose when thread specific breakpoints were used during thread plans where we would say "set a breakpoint on thread 0x11111" and we would hit the breakpoint on the real thread 1 and the thread IDs wouldn't match and we would get rid of the "stopped at breakpoint" stop info due to this mismatch. Code was added to ensure these events get forwarded and thus allow single stepping a memory thread to work correctly. Added a test case for this as well. <rdar://problem/19211770> llvm-svn: 234364
* Added a testcase that checks that struct argumentsSean Callanan2015-04-073-0/+113
| | | | | | are passed to Objective-C methods correctly. llvm-svn: 234351
* Made the struct types test case a little stricter,Sean Callanan2015-04-071-1/+17
| | | | | | | by verifying that we can pass a struct-typed variable to a function that takes structs. llvm-svn: 234348
* Fixed a problem where the second @import statementSean Callanan2015-04-071-1/+7
| | | | | | | | | | | | in a session would be silently ignored by the compiler because the compiler looked at its SourceLocation and decided it had already handled it. Also updated the relevant test case. <rdar://problem/20315447> llvm-svn: 234330
* implement gdb-set output-radixIlia K2015-04-072-1/+51
| | | | | | | | | | | | | | Summary: Patch from chuckr@microsoft.com Reviewers: abidh, ChuckR Reviewed By: abidh Subscribers: paulmaybee, ki.stfu, greggm, scarroll, lldb-commits Differential Revision: http://reviews.llvm.org/D8430 llvm-svn: 234305
* Enable a test in TestSTL for GCC.Siva Chandra2015-04-061-1/+1
| | | | | | | | | | | | | | | | Summary: Remove @skipIfGcc from a test in TestSTL as that test passes with GCC now. Also, mark one of the dsym tests with @skipUnlessDarwin in TestSTL. Test Plan: dotest.py -C gcc -p TestSTL Reviewers: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8793 llvm-svn: 234243
* Ignore IOError from missing child.log.Chaoren Lin2015-04-061-1/+4
| | | | | | | | | | | | | | | | | | | Summary: TestMiCliSupport (among other TestMi*) fails on Linux with ``` IOError: [Errno 2] No such file or directory: 'child.log' ``` Reviewers: clayborg, ki.stfu Reviewed By: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8843 llvm-svn: 234191
* test: Move amd64 -> x86_64 translation to getArchitecture()Ed Maste2015-04-062-2/+5
| | | | | | | Rather than sprinkling this knowledge throughout the test suite, just translate amd64 to x86_64 globally. llvm-svn: 234166
* test: Add amd64 architecture alias for x86_64Ed Maste2015-04-061-1/+1
| | | | | | 64-bit x86 is called amd64 on FreeBSD. llvm-svn: 234164
* Use insert instead of append when adding to sys.path.Chaoren Lin2015-04-041-7/+7
| | | | | | Similar problem as in the last part of r200486. llvm-svn: 234071
* [dotest.py] Present a better error when lldb module can't be found.Zachary Turner2015-04-031-34/+46
| | | | | | | | | | | | | We try to run lldb -P and jump through a bunch of other hoops to figure out where the Python module is so that we can add its location to sys.path. The error message printed when this doesn't work was left over from the time when Mac was the only platform, so it presented a Mac-specific diagnostic on all platforms related to the LLDB Framework. This patch prints a more useful diagnostic when not on Mac that gives a number of other diagnostic messages to check. llvm-svn: 234049
* Marked the modules tests as expected failures,Sean Callanan2015-04-033-0/+6
| | | | | | | | because the OS X builders aren't happy with them. <rdar://problem/20416388> llvm-svn: 234028
* Fix LLDB test tracing to include the output (stdout and stderr) of each ↵Adrian McCarthy2015-04-031-2/+2
| | | | | | shell command. llvm-svn: 234025
* A new testcase had a silly integer-value mismatch.Sean Callanan2015-04-031-1/+1
| | | | | | Fixed that. llvm-svn: 234023
* Added a testcase that covers loading a module andSean Callanan2015-04-036-0/+123
| | | | | | | | | | | verifying that the types from that module don't override types from DWARF. Also added a target setting to LLDB so we can tell Clang where to look for these local modules. <rdar://problem/18805055> llvm-svn: 234016
* TestRecursiveInferior fixed on LinuxVince Harron2015-04-032-4/+9
| | | | | | | | | | | | | | | | | Summary: Updated test to reflect that Linux and Darwin behave the same now. Removed @expectedFailureLinux for passing tests. Test Plan: run tests Reviewers: clayborg, sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8678 llvm-svn: 233989
* Added a C language test case that verifies thatSean Callanan2015-04-033-0/+106
| | | | | | | | | | DWARF types and types from modules can coexist even if they have the same name and refer to two different things. <rdar://problem/18805055> llvm-svn: 233988
* Add checks to the modules test case to ensureSean Callanan2015-04-021-0/+6
| | | | | | | that module types and runtime types play well together. llvm-svn: 233976
* 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-0215-26/+34
| | | | | | | | | | | | | | | | 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
* Use objcopy provided next to the compiler on androidTamas Berghammer2015-04-021-5/+15
| | | | | | Differential revision: http://reviews.llvm.org/D8765 llvm-svn: 233908
* Fix test expectation for aarch64 in several test caseTamas Berghammer2015-04-024-13/+19
| | | | | | | | | | | | These test cases check if they are able to read registers after the inferior is crashed. Previously they did it with reading the eax register what is only available on i386 and x86_64. Thic CL add code to do the check based on the target architecture (currently i386, x86_64 and aarch64 is supported) Differential revision: http://reviews.llvm.org/D8702 llvm-svn: 233907
* Update sys.platform switched behavior in tests to use self.getPlatform ↵Robert Flack2015-04-0115-26/+26
| | | | | | | | | | | | | | | | | | | | | | (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
* Make TestBreakpointConditions aarch64 compatibleTamas Berghammer2015-04-011-1/+4
| | | | llvm-svn: 233800
* Add missing makefile got test caseTamas Berghammer2015-04-011-0/+4
| | | | llvm-svn: 233797
* Make Test11588 compatible with non x86/x86_64 architectureTamas Berghammer2015-04-011-6/+5
| | | | llvm-svn: 233796
* TestPrintStackTraces - made XFAIL more preciseVince Harron2015-03-311-1/+7
| | | | | | | Works with x86_64 inferior, fails w/i386 inferior - updated test to reflect llvm-svn: 233717
* Enabled a bunch of tests on LinuxVince Harron2015-03-3113-19/+4
| | | | | | | | | Removed expectedFailureLinux from failures that I was unable to reproduce, updated and improved some other comments near XFAIL tests Differential Revision: http://reviews.llvm.org/D8676 llvm-svn: 233716
* Fix FreeBSD test runs after r233311Ed Maste2015-03-311-1/+4
| | | | | | | | On FreeBSD LLDB's triple ends up as e.g. "x86_64-unknown-freebsd10.1" but getPlatform() consumers expect just the name with no version number. llvm-svn: 233705
* Create new test for expression evaluation where char type mattersTamas Berghammer2015-03-313-0/+83
| | | | | | | | | | | char is a special type in C++ which can be signed/unsigned and have to be distinguished both from "signed char" and from "unsigned char". This test check for this behaviour during the expression evaluation with different compiler settings. Differential revision: http://reviews.llvm.org/D8657 llvm-svn: 233678
* Fix TestSendSignal.py for remote.Chaoren Lin2015-03-311-20/+28
| | | | | | | | | | | | | | Summary: There is an extra eStateConnected before eStateRunning with remote. Reviewers: clayborg, ovyalov Reviewed By: clayborg, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8714 llvm-svn: 233670
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-30259-545/+534
| | | | | | | | | | | | | | | | 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 check in TestNoreturnUnwindTamas Berghammer2015-03-301-1/+1
| | | | llvm-svn: 233546
* Fix TestGdbRemote* on remote linuxTamas Berghammer2015-03-302-22/+39
| | | | | | Differential revision: http://reviews.llvm.org/D8454 llvm-svn: 233531
* Added a testcase that verifies that LLDB can loadSean Callanan2015-03-273-0/+100
| | | | | | | | | Clang modules out of the Mac OS X SDK and use their types/functions. <rdar://problem/18802064> llvm-svn: 233421
* Fix lld command on Windows for many tests.Adrian McCarthy2015-03-276-3/+21
| | | | llvm-svn: 233416
* [TestMiExec] Fix the test for GCC after r233336.Siva Chandra2015-03-271-2/+2
| | | | | | | | | | | | Test Plan: dotest.py -C gcc p TestMiExec Reviewers: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8664 llvm-svn: 233382
* Allow ExpectedFailure* decorators to work with optional argumentsYing Chen2015-03-271-18/+19
| | | | | | -if the decorator functions called with optional arguments, return decorator to orignal method llvm-svn: 233338
* [DWARF] Generate qualified names of functions if linkage names are missing.Siva Chandra2015-03-272-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is similar to the change introduced for variable DIEs in r233098. If the linkage names of functions are missing in the DWARF, then their fully qualified names (similar to the name that would be got by demangling their linkage name) is generated using the decl context. This change fixes TestNamespace when the test case is compiled with GCC, hence it is enabled for GCC. The test and the test case are also enhanced to cover variadic functions. Test Plan: dotest.py -C <clang|gcc> -p TestNamespace Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8623 llvm-svn: 233336
* Change expectedFailureOS and skipIfPlatform checks to be based on target ↵Robert Flack2015-03-262-24/+31
| | | | | | | | | | | | | | | | | platform when running test suite remotely. Most expected OS failures or skipped tests are about the target platform on which the test binary is being run, not the host platform launching the tests. This changes expectedFailureOS and skipIfPlatform to check against the remote platform when running remote tests. Test Plan: Run ./do_sep.py test suite against a remote target on a different platform and verify that tests which should be excluded on the remote platform are excluded. Differential Revision: http://reviews.llvm.org/D8611 llvm-svn: 233311
* Fix the remaining two test failures caused by re-ordering of teardown.Zachary Turner2015-03-262-5/+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
* Fix test failures caused by order of initialization.Zachary Turner2015-03-261-2/+4
| | | | | | | | | tear down hooks run as part of Base.tearDown(). Some of these hooks rely on accessing the debugger instance. So although it looks awkward, we need to call "del self.dbg" after calling Base.tearDown(). llvm-svn: 233306
* Tear down tests in reverse order from setting them up.Zachary Turner2015-03-264-41/+43
| | | | | | | | | | | | | | | | | | | | Tests derive from TestBase, which derives from Base. In the test setUp() methods, we always call TestBase.setUp() first and then call implementation-specific setup. Tear down needs to do the reverse. This was causing over 20 failures on Windows, and was the culprit behind about 80% of the files not being cleaned up after test run. TestBase.tearDown() is responsible for deleting all targets created during the test run and without this step, on Windows files will be locked and cannot be deleted. But TestBase.tearDown() was calling Base.tearDown() before its own cleanup (i.e. deleting the targets) and in some cases one of the teardown hooks would be to call make clean. So make clean would be run before the targets had been deleted, and fail to remove the files, and subsequently result in a failed test as well. llvm-svn: 233284
* Fix RegisterCommandsTestCase and HelloWorldTestCase tests which hang on OS X ↵Ilia K2015-03-262-0/+10
| | | | | | after TestBase.tearDown() llvm-svn: 233279
* Destroy the attached process in tearDown() to fix ProcessAttachTestCase ↵Ilia K2015-03-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests on OS X This patch fixes the following: ``` 1: test_attach_to_process_by_id_with_dsym (TestProcessAttach.ProcessAttachTestCase) Test attach by process id ... ok 2: test_attach_to_process_by_id_with_dwarf (TestProcessAttach.ProcessAttachTestCase) Test attach by process id ... ok 3: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ... FAILURE 4: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ... FAILURE ====================================================================== FAIL: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 462, in wrapper return func(self, *args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 35, in test_attach_to_process_by_name_with_dsym self.process_attach_by_name() File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name self.runCmd("process attach -n s" + exe_name) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully Config=x86_64-clang ====================================================================== FAIL: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper return func(self, *args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 41, in test_attach_to_process_by_name_with_dwarf self.process_attach_by_name() File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name self.runCmd("process attach -n s" + exe_name) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully Config=x86_64-clang ---------------------------------------------------------------------- ``` Failure-x86_64-clang-TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_name_with_dsym.log: ``` [...] runCmd: process attach -n ProcessAttach runCmd failed! error: attach failed: more than one process named ProcessAttach: PID PARENT USER TRIPLE ARGUMENTS ====== ====== ========== ======================== ============================ 43752 43680 IliaK x86_64-apple-macosx /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach 43663 1 IliaK x86_64-apple-macosx /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach [...] ``` llvm-svn: 233272
OpenPOWER on IntegriCloud