summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix test cases for big-endian systemsUlrich Weigand2016-04-1410-75/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of test cases were failing on big-endian systems simply due to byte order assumptions in the tests themselves, and no underlying bug in LLDB. These two test cases: tools/lldb-server/lldbgdbserverutils.py python_api/process/TestProcessAPI.py actually check for big-endian target byte order, but contain Python errors in the corresponding code paths. These test cases: functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py functionalities/data-formatter/synthcapping/TestSyntheticCapping.py lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py python_api/sbdata/TestSBData.py (first change) could be fixed to check for big-endian target byte order and update the expected result strings accordingly. For the two synthetic tests, I've also updated the source to make sure the fake_a value is always nonzero on both big- and little-endian platforms. These test case: python_api/sbdata/TestSBData.py (second change) functionalities/memory/cache/TestMemoryCache.py simply accessed memory with the wrong size, which wasn't noticed on LE but fails on BE. Differential Revision: http://reviews.llvm.org/D18985 llvm-svn: 266315
* Fixes for platforms that default to unsigned charUlrich Weigand2016-04-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes several test case failure on s390x caused by the fact that on this platform, the default "char" type is unsigned. - In ClangASTContext::GetBuiltinTypeForEncodingAndBitSize we should return an explicit *signed* char type for encoding eEncodingSint and bit size 8, instead of the default platform char type (which may be unsigned). This fix matches existing code in ClangASTContext::GetIntTypeFromBitSize, and fixes the TestClangASTContext.TestBuiltinTypeForEncodingAndBitSize unit test case. - The test/expression_command/char/TestExprsChar.py test case is known to fail on platforms defaulting to unsigned char (pr23069), and just needs to be xfailed on s390x like on arm. - The test/functionalities/watchpoint/watchpoint_on_vectors/main.c test case defines a vector of "char" and implicitly assumes to be signed. Use an explicit "signed char" instead. Differential Revision: http://reviews.llvm.org/D18979 llvm-svn: 266309
* Support Linux on SystemZ as platformUlrich Weigand2016-04-1417-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Linux on SystemZ: - A new ArchSpec value of eCore_s390x_generic - A new directory Plugins/ABI/SysV-s390x providing an ABI implementation - Register context support - Native Linux support including watchpoint support - ELF core file support - Misc. support throughout the code base (e.g. breakpoint opcodes) - Test case updates to support the platform This should provide complete support for debugging the SystemZ platform. Not yet supported are optional features like transaction support (zEC12) or SIMD vector support (z13). There is no instruction emulation, since our ABI requires that all code provide correct DWARF CFI at all PC locations in .eh_frame to support unwinding (i.e. -fasynchronous-unwind-tables is on by default). The implementation follows existing platforms in a mostly straightforward manner. A couple of things that are different: - We do not use PTRACE_PEEKUSER / PTRACE_POKEUSER to access single registers, since some registers (access register) reside at offsets in the user area that are multiples of 4, but the PTRACE_PEEKUSER interface only allows accessing aligned 8-byte blocks in the user area. Instead, we use a s390 specific ptrace interface PTRACE_PEEKUSR_AREA / PTRACE_POKEUSR_AREA that allows accessing a whole block of the user area in one go, so in effect allowing to treat parts of the user area as register sets. - SystemZ hardware does not provide any means to implement read watchpoints, only write watchpoints. In fact, we can only support a *single* write watchpoint (but this can span a range of arbitrary size). In LLDB this means we support only a single watchpoint. I've set all test cases that require read watchpoints (or multiple watchpoints) to expected failure on the platform. [ Note that there were two test cases that install a read/write watchpoint even though they nowhere rely on the "read" property. I've changed those to simply use plain write watchpoints. ] Differential Revision: http://reviews.llvm.org/D18978 llvm-svn: 266308
* Fix test rerun logicPavel Labath2016-04-131-1/+1
| | | | | | | | | | | | | | result_formatter used inspect.getfile() to get the python file name, which returned "*.pyc" if the bytecode file was present. This resulted in files being displayed with the wrong extension, and more critically, would confuse the rerun logic because it would try to rerun the pyc file (which resulted in an empty rerun list as unittest refused to run those). Fix: use inspect.getsourcefile() instead. I am not sure why does was not an issue before. I can only assume that some system update tricked python into producing bytecode files more aggressively. llvm-svn: 266192
* Attempt to fix TestCPPBreakpointLocations on Linux/Android.Oleksiy Vyalov2016-04-131-1/+1
| | | | llvm-svn: 266164
* Fix breakpoint_set_restart test for WindowsAdrian McCarthy2016-04-121-2/+8
| | | | | | | | When run with the multiprocess test runner, the getchar() trick doesn't work, so ninja check-lldb would fail on this test, but running the test directly worked fine. Differential Revision: http://reviews.llvm.org/D19035 llvm-svn: 266145
* Fixed being able to set breakpoints on destructors when we don't fully ↵Greg Clayton2016-04-121-0/+3
| | | | | | | | | | | | | | specify the demangled name. So all of the following now work: (lldb) b ~Foo (lldb) b Foo::~Foo (lldb) b Bar::Foo::~Foo Improved out C++ breakpoint locations tests as well to cover this issue. <rdar://problem/25577252> llvm-svn: 266139
* Breakpoint conditions were making result variables, which they should not do. Jim Ingham2016-04-121-0/+4
| | | | | | | | | | | | | | The result variables aren't useful, and if you have a breakpoint on a common function you can generate a lot of these. So I changed the code that checks the condition to set ResultVariableIsInternal in the EvaluateExpressionOptions that we pass to the execution. Unfortunately, the check for this variable was done in the wrong place (the static UserExpression::Evaluate) which is not how breakpoint conditions execute expressions (UserExpression::Execute). So I moved the check to UserExpression::Execute (which Evaluate also calls) and made the overridden method DoExecute. llvm-svn: 266093
* 'int' is reported as an exception on OS X not as a signal. I don't thinkJim Ingham2016-04-121-1/+1
| | | | | | this test ever succeeded on OS X. llvm-svn: 266092
* Fixup TestFdLeakPavel Labath2016-04-121-3/+5
| | | | | | | this test was unintentionally XFAILed due to a change in the behavior of the expectedFailure decorator. Fix that. Also, mark the test as debug-info independent while I'm in there. llvm-svn: 266072
* Bump up timeout in TestGdbRemoteProcessInfoPavel Labath2016-04-121-1/+1
| | | | | | | the process info packet is slow, and sometimes it does not arrive on time when run on the android emulator. llvm-svn: 266058
* Skip a test in TestNamespaceLookup on linux to avoid a crashPavel Labath2016-04-121-0/+1
| | | | llvm-svn: 266054
* Mark TestPrintStackTraces as flaky on android armPavel Labath2016-04-111-0/+1
| | | | llvm-svn: 265959
* Retry deletion of temporary files to avoid race conditions on Windows.Adrian McCarthy2016-04-111-12/+15
| | | | | | Differential Revision: http://reviews.llvm.org/D18912 llvm-svn: 265948
* Fix makefile for TestMiThreadInfo after rL265858 (2nd try)Tamas Berghammer2016-04-111-0/+2
| | | | llvm-svn: 265921
* Fix makefile for TestMiThreadInfo after rL265858Tamas Berghammer2016-04-111-2/+0
| | | | | | | The makefile was explicitly setting LDFLAGS what is breaking some rules in the global makefile. llvm-svn: 265920
* Add a ThreadSanitizer testcase that tests multiple reported issues.Kuba Brecka2016-04-103-0/+212
| | | | llvm-svn: 265906
* Provide more information in ThreadSanitizer's JSON data. Move remaining ↵Kuba Brecka2016-04-101-2/+2
| | | | | | TSan logic from SBThread to InstrumentationRuntime plugin. llvm-svn: 265905
* Fix TestBreakpointSetRestart failure on Android.Oleksiy Vyalov2016-04-091-6/+12
| | | | llvm-svn: 265869
* Remove what I believe are the last known instances of formatters that run codeEnrico Granata2016-04-084-48/+11
| | | | llvm-svn: 265865
* -thread-info in lldbmi does not conform to protocol. Should end with current ↵Chuck Ries2016-04-083-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread id -thread-info in lldbmi does not conform to protocol. Should end with current thread id as described here: https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Thread-Commands.html#GDB_002fMI-Thread-Commands When printing all threads, the current thread id should be printed afterwards. Example: -thread-info ^done,threads=[ {id="2",target-id="Thread 0xb7e14b90 (LWP 21257)", frame={level="0",addr="0xffffe410",func="__kernel_vsyscall", args=[]},state="running"}, {id="1",target-id="Thread 0xb7e156b0 (LWP 21254)", frame={level="0",addr="0x0804891f",func="foo", args=[{name="i",value="10"}], file="/tmp/a.c",fullname="/tmp/a.c",line="158"}, state="running"}], current-thread-id="1" (gdb) Patch from jacdavis@microsoft.com Reviewers: zturner, chuckr Differential Revision: http://reviews.llvm.org/differential/revision/edit/18880/ llvm-svn: 265858
* Remove even more of the data formatters that silently run codeEnrico Granata2016-04-082-31/+1
| | | | | | Fixes <rdar://problem/25629755> llvm-svn: 265849
* Reset continue_after_async only if neither SIGINIT nor SIGSTOP received.Oleksiy Vyalov2016-04-083-0/+61
| | | | | | http://reviews.llvm.org/D18886 llvm-svn: 265843
* fix missing import of 'time' in lldbutil.wait_for_file_on_targetTodd Fiala2016-04-081-0/+1
| | | | | | | | | This triggers in some timeout scenarios in the LLDB test suite. Fixes: https://bugs.swift.org/browse/SR-1193 llvm-svn: 265821
* Enabling AddressSanitizer tests, they should pass now (and this time I mean it).Kuba Brecka2016-04-072-2/+0
| | | | llvm-svn: 265656
* Enable TestDebugBreak on x86_64 as wellPavel Labath2016-04-071-1/+1
| | | | | | Test passes there, and this would have helped me catch the snafu in the previous commit. llvm-svn: 265650
* Fixup TestLinuxCore on windowsPavel Labath2016-04-061-0/+2
| | | | | | | test_same_pid_running couldn't delete the temporary files, while we had them open. Deleting the target should make things work. llvm-svn: 265529
* Fix and xfail TestRegisterVariables after rL265498Tamas Berghammer2016-04-062-8/+3
| | | | llvm-svn: 265527
* Fixup r265398Pavel Labath2016-04-061-0/+1
| | | | llvm-svn: 265524
* make TestRegisterVariables slightly more resilientTodd Fiala2016-04-062-16/+123
| | | | | | | | | | | | | | | | | | | This test sets the compiler optimization level to -O1 and makes some assumptions about how local frame vars will be stored (i.e. in registers). These assumptions are not always true. I did a first-pass set of improvements that: (1) no longer assumes that every one of the target locations has every variable in a register. Sometimes the compiler is even smarter and skips the register entirely. (2) simply expects one of the 5 or so variables it checks to be in a register. This test probably passes on a whole lot more systems than it used to now. This is certainly true on OS X. llvm-svn: 265498
* Revert "XFail TestImport.py on Windows because Python 3 import rules don't ↵Adrian McCarthy2016-04-051-1/+0
| | | | | | | | work that way." This reverts commit e5f0ba4fcf977ad6baaaca700d3646675cdac19b. llvm-svn: 265476
* XFail TestImport.py on Windows because Python 3 import rules don't work that ↵Adrian McCarthy2016-04-051-0/+1
| | | | | | way. llvm-svn: 265461
* Fix dotest.py '-p' option for multi-process modeStephane Sezer2016-04-051-0/+4
| | | | | | | | | | | | | | | | | Summary: The '-p' option for dotest.py was ignored in multiprocess mode, as the -p argument to the inferior would overwrite the -p argument passed on the command line. Reviewers: zturner, tfiala Subscribers: lldb-commits, sas Differential Revision: http://reviews.llvm.org/D18779 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 265422
* Reverting r265401 ("Enabling AddressSanitizer tests, they should work now.")Kuba Brecka2016-04-052-0/+2
| | | | llvm-svn: 265406
* Enabling AddressSanitizer tests, they should work now.Kuba Brecka2016-04-052-2/+0
| | | | llvm-svn: 265401
* Fixing AddressSanitizer tests (update expectations for current ASan, make it ↵Kuba Brecka2016-04-052-23/+13
| | | | | | work on OS X 10.10 and older). llvm-svn: 265400
* [NFC] Cleanup the code used to run shell commands from testsTamas Berghammer2016-04-056-71/+34
| | | | | | | | | | | | Previously we had 3 different method to run shell commands on the target and 4 copy of code waiting until a given file appears on the target device (used for syncronization). This CL merges these methods to 1 run_platform_command and 1 wait_for_file_on_target functions located in some utility classes. Differential revision: http://reviews.llvm.org/D18789 llvm-svn: 265398
* Enabling TSan tests, they should work now.Kuba Brecka2016-04-052-2/+0
| | | | llvm-svn: 265396
* Fix ThreadSanitizer test cases to work on OS X 10.10 and older.Kuba Brecka2016-04-052-0/+10
| | | | llvm-svn: 265395
* Fix TestPlatformProcessConnect after rL265357Tamas Berghammer2016-04-051-1/+5
| | | | llvm-svn: 265392
* Fix a bug in linux core file handlingPavel Labath2016-04-055-8/+71
| | | | | | | | | | | | | | | | | | | Summary: There was a bug in linux core file handling, where if there was a running process with the same process id as the id in the core file, the core file debugging would fail, as we would pull some pieces of information (ProcessInfo structure) from the running process instead of the core file. I fix this by routing the ProcessInfo requests through the Process class and overriding it in ProcessElfCore to return correct data. A (slightly convoluted) test is included. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18697 llvm-svn: 265391
* Improve the way LLDB escapes arguments before passing them to the shellEnrico Granata2016-04-041-1/+5
| | | | | | | | | | | | | Teach LLDB that different shells have different characters they are sensitive to, and use that knowledge to do shell-aware escaping This helps solve a class of problems on OS X where LLDB would try to launch via sh, and run into problems if the command line being passed to the inferior contained such special markers (hint: the shell would error out and we'd fail to launch) This makes those launch scenarios work transparently via shell expansion Slightly improve the error message when this kind of failure occurs to at least suggest that the user try going through 'process launch' directly Fixes rdar://problem/22749408 llvm-svn: 265357
* disabled TSAN tests until the author can help track down CI failuresTodd Fiala2016-04-042-0/+2
| | | | | | | These tests run fine locally for me but are failing on the Green Dragon OS X CI. llvm-svn: 265342
* Fix flakyness in TestWatchpointMultipleThreadsPavel Labath2016-04-042-7/+2
| | | | | | | This addresses the same problem as r264846 (the test not expecting the situation when two thread hit the watchpoint simultaneously), but for a different test. llvm-svn: 265294
* skip and xfail two std::list-related libcxx tests that fail on OS X with TOT ↵Todd Fiala2016-04-012-0/+2
| | | | | | | | | | | | | libcxx Enrico has a bug on him to make this work across older libcxx list and newer libcxx list simultaneously. Needed in preparation of getting the OS X public CI to run the TSAN tests. tracked by: rdar://25499635 llvm-svn: 265188
* Remove more of the code-running ObjC data formatter supportEnrico Granata2016-04-011-6/+1
| | | | llvm-svn: 265181
* mark TestCallWithTimeout.py XFAIL on macosx.Todd Fiala2016-04-011-1/+1
| | | | | | | | | | This test is failing on the CI but not locally for me. Needs investigation. tracked by: https://llvm.org/bugs/show_bug.cgi?id=27182 llvm-svn: 265175
* Guard xunit result test class and test method name access to prevent testbot ↵Todd Fiala2016-04-011-2/+2
| | | | | | | | breakage http://llvm.org/bugs/show_bug.cgi?id=27179 llvm-svn: 265165
* Fix clean rule for a makefilePavel Labath2016-04-011-1/+1
| | | | | | | The test was failing on windows because the clean rule (which is executed even if the test is skipped) returned an error there. llvm-svn: 265140
* Don't vary debug info for lldb-server testsPavel Labath2016-03-312-1/+13
| | | | | | | | | | | | | | | | | | Summary: Debug info is used only by the client and lldb-server tests do not even have the client component running, as they communicate with the server directly. Therefore, running the tests for each debug info type is unnecessarry. This adds general ability to mark a test class as not dependent on debug info, and marks all lldb-server tests as such. Reviewers: tberghammer, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18598 llvm-svn: 265017
OpenPOWER on IntegriCloud