Commit Graph

434 Commits

Author SHA1 Message Date
Zachary Turner 81d0804d96 Fix incorrect usage of `str` in _match_decorator_property.
llvm-svn: 260292
2016-02-09 21:36:38 +00:00
Zachary Turner 9625c6fc9f Remove skipIf<compiler> decorators.
These were supposed to have been removed in a previous patch,
but I missed them.

llvm-svn: 260291
2016-02-09 21:36:32 +00:00
Zachary Turner 2b1a416cb5 Remove decorators related to debug info types.
All existing usages were ported over to the common decorators.

llvm-svn: 260290
2016-02-09 21:36:23 +00:00
Zachary Turner 8158a2037a Delete all the xfail / skip decorators for specific compilers.
Ported everything over to using expectedFailureAll.

llvm-svn: 260289
2016-02-09 21:36:15 +00:00
Zachary Turner 0c3e003697 Remove expected failure and skip decorators for host os.
All decorator invocations are updated to use the generic
expectedFailureAll and skipIf decorators.

llvm-svn: 260288
2016-02-09 21:36:02 +00:00
Tamas Berghammer bf8f8073dc Fix a typo in an xfail decorator in TestExprsChar
llvm-svn: 260216
2016-02-09 10:10:42 +00:00
Siva Chandra 4a33ab7b2c [TestExprsChar] Fix a typo is failure archs list
Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17014

llvm-svn: 260192
2016-02-09 02:18:50 +00:00
Zachary Turner 05021bb2ed Remove skip and xfail decorators for target architecture.
This removes the following decorators:

* skipIfI386
* expectedFailureI386
* expectedFailurex86_64
* skipIfArch
* skipUnlessArch
* skipUnlessI386

And other related decorators.  All code using those decorators
is updated to use expectedFailureAll and skipIf

llvm-svn: 260178
2016-02-09 00:36:34 +00:00
Zachary Turner 7fade35ec2 Remove skipIfHostPlatform and skipUnlessHostPlatform decorators.
llvm-svn: 260177
2016-02-09 00:36:27 +00:00
Zachary Turner 779df76c56 Remove the skipUnlessArch decorator.
Convert everything over to using skipIf.

llvm-svn: 260176
2016-02-09 00:36:22 +00:00
Zachary Turner 2e887acea8 A number of improvements to decorator conditionals.
* Change the `not_in` function to be called `no_match`.  This makes
  it clear that keyword arguments can be more than just lists.
* Change the name of `_check_list_or_lambda` to
  `_match_decorator_property`.  Again clarifying that decorator params
  are not always lists.
* Always use a regex match when matching strings.  This allows automatic
  support for regex matching on all decorator properties.  Also support
  compiled regex values.
* Fix a bug in the compiler check used by _decorateTest.  The two
  arguments were reversed, the condition was always wrong.
* Change one test that uses skipUnlessArch to use skipIf, to
  demonstrate that skipIf can now handle more scenarios.

Differential Revision: http://reviews.llvm.org/D16938

llvm-svn: 260135
2016-02-08 19:35:18 +00:00
Zachary Turner 4a289a93f7 Remove expectedFailureWindows decorator.
expectedFailureWindows is equivalent to using the general
expectedFailureAll decorator with oslist="windows".  Additionally,
by moving towards these common decorators we can solve the issue
of having to support decorators that can be called with or without
arguments.  Once all decorators are always called with arguments,
and this is enforced by design (because you can't specify the condition
you're decorating for without passing an argument) the implementation
of the decorators can become much simpler

Differential Revision: http://reviews.llvm.org/D16936

llvm-svn: 260134
2016-02-08 19:34:59 +00:00
Eugene Leviant ed203da558 Show real error message in -data-evaluate-expression
llvm-svn: 260082
2016-02-08 10:04:51 +00:00
Pavel Labath 22a2a7fec1 Revert "Enable test_lldbmi_settings_set_target_run_args_before on linux"
Test is still flaky.

llvm-svn: 260081
2016-02-08 09:58:27 +00:00
Enrico Granata 0a66e2f135 Fix an issue where certain CommandObjects (or Options thereof) were being created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances
Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes

Fixes rdar://24460882

llvm-svn: 259964
2016-02-06 00:43:07 +00:00
Siva Chandra 03ff5c8616 Take 2: Use an artifical namespace so that member vars do not hide local vars.
Summary: This relands r259810 with fix for failures on Mac.

Reviewers: spyffe, tfiala

Subscribers: tfiala, lldb-commits

Differential Revision: http://reviews.llvm.org/D16900

llvm-svn: 259902
2016-02-05 19:10:04 +00:00
Pavel Labath 5990cd5a0c Bump up the packet timeout for gdbremote tests
Log confirmed that the we are sometimes timing out on the receive, even though the server is
sending the correct packets.

llvm-svn: 259878
2016-02-05 11:17:22 +00:00
Zachary Turner 9a1a2946af Move the rest of the tests over to using the new decorator module.
llvm-svn: 259838
2016-02-04 23:04:17 +00:00
Siva Chandra 77b326f39d Revert "Use an artifical namespace so that member vars do not hide local vars."
Summary:
This reverts commit 8af14b5f9af68c31ac80945e5b5d56f0a14b38e4.
Reverting as it breaks a few tests on Mac.

Reviewers: spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16895

llvm-svn: 259823
2016-02-04 20:08:40 +00:00
Siva Chandra 375882dddb Use an artifical namespace so that member vars do not hide local vars.
Summary:
While evaluating expressions when stopped in a class method, there was a
problem of member variables hiding local variables. This was happening
because, in the context of a method, clang already knew about member
variables with their name and assumed that they were the only variables
with those names in scope. Consequently, clang never checks with LLDB
about the possibility of local variables with the same name and goes
wrong. This change addresses the problem by using an artificial
namespace "$__lldb_local_vars". All local variables in scope are
declared in the "$__lldb_expr" method as follows:

    using $__lldb_local_vars::<local var 1>;
    using $__lldb_local_vars::<local var 2>;
    ...

This hides the member variables with the same name and forces clang to
enquire about the variables which it thinks are declared in
$__lldb_local_vars. When LLDB notices that clang is enquiring about
variables in $__lldb_local_vars, it looks up local vars and conveys
their information if found. This way, member variables do not hide local
variables, leading to correct evaluation of expressions.

A point to keep in mind is that the above solution does not solve the
problem for one specific case:

    namespace N
    {
        int a;
    }

    class A
    {
    public:
        void Method();
        int a;
    };

    void
    A::Method()
    {
        using N::a;
        ...

        // Since the above solution only touches locals, it does not
        // force clang to enquire about "a" coming from namespace N.
    }

Reviewers: clayborg, spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16746

llvm-svn: 259810
2016-02-04 18:38:35 +00:00
Zachary Turner 7a5382de82 Move some of the common decorators to decorators.py.
This doesn't attempt to move every decorator.  The reason for
this is that it requires touching every single test file to import
decorators.py.  I would like to do this in a followup patch, but
in the interest of keeping the patches as bite-sized as possible,
I've only attempted to move the underlying common decorators first.
A few tests call these directly, so those tests are updated as part
of this patch.

llvm-svn: 259807
2016-02-04 18:03:01 +00:00
Pavel Labath 1dafd45e6f Enable test_lldbmi_settings_set_target_run_args_before on linux
Test has passed last 200 runs of the build bot.

llvm-svn: 259777
2016-02-04 11:51:07 +00:00
Pavel Labath e1649a7853 Mark TestProcessIO as flaky on android
previously, I have marked only one test as flaky, but now I noticed another test failing with the
same error. I am going to assume all of them are flaky.

llvm-svn: 259775
2016-02-04 09:53:37 +00:00
Pavel Labath fcf08db0f9 Add verbose logging support to gdb-remote tests
Summary:
gdb-remote tests are not able to use the same logging mechanisms as the rest of our tests, and
currently we get no host logs from them, even though the tests themselves have logging
capability. This commit changes that. When user specifies that he would like to log the
gdb-remote channel (--channel gdb-remote argument to dotest.py), we write detailed logs to the
<TEST_ID>-host.log file, just like we would in the case of regular tests. If this argument is not
specified, we only log the serious messages to stderr, which matches the existing behaviour.

Reviewers: tfiala, tberghammer

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16858

llvm-svn: 259774
2016-02-04 09:53:33 +00:00
Zachary Turner 3abbf6f6db Fix missing module qualification of subprocess.PIPE.
llvm-svn: 259724
2016-02-03 22:53:18 +00:00
Jim Ingham 22eeb7227c The SetStopInfo from a Mach Exception was setting the stop
reason to None when we stop due to a trace, then noticed that
we were on a breakpoint that was not valid for the current thread.
That should actually have set it back to trace.

This was pr26441 (<rdar://problem/24470203>)

llvm-svn: 259684
2016-02-03 19:45:31 +00:00
Zachary Turner 62d3a6570a Move some android platform functions to lldbplatformutil.
My eventual goal is to move all of the test decorators to their
own module such as `decorators.py`.  But some of the decorators
use existing functions in `lldbtest.py` and conceptually the
functions are probably more appropriately placed in lldbplatformutil.
Moreover, lldbtest.py is a huge file with a ton of random utility
functions scattered around, so this patch also workds toward the
goal of reducing the footprint of this one module to a more
reasonable size.

So this patch moves some of them over to lldbplatformutil with the
eventual goal of moving decorators over to their own module.

Reviewed By: Tamas Berghammer, Pavel Labath
Differential Revision: http://reviews.llvm.org/D16830

llvm-svn: 259680
2016-02-03 19:12:30 +00:00
Pavel Labath 5f496fb941 Remove skipUnlessListedRemote test decorator
This decorator was used in only one test, and it's behaviour was quite complicated. It skipped
if:
- test was remote
- platform was *not* android

I am not aware of anyone running tests with this configuration (and even then, I am not aware of
a reason why the test should not pass), but if TestLoadUnload starts breaking for you after this
commit, please disable the test with
@expectedFailureAll(remote=True, oslist=[YOUR_PLATFORM])

llvm-svn: 259642
2016-02-03 11:51:25 +00:00
Zachary Turner 0d473d12fe Fix inverted conditional in TestInferiorAssert.py
llvm-svn: 259608
2016-02-02 23:56:45 +00:00
Zachary Turner c67466054f Don't return a tuple from the skip test function.
Previously we were returning a tuple of (bool, skip_reason) from
the tuple function.  This makes for some awkward code, especially
since a value of True for the first argument implies that the
second argument is None, and a value of False implies that the
second argument is not None.  So it was basically redundant, and
with this patch we simply return the skip reason or None directly.

llvm-svn: 259590
2016-02-02 22:22:53 +00:00
Zachary Turner d6609d74a1 Re-write many skip decorators to use shared code.
This should be no functional change, just a refactoring of the
skip decorators to all centralize on a single function,
`skipTestIfFn` that does all the logic.  This allows easier
maintenance of the decorators and also centralizes all the
hard-to-understand logic in one place.

Reviewed by: Pavel Labath
Differential Revision: http://reviews.llvm.org/D16741

llvm-svn: 259543
2016-02-02 18:50:34 +00:00
Pavel Labath bb3f0ae821 XFAIL TestConsecutiveBreakpoints.test_single_step_thread_specific on OSX
llvm-svn: 259527
2016-02-02 17:02:58 +00:00
Todd Fiala c65a4d8d45 skip TestWatchLocation on OS X
Skipping this test while I investigate.  It started failing
with r259379.  (It is generating an error due to unicode
decode issues.)

llvm-svn: 259526
2016-02-02 17:00:34 +00:00
Pavel Labath b32b19cde1 Remove redundant test in TestExitDuringStep
After recent changes, test_thread_state_is_stopped has become equivalent to test_step_in, as the
function exit_during_step_base was not using the "test_thread_state" parameter. As test was
XFAILed on all platforms anyway, and we have other tests for the bug which it (used to) test, I
am simply removing the function.

llvm-svn: 259517
2016-02-02 15:58:30 +00:00
Pavel Labath 148e4b7f66 Mark TestProcessIO.test_stdin_redirection as flaky on android
bug #26437

llvm-svn: 259513
2016-02-02 15:16:16 +00:00
Pavel Labath efd04a6c75 Fix single-stepping onto a breakpoint
Summary:
r259344 introduced a bug, where we fail to perform a single step, when the instruction we are
stepping onto contains a breakpoint which is not valid for this thread. This fixes the problem
and add a test case.

Reviewers: tberghammer, emaste

Subscribers: abhishek.aggarwal, lldb-commits, emaste

Differential Revision: http://reviews.llvm.org/D16767

llvm-svn: 259488
2016-02-02 10:40:56 +00:00
Pavel Labath e8baa4498d Fix compiler lookup when specified without path
r259433 introduced a regression, where if a compiler is specified without a path (e.g., CC=clang,
relying on the fact that clang is in $PATH), then the test suite would fail (at the compiler
version detection step) because realpath would interpret this as a path relative to cwd). The fix
is to perform the $PATH expansion (via `which`) before the realpath step.

llvm-svn: 259484
2016-02-02 09:49:37 +00:00
Stephane Sezer 0f0f82e58c Fix getCompiler in unit testing framework on compiler symlinks
Summary:
Checks using the result of getCompiler() will fail to identify the compiler
correctly if CC is a symlink path (ie /usr/bin/cc).

Reviewers: zturner, emaste

Subscribers: llvm-commits, sas

Differential Revision: http://reviews.llvm.org/D16488

Change by Francis Ricci <fjricci@fb.com>

llvm-svn: 259433
2016-02-01 23:21:27 +00:00
Zachary Turner e5a7990dbe Always write the session file in UTF-8.
This patch attempts to solve the Python 2 / Python 3 incompatibilities by
introducing a new `encoded_file` abstraction that we use instead of
`io.open()`.  The problem with the builtin implementation of `io.open` is
that `read` and `write` accept and return `unicode` objects, which are not
always convenient to work with in Python 2.  We solve this by making
`encoded_file.open()` return the same object returned by `io.open()` but
with hooked `read()` and `write()` methods.  These hooked methods will
accept binary or text data, and conditionally convert what it gets to a
`unicode` object using the correct encoding.  When calling `read()` it
also does any conversion necessary to convert the output back into the
native `string` type of the running python version.

Differential Revision: http://reviews.llvm.org/D16736

llvm-svn: 259379
2016-02-01 18:12:59 +00:00
Zachary Turner f042c908b3 Fix misnamed variable in TestProcessAPI.py
llvm-svn: 259378
2016-02-01 18:12:54 +00:00
Pavel Labath 916895073e Remove flaky annotation for TestCallWithTimeout on linux
The test has passed last 100 runs of the buildbot.

llvm-svn: 259368
2016-02-01 16:50:28 +00:00
Abhishek Aggarwal c2c8ca1ce3 Set correct ThreadStopInfo in case of trace event
Summary:
 - The patch solves Bug 23478 and Bug 19311. Resolving
   Bug 23478 also resolves Bug 23039.
      Correct ThreadStopInfo is set for Linux and FreeBSD
      platforms.

 - Summary:
      When a trace event is reported, we need to check
      whether the trace event lands at a breakpoint site.

      If it lands at a breakpoint site then set the thread's
      StopInfo with the reason 'breakpoint'. Else, set the reason
      to be 'Trace'.

Change-Id: I0af9765e782fd74bc0cead41548486009f8abb87
Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Reviewers: jingham, emaste, lldb-commits, clayborg, ovyalov

Subscribers: emaste

Differential Revision: http://reviews.llvm.org/D16720

llvm-svn: 259344
2016-02-01 09:01:42 +00:00
Jim Ingham 02e73d1c3c Fix this test for the the switch in default for IgnoreBreakpoints in SBFrame.EvaluateExpression.
llvm-svn: 259234
2016-01-29 20:09:30 +00:00
Eugene Leviant ec4d04e507 Fix crash in lldb-mi when stack variable name is nullptr. This always happens when execution stops in try scope with unnamed catch clause
llvm-svn: 259189
2016-01-29 12:17:09 +00:00
Enrico Granata fa7ae77af4 Fix a bug where type <formatter> list would ignore the -w argument
rdar://24379879

llvm-svn: 259135
2016-01-29 01:12:13 +00:00
Enrico Granata 6cc1998814 Fix a bug where LLDB would not print the name of the function that a scripted summary is bound to
rdar://24380076

llvm-svn: 259131
2016-01-29 00:56:52 +00:00
Enrico Granata 6b7427856a Fix an issue where the type <formatter> list command would not accept a valid argument and instead error out complaining about a malformed regex
rdar://problem/24380025

llvm-svn: 259078
2016-01-28 19:21:38 +00:00
Zachary Turner 95b533fe4b Revert "Resubmit r258759 with proper unicode handling."
This reverts commit 2c79d60214e146b13b233392a859b4f79340e90e.

llvm-svn: 258978
2016-01-27 19:47:28 +00:00
Zachary Turner 671e6340da Resubmit r258759 with proper unicode handling.
Instead of opening the file in unicode mode, we need only encode
data which potentially has non-ASCII characters as UTF8 before
writing.  This should work across both Python versions, and is
also far simpler than anything else discussed.

llvm-svn: 258969
2016-01-27 19:00:51 +00:00
Zachary Turner e89a66bd4a Fix some python 3 incompatibilities that went in overnight.
* basestring is not a thing anymore.  Must use `six.string_types`.
* Must use from __future__ import print_function in every new test
  file.

llvm-svn: 258967
2016-01-27 18:49:35 +00:00
Zachary Turner 7289e43831 Refactor some of the xfail / skip decorators to share logic.
Previously the logic of skipIf and expectedFailure were 99%
the same, but they took different sets of arguments since they
were maintained separately, and had slightly differences in
their behavior.  This makes everything consistent, there is now
only one real implementation, and the previous ones are changed
to use the single master implementation.

llvm-svn: 258966
2016-01-27 18:49:31 +00:00
Zachary Turner 74b7965d38 Don't automtically try to import pexpect in lldbpexpect.
Since pexpect doesn't exist on Windows, tests which are xfail'ed
are not being run at all because they are failing when the file
is imported due to the `import pexpect`.  This puts the import
behind a conditional and makes an empty base class in the case
where pexpect is not present.

llvm-svn: 258965
2016-01-27 18:49:25 +00:00
Adrian McCarthy 7ae98efe85 XFail TestCPPAuto on Windows until we can find the root problem.
llvm.org/pr26339

llvm-svn: 258943
2016-01-27 17:03:25 +00:00
Omair Javaid 7124c11ad9 Decorarte TestInferiorAssert xfails on AArch64 Linux
This patch decorates some of TestInferiorAssert test cases with expectedFailureLinux on AArch64.

llvm-svn: 258930
2016-01-27 13:57:33 +00:00
Bhushan D. Attarde df5f0b448c [LLDB][MIPS] A small fix in GetBreakableLoadAddress() for MIPS
SUMMARY:
    Get the load address for the address given by symbol and function.
    Earlier, this was done for function only, this patch does it for symbol too.
    This patch also adds TestAvoidBreakpointInDelaySlot.py to test this change.
    
    Reviewers: clayborg
    Subscribers: labath, zturner, mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential Revision: http://reviews.llvm.org/D16049

llvm-svn: 258919
2016-01-27 10:16:30 +00:00
Enrico Granata dd54a3a887 Reverting r258759 as it is breaking the OSX build
llvm-svn: 258791
2016-01-26 04:53:10 +00:00
Zachary Turner a37eac51de Fix TestRerun.py on Windows.
This is another example of a test that was looking for the thread
at index 0 instead of requesting the thread that was stopped at
the created breakpoint.  This assumption isn't true on Windows 10.

llvm-svn: 258764
2016-01-26 01:19:50 +00:00
Sean Callanan bca81c5a18 Fix the lldbinline tests so they make well-formed Makefiles.
lldbinline tests previously did not run correctly unless there was already a
Makefile for them.  This was because the syntax of the emitted Makefile made the
default make rule be the "cleanup" rule, which is pretty unhelpful.  Now the
default rule is the one included from Makefile.rules, which is much better.

llvm-svn: 258763
2016-01-26 01:15:57 +00:00
Zachary Turner ff33e3636d Remove XFAIL Windows from a test that was fixed by r258758.
llvm-svn: 258761
2016-01-26 01:09:38 +00:00
Zachary Turner 00b87282cd Write the session log file in UTF-8.
Previously we were writing in the default encoding, which depends
on the operating system and is not guaranteed to be unicode aware.
On Python 3, this would lead to a situation where writing unicode
text to the log file generates an exception.  The fix here is to
write session logs using the proper encoding, which incidentally
fixes another test, so xfail is removed from that.

llvm-svn: 258759
2016-01-26 00:59:42 +00:00
Zachary Turner 240c72b72c Fix TestSyntheticCapping for Python 3.
In Python 3, whitespace inconsistences are errors.  This synthetic
provider had mixed tabs and spaces, as well as inconsistent
indentation widths.  This led to the file not being imported,
and naturally the test failing.  No functional change here, just
whitespace.

llvm-svn: 258751
2016-01-26 00:07:09 +00:00
Zachary Turner 4407396fb9 Fix some issues with bytes and strings in Python 3.
SBProcess::ReadMemory and other related functions such as
WriteMemory are returning Python string() objects.  This means
that in Python 3 that are returning Unicode objects.  In reality
they should be returning bytes objects which is the same as a string
in Python 2, but different in Python 3.  This patch updates the
generated SWIG code to return Python bytes objects for all
memory related functions.

One quirk of this patch is that the C++ signature of ReadCStringFromMemory
has it writing c-string data into a void*.  This confuses our swig
typemaps which expect that a void* means byte data.  So I hacked up
a custom typemap which maps this specific function to treat the
void* as string data instead of byte data.

llvm-svn: 258743
2016-01-25 23:21:18 +00:00
Adrian McCarthy 60897300c5 Fix TestSourceManager.py on Windows.
Python 3.5 is picky about writing strings to binary files, so we now open the
file in text mode, and we explicitly set the newline mode to avoid re-writing
it with CR+LF on Windows (which causes git to think the file had changed).

llvm-svn: 258704
2016-01-25 19:13:35 +00:00
Sagar Thakur 9986ed6aa8 [LLDB][MIPS] Fix TestPrintStackTraces.py
Patch by Nitesh Jain.

Summary: The thread_start function in libc doesn't contain any epilogue and prologue instructions. Hence unwinding fail when we are stopped in thread_start.

Reviewers: ovyalov, clayborg
Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: reviews.llvm.org/D16136
llvm-svn: 258685
2016-01-25 12:33:03 +00:00
Sagar Thakur 60481839c0 [LLDB][MIPS] Fix TestExprsChar.py
Patch by Nitesh Jain.

Summary: When incorrect type used for 'char' then (at least) one of the expression evaluates to incorrect value. Please refer to bug llvm.org/pr23069

Reviewers: ovyalov, clayborg
Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: reviews.llvm.org/D16132
llvm-svn: 258684
2016-01-25 12:27:46 +00:00
Todd Fiala efbb273ea0 Skipped IncompleteModulesTestCase on OS X
This is hitting an assert in clang when evaluating the
module load.  I am seeing it locally on Xcode 7.3 public Beta 1
and on the llvm.org Green Dragon buildbot supposedly running
Xcode 7.0.

Tracked by:
https://llvm.org/bugs/show_bug.cgi?id=26267

llvm-svn: 258602
2016-01-23 02:34:16 +00:00
Todd Fiala 299d42a170 fixed TestConsecutiveBreakpoints test on OS X
Also renamed directory and class name to fix typos.

llvm-svn: 258601
2016-01-23 02:24:41 +00:00
Zachary Turner ec56018938 Fix missing function argument passthrough.
llvm-svn: 258592
2016-01-23 00:49:11 +00:00
Zachary Turner 8012496a91 Decode files with UTF-8 in lldbutil.line_number.
Since Unicode support is different in Py2 and Py3, Py3 was throwing
exceptions about being unable to decode the file with the default
encoding.

llvm-svn: 258588
2016-01-22 23:54:49 +00:00
Zachary Turner 9bd1c596dd Un xfail TestSettings.test_run_args_and_env_vars_with_dwarf
llvm-svn: 258587
2016-01-22 23:54:45 +00:00
Zachary Turner 1da094a5ec More fixes related to counting threads on Windows.
The Windows 10 loader spawns threads at startup, so
tests which count threads or assume that a given user
thread will be at a specific index are incorrect in
this case.  The fix here is to use the standard mechanisms
for getting the stopped thread (which is all we are
really interested in anyway) and correlating them with
the breakpoints that were set, and doing checks against
those things.

This fixes about 6 tests on Windows 10.

llvm-svn: 258586
2016-01-22 23:54:41 +00:00
Adrian McCarthy bce5d9adce XFail a test from TestConditionalBreak.py on Windows.
Filed a bug to investigate later:  llvm.org/pr26265

llvm-svn: 258578
2016-01-22 23:05:47 +00:00
Adrian McCarthy 3ca8aa5af6 XFail TestNamespaceLookup tests on Windows.
There's already a pr:  https://llvm.org/bugs/show_bug.cgi?id=25819

llvm-svn: 258577
2016-01-22 23:05:29 +00:00
Todd Fiala f8f8a6de06 fixed test suite crash when --platform-name doesn't start with 'remote-'
Also removes Darwin test case files from the expectedTimeout hard-coded
file list.

See:
http://reviews.llvm.org/D16423

llvm-svn: 258542
2016-01-22 20:20:48 +00:00
Pavel Labath 4b70eb7b2b Revert "Enable test log collection from remote debug servers"
Unfortunately, this turns out not to be working on the lldb-server tests, as there the server is
started in a different way. Since this was a bit of a hack to start with, I am removing it until
I can solve the problem more holistically.

llvm-svn: 258501
2016-01-22 14:50:29 +00:00
Adrian McCarthy 524afae807 Fix TestImport.py to work with Python 3.5.
Differential Revision: http://reviews.llvm.org/D16431

llvm-svn: 258448
2016-01-21 23:07:48 +00:00
Adrian McCarthy f0a275e035 NFC. Corrects name of test class and a comment.
llvm-svn: 258433
2016-01-21 21:10:00 +00:00
Zachary Turner 783550be62 Remove assumptions that thread 0 is always the main thread.
Starting with Windows 10, the Windows loader is itself multi-threaded,
meaning that the loader spins up a few threads to do process
initialization before it executes main.  Windows delivers these
notifications asynchronously and they can come out of order, so
we can't be sure that the first thread we get a notification about
is actually the zero'th thread.

This patch fixes this by requesting the thread stopped at the
breakpoint that was specified, rather than getting thread 0 and
verifying that it is stopped at a breakpoint.

Differential Revision: http://reviews.llvm.org/D16247

llvm-svn: 258432
2016-01-21 21:07:30 +00:00
Pavel Labath e3e6be2aab Enable test log collection from remote debug servers
Summary:
We already have the ability to collect the server logs when doing local debugging. This enables
the collection of remote logs as well. This relies on specifying a relative path "server.log" for
LLDB_DEBUGSERVER_LOG_FILE when starting remote platform. Since we always set the platform working
directory to a fresh folder to avoid conflicts, the actual file path will always be different and
we can pick the logs up from there.

Reviewers: tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16322

llvm-svn: 258414
2016-01-21 17:54:14 +00:00
Omair Javaid 94b94421a4 Mark arm/aarch64 specific xfails with expectedFailureLinux decorator
This patch marks some known failures and puts on expectedFailureLinux decorator to have testsuite xfail them.

Affected tests are: 

test/functionalities/watchpoint/step_over_watchpoint.py
test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
test/tools/lldb-server/TestGdbRemoteSingleStep.py
test/tools/lldb-server/TestGdbRemote_vCont.py

llvm-svn: 258315
2016-01-20 15:01:54 +00:00
Pavel Labath db1958d136 Enable TestInlineStepping on linux i386
Test has been passing at least the last 200 buildbot runs.

llvm-svn: 258305
2016-01-20 12:17:26 +00:00
Pavel Labath 806ad5977d Enable TestConcurrentEvents on i386 linux
The test has been passing reliably the last 100 runs of the build bot.

llvm-svn: 258304
2016-01-20 12:09:12 +00:00
Ravitheja Addepally 15f89c420b Fix for Bug 25338
Summary:
The issue arises because LLDB is not
able to read the vdso library correctly.
The fix adds memory allocation callbacks
to allocate sufficient memory in case the
requested offsets don't fit in the memory
buffer allocated for the ELF.

Reviewers: lldb-commits, clayborg, deepak2427, ovyalov, labath, tberghammer

Differential Revision: http://reviews.llvm.org/D16107

llvm-svn: 258122
2016-01-19 12:55:21 +00:00
Pavel Labath f82d71f025 Remove last XTIMEOUTs from android tests
TestHelloWorld seems to be passing now as far as I can tell. TestExitDuringStep is still hanging.
I have marked the relevant tests as flaky, which should handle the timeouts now as well. I'll be
monitoring the buildbots for fallout.

llvm-svn: 258114
2016-01-19 10:59:10 +00:00
Pavel Labath bace94eda8 Remove skipIfLinuxClang decorator
it isn't used in the code anymore, and we're trying to cut down on the decorators.

llvm-svn: 258049
2016-01-18 15:01:14 +00:00
Pavel Labath 4da73573ab Guard against application of an XFAIL decorator on a class
This does not work and causes the class to be silently skipped, which is a bad idea. This makes
sure it cannot happen accidentaly. I've played with the idea of actually making the decorator
work at class level, but it proved too magic to do at this moment.

llvm-svn: 258048
2016-01-18 14:45:35 +00:00
Zachary Turner 778cec3e30 On non-Windows platforms, asm int 3 generates an eStopReasonSignal.
llvm-svn: 257959
2016-01-15 23:44:45 +00:00
Zachary Turner fa0b4b271a Fix TestDebugBreak.py.
We can't assume that the main thread of an inferior has index 0,
even in a single-threaded app.

llvm-svn: 257946
2016-01-15 22:22:40 +00:00
Adrian McCarthy 8801145ad4 Small fixes to ensure TestLogging.py tests work with Python 3.5 as well as 2.7.
llvm-svn: 257931
2016-01-15 20:45:06 +00:00
Pavel Labath 0771b18257 Fix decoration of TestConcurrentEvents
TestConcurrentEvents was marked with a XFAIL decorator at class level, which actually does not
work, and causes the class to be silently skipped everywhere. It seems that making it work at
class level is quite a difficult task, so I will just move it to the individual test methods. I
will follow this up with a commit which makes the decorator blow up in case someone tries to
apply it to a class in the future.

llvm-svn: 257901
2016-01-15 16:20:01 +00:00
Adrian McCarthy aa1f270151 Fix detection of teardown hooks that are already bound.
llvm-svn: 257829
2016-01-14 22:52:16 +00:00
Zachary Turner 1d89df0998 Resubmit the fixes for TestProcessLaunch.py.
I was calling the base class tearDown() function the wrong way
which for some reason is ok on Python 3 but not on Python 2.

llvm-svn: 257788
2016-01-14 19:14:02 +00:00
Tamas Berghammer f84df99520 Update some XFAILs after the 3.8->3.9 version change
llvm-svn: 257761
2016-01-14 12:49:48 +00:00
Tamas Berghammer 3fa2395aa5 XFAIL TestCommandScriptImmediateOutput on Linux
llvm-svn: 257755
2016-01-14 10:56:56 +00:00
Zachary Turner 400767af54 Revert changes to TestProcessLaunch.py as they are breaking a build.
llvm-svn: 257690
2016-01-13 22:32:31 +00:00
Zachary Turner 19e2ea8fb6 Fix TestProcessLaunch for Python 3.
There were a number of problems preventing this from working:

1. The SWIG typemaps for converting Python lists to and from C++
   arrays were not updated for Python 3.  So they were doing things
   like PyString_Check instead of using the PythonString from
   PythonDataObjects.
2. ProcessLauncherWindows was ignoring the environment completely.
   So any test that involved launching an inferior with any kind
   of environment variable would have failed.
3. The test itself was using process.GetSTDOUT(), which isn't
   implemented on Windows.  So this was changed to save the
   value of the environment variable in a local variable and
   have the debugger look at the value of the variable.

llvm-svn: 257669
2016-01-13 21:21:49 +00:00
Enrico Granata 983ad65220 Mark these tests on FreeBSD and Linux as non-flakey. We don't know that they are
llvm-svn: 257656
2016-01-13 19:29:52 +00:00
Enrico Granata 744959b9c9 Fix an issue where scripted commands would not actually print any of their output if an immediate output file was set in the result object via a Python file object
Fixes rdar://24130303

llvm-svn: 257644
2016-01-13 18:11:45 +00:00
Sagar Thakur dd113648af [LLDB][MIPS] Fix TestDisassembleRawData.py
Patch by Nitesh Jain.

Summary: This patch adds check for the correctness of disassembling instruction for MIPS target.

Reviewers: emaste, clayborg, ovyalov
Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: http://reviews.llvm.org/D15915
llvm-svn: 257587
2016-01-13 11:22:56 +00:00
Siva Chandra b4f94aaf9b [TestThreadJump] Adjust match sub-string after recent change.
Reviewers: zturner

Subscribers: zturner, lldb-commits

Differential Revision: http://reviews.llvm.org/D16125

llvm-svn: 257531
2016-01-12 22:33:19 +00:00