Commit Graph

3649 Commits

Author SHA1 Message Date
Siva Chandra cebabb9fc0 DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or child
Summary:
With this change DWARFASTParserClang::CompleteTypeFromDWARF returns false if
DWARFASTParserClang::ParseChildMembers returns false. Similarly, it returns
false if any base class is of an incomplete type. This helps in cases like
these:

  class Foo
  {
  public:
    std::string str;
  };
  ...
  Foo f;

If a file with the above code is compiled with a modern clang but without
the -fno-limit-debug-info (or similar) option, then the DWARF has only
a forward declration for std::string. In which case, the type for
"class Foo" cannot be completed. If LLDB does not detect that a child
member has incomplete type, then it wrongly conveys to clang (the LLDB
compiler) that "class Foo" is complete, and consequently crashes due to
an assertion failure in clang when running commands like "p f" or
"frame var f".

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 248401
2015-09-23 17:47:08 +00:00
Todd Fiala ea594abc78 test framework: fixed issue when using results formatter with no formatter options
I broke the formatter options-passing parsing when no formatter
options are provided.

llvm-svn: 248397
2015-09-23 17:20:09 +00:00
Todd Fiala ea73624e5f Cleaned up results formatter options hand-off.
* --results-formatter-options renamed to --results-formatter-option,
  with short version of -O

* Multiple --results-formatter-option=OPTION can be specified.  The
  comma-separating mechanism has been removed.

* XunitFormatter options modified: -n and -r are now short forms of
  --ignore-skip-name and --ignore-skip-reason.  Those long option
  names were tweaked lightly.  They also can be specified multiple
  times on the command line.  The comma-separating, multiple-pattern-
  per-option mechanism has been removed.

One can now specify:

  dotest.py --results-file stdout -O-ndsym -O-nlldb-mi

for example, to ignore reporting skips for dsym-related or lldb-mi-related
tests in the xUnit report.

llvm-svn: 248384
2015-09-23 15:21:28 +00:00
Pavel Labath 84f6f277ac Fix race condition during process detach
Summary:
The following situation occured in TestAttachResume:

The inferior was stoped at a breakpoint and we did a continue, immediately followed by a detach.
Since there was a trap instruction under the IP, the continue did a step-over-breakpoint before
resuming the inferior for real. In some cases, the detach command was executed between these two
events (after the step-over stop, but before continue). Here, public state was running, but
private state was stopped. This caused a problem because HaltForDestroyOrDetach was checking the
public state to see whether it needs to stop the process (call Halt()), but Halt() was checking
the private state and concluded that there is nothing for it to do.

Solution: Instead of Halt() call SendAsyncInterrupt(), which will then cause Halt() to be
executed in the context of the private state thread. I also rename HaltForDestroyOrDetach to
reflect it does not call halt directly.

Reviewers: jingham, clayborg

Subscribers: lldb-commits

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

llvm-svn: 248371
2015-09-23 10:16:57 +00:00
Ravitheja Addepally 9fcf72ef9b Testcase and fix for bug 24074
Summary:
In bug 24074, the type information is not shown
correctly. This commit  includes the following -
-> Changes for displaying correct type based on
   current lexical scope for the command "image
   lookup -t"
-> The corresponding testcase.

Reviewers: jingham, ovyalov, spyffe, richard.mitton, clayborg

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

llvm-svn: 248366
2015-09-23 07:19:02 +00:00
Enrico Granata 2e4ff97cb7 Fix a test case which was failing. There was no actual problem in the test logic, just a cosmetic issue with the presentation of the result by Foundation
llvm-svn: 248339
2015-09-22 23:08:13 +00:00
Todd Fiala 871b2e5e30 test runner: remove print from prior commit; fixup listner socket backlog
When doing test event collation from dotest inferiors to the parallel test
runner, I had a hard-coded small value for the socket backlog. Fix it to
be 2*num workers so we don't fail socket connections from inferiors.

llvm-svn: 248337
2015-09-22 22:47:34 +00:00
Todd Fiala 83c32e3a49 test framework: default to threading-based test runners
Windows gets threading-pool, OS X versions < 10.10 get
multiprocessing, everyone else gets threading.

llvm-svn: 248323
2015-09-22 21:19:40 +00:00
Todd Fiala da817b6186 Test runner process group isolation take 2.
This one does not create a session, but just creates a
new process group in the same session.

llvm-svn: 248306
2015-09-22 18:05:11 +00:00
Chaoren Lin 307d3ae4b4 Update TestChangeProcessGroup to remove obsolete workaround.
Expression evaluation in syscalls should work now.

Reviewers: labath

Subscribers: lldb-commits

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

llvm-svn: 248301
2015-09-22 17:37:34 +00:00
Greg Clayton d13c4fb7f2 Allow TAB key to switch first responder when tests are running or completed.
Typing the shortcut key ('.' for 'pass', 'e' for 'error', etc) will toggle the visibility of the test in the Results window.

llvm-svn: 248290
2015-09-22 17:18:15 +00:00
Greg Clayton 825ab5878a Add missing file that contains the curses test suite code. To run with curses you now execute:
% ./dotest.py --results-formatter=curses_results.Curses --results-file=/dev/stdout

llvm-svn: 248285
2015-09-22 16:29:15 +00:00
Todd Fiala f42df67cad Roll back r248282.
I'm seeing timed out tests not properly timing out on the Linux
build bot after this change.  Not sure if it is related but
seems suspect.

llvm-svn: 248284
2015-09-22 16:03:43 +00:00
Todd Fiala 1bf2bb713b test runner: Unix systems now put inferior dotest in its own process group.
This increases isolation as it relates to signal handling between parent and
children.

llvm-svn: 248282
2015-09-22 15:21:50 +00:00
Ed Maste 80973130ef Remove expectedFailureFreeBSD from passing tests
These two tests are skipped on Linux with a comment that the behaviour
is as expected, but they are consistently passing on FreeBSD now.

llvm.org/pr15989

llvm-svn: 248271
2015-09-22 13:31:16 +00:00
Ed Maste 6724f3ba7c Remove expectedFailureFreeBSD from passing test
HelloWorldTestCase::test_with_dwarf_and_process_launch_api passes
consistently for me and for John Wolfe.

llvm.org/pr21620

llvm-svn: 248269
2015-09-22 13:27:26 +00:00
Todd Fiala 132c2c4bc7 xUnit test formatter: add options for ignoring skipped tests
Skipped tests can be dropped from xUnit reports if either
the name or the skip reason matches one of a given set of
regular expression patterns (via re.search(), not re.match()).
New formatter option for the xunit formatter:
--ignore-skip-matching-reason and
--ignore-skip-matching-name

Both are results-formatter options.

llvm-svn: 248247
2015-09-22 06:32:50 +00:00
Ed Maste d8f3c05466 Remove expectedFailureFreeBSD from passing test_expr_null_with_dwarf
llvm.org/pr21550

llvm-svn: 248236
2015-09-22 01:36:21 +00:00
Greg Clayton 87349248d4 Split the curses stuff out into a separate file so that we can import curses and lldbcurses at the module level.
Added key press handling and a first responder system and the ability for windows that can be first responders to be selected and have key presses routed to the first resonder, delegates and also travel up the parent chain.

Remove the temp file that was being created.

llvm-svn: 248232
2015-09-22 00:35:20 +00:00
Todd Fiala de9a44e3e9 test framework: parallel test runner sends terminate to formatter before printing to stdout
The parallel test runner now sends the terminate event to the formatter
(if there is one) after the parallel test runs but before dumping anything
to stdout/stderr at the end of the run.  This allows the existing
stdout/stderr summary reporting to co-exist nicely with a formatter like
the test_results.Curses that otherwise clobbers the screen.

llvm-svn: 248228
2015-09-22 00:15:50 +00:00
Greg Clayton b0d148e9f3 Fixed up the curses test results formatter to:
- rename "Failures" window to "Completed Tests"
- Remove the extra lock that I incorrectly added to the ResultsFormatter as it already had one
- Init the curses GUI with the right number of jobs when handling the "intialize" event
- tear down the curses GUI when tests complete

llvm-svn: 248179
2015-09-21 17:25:01 +00:00
Ed Maste ef3a04aae7 XFAIL TestConnectRemote.py on FreeBSD
Test fails with:
    error: Process 1 was reported after connecting to
    'connect://localhost:42922', but no stop reply packet was received

llvm.org/pr24896

llvm-svn: 248157
2015-09-21 13:44:57 +00:00
Ed Maste f9e493b8cb For now skip go tests that trigger assertion failures on FreeBSD
llvm.org/pr24895

llvm-svn: 248155
2015-09-21 13:32:21 +00:00
Todd Fiala 1cc97b4399 test framework: ignore sighups
On OS X, we're occasionally seeing sighups come in to what
looks like the whole test runner process group (all the
multiprocessing workers and the main process).  It's not due
to a lost console.  This change has the main parallel test runner
process and the child worker processes ignore sighup.

Covers:
https://llvm.org/bugs/show_bug.cgi?id=24846

llvm-svn: 248141
2015-09-21 05:42:26 +00:00
Chaoren Lin f3057583e8 Fix Linux bot.
llvm-svn: 248075
2015-09-19 00:57:11 +00:00
Greg Clayton 1827fc25ab Added a curses based way to see the test suite running. Works only where curses is implemented. Try it out with:
./dotest.py --results-formatter=test_results.Curses --results-file=/dev/stdout

llvm-svn: 248072
2015-09-19 00:39:09 +00:00
Todd Fiala 40b180e7ee test events: added optional value type to extra event key/val pairs
The test events had worker indexes coming across as strings.  I
want them to be ints.  worker_index now comes across as an int in
the dicationary.

The optional type can be specified with:
--event-add-entries key=val[:type][,key2=val2[:type2]...]
The type piece may be 'int' at this time.  That is all.  Otherwise
it will be a string.

llvm-svn: 248066
2015-09-18 23:46:30 +00:00
Todd Fiala f77f8ae450 test events: add test_filename to all test-related events.
The test_filename is the full path to the TestCase class's
implementation file.

llvm-svn: 248060
2015-09-18 22:57:04 +00:00
Todd Fiala e83f140833 test events: announce worker count in new initialize event
See the following for details:
http://reviews.llvm.org/D12987

llvm-svn: 248059
2015-09-18 22:45:31 +00:00
Enrico Granata f6fe302ee4 On Linux, if you can't actually locate the libc++ install, do not attempt to use it
The failure mode when one gets this wrong is quite gnarly to then walk oneself out of, and if you can't actually find the library, trying to build against it is fairly pointless anyway
This + my previous skip_if_library_missing change should make running the libc++ tests on a Linux machine without it much more seamless

llvm-svn: 248057
2015-09-18 22:26:34 +00:00
Todd Fiala 33896a9872 Adds parallel work queue index to test events, stdout/stderr results support.
See http://reviews.llvm.org/D12983 for details.

llvm-svn: 248036
2015-09-18 21:01:13 +00:00
Enrico Granata 0b5a6e3c08 Make libc++ tests skip themselves if libc++ is not actually loaded in the target
llvm-svn: 248028
2015-09-18 20:12:52 +00:00
Todd Fiala 8effde40ce xUnit test output: implemented proper xml escaping
Now does proper Unicode code region scanning for invalid XML
characters.  Strips out XML-invalid characters.

Does this for:
failure result: message, backtrace
error result: message, backtrace
skipped test: skip reason

pexpect timeouts were still generating characters that would break
XML readers (correctly so).

llvm-svn: 247998
2015-09-18 16:00:52 +00:00
Todd Fiala e7e911f06b xunit output: add backtraces; limit attribute
When pexpect errors occurred, the <error>/<failure> element's
message attribute could get too long and contain
invalid characters for xml attributes, even when quoted.
Particularly for pexpect failures.

Now <error> and <failure> entries truncate the message
attribute to contain the first line of the message.

<error> and <failure> blocks now contain both the
complete message and the backtrace (finally!) in the
text body of the error/failure element.

llvm-svn: 247973
2015-09-18 07:08:09 +00:00
Todd Fiala 038bf833c4 Fixed test runner output for Jenkins xUnit publish
The Jenkins JUnit publisher handled our output, but
the Jenkins xUnit plugin's JUnit support did not like
that we didn't have a <testsuites> element wrapping
everything.  They both work with this fix.

llvm-svn: 247962
2015-09-18 01:43:08 +00:00
Adrian McCarthy ab59a0f6e7 Get the process ID from a minidump.
llvm-svn: 247939
2015-09-17 20:52:29 +00:00
Chaoren Lin 1b2ba431e0 Fix TestMiSymbol for gcc-4.9 test.
llvm-svn: 247914
2015-09-17 18:38:55 +00:00
Dawn Perchik b01310008f [lldb-mi] Fix the handling of files in -data-info-line and -symbol-list-lines.
This fixes -data-info-line and -symbol-list-lines to parse the filename
and line correctly when line entries don't have the optional column
number and the filename contains a Windows drive letter. It also fixes
-symbol-list-lines when code from header files is generated.

Reviewed by: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12115

llvm-svn: 247899
2015-09-17 16:22:30 +00:00
Tamas Berghammer b4bcbb192f XFAIL step after crash tests on android-aarch64 API 21
Android-aarch64 for API21 uses sa_restore to return from a signal handler
what have no eh_frame specified.

llvm-svn: 247879
2015-09-17 10:05:21 +00:00
Pavel Labath 415b605249 Remove XTIMEOUT from TestAttachDenied on linux
llvm-svn: 247877
2015-09-17 09:24:44 +00:00
Enrico Granata fa6b278f9c Add the ability for formatter categories to be bound to one or more languages
What that does is it restricts formatters in those categories to only match to types coming from "compatible" source languages

llvm-svn: 247872
2015-09-17 00:14:50 +00:00
Chaoren Lin 88be1ac062 XFAIL TestCppNsImport for gcc-4.9 inclusive.
llvm-svn: 247863
2015-09-16 23:36:41 +00:00
Chaoren Lin d761a9532b Fix Makefile for Windows to Android tests.
Reviewers: zturner

Subscribers: tberghammer, lldb-commits, danalbert

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

llvm-svn: 247857
2015-09-16 21:51:51 +00:00
Chaoren Lin f59497dc92 XFAIL TestCppNsImport for gcc-4.9.
Works for gcc-4.8. A bug in gcc perhaps.

llvm-svn: 247855
2015-09-16 21:32:48 +00:00
Ryan Brown 65d4d5c3c6 Add an OperatingSystem plugin to support goroutines
The Go runtime schedules user level threads (goroutines) across real threads.
This adds an OS plugin to create memory threads for goroutines.
It supports the 1.4 and 1.5 go runtime.

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

llvm-svn: 247852
2015-09-16 21:20:44 +00:00
Paul Herman ea188fc318 Add using directives to the clang::DeclContext and fix decls for variables inside namespaces
Summary: Supports the parsing of the "using namespace XXX" and "using XXX::XXX" directives. Added ambiguity errors when it two decls with the same name are encountered (see comments in TestCppNsImport). Fixes using directives being duplicated for anonymous namespaces. Fixes GetDeclForUID for specification DIEs.

Reviewers: sivachandra, chaoren, clayborg

Subscribers: lldb-commits

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

llvm-svn: 247836
2015-09-16 18:48:30 +00:00
Zachary Turner b33bac9a70 Remove XFAIL from TestCppNsImport.
This test seems to be working now, probably due to r244764.

llvm-svn: 247830
2015-09-16 18:19:06 +00:00
Adrian McCarthy d9dbae599d Add first tests for mini-dump debugging.
Differential Revision: http://reviews.llvm.org/D12888

llvm-svn: 247829
2015-09-16 18:17:11 +00:00
Zachary Turner 4a58dd3035 Last set of XFAILs for Windows.
llvm-svn: 247825
2015-09-16 18:08:33 +00:00
Ed Maste 1a6ddd5149 Decorate flaky FreeBSD test
ExprCommandWithTimeoutsTestCase::expectedFailureFreeBSD had an
expectedFailureFreeBSD decorator, removed in r247799. It had been flakey
on the FreeBSD buildbot but passed locally. John Wolfe has since
observed a local failure, so add expectedFlakeyFreeBSD until we can
investigate and likely increase the timeout in the test.

llvm.org/pr19605 (FreeBSD)
llvm.org/pr20275 (equivalent Linux issue)

llvm-svn: 247822
2015-09-16 18:00:09 +00:00
Pavel Labath 5ef13dc8bd Upgrading TestCreateDuringInstructionStep from XFLAKY to XFAIL on android arm
the test is very often failing two times in a row, causing noise on the buildbots.

llvm-svn: 247805
2015-09-16 14:52:36 +00:00
Ed Maste 9d3d7131ad Remove expectedFailureFreeBSD from passing watchpoint tests
llvm.org/pr18832

llvm-svn: 247801
2015-09-16 14:05:20 +00:00
Ed Maste e84f409453 Remove expectedFailureFreeBSD from passing test
ExprCommandCallUserDefinedFunction::test_with_dwarf

llvm.org/pr21142

llvm-svn: 247800
2015-09-16 13:59:16 +00:00
Ed Maste d8ac5b41fc Remove expectedFailureFreeBSD from passing test
ExprCommandWithTimeoutsTestCase::expectedFailureFreeBSD

This test passes locally but was marked XFAIL due to failures on the
FreeBSD buildbot. That buildbot has been retired as it was overloaded,
and we will investigate again if this fails once a new buildbot is in
place.

llvm.org/pr19605

llvm-svn: 247799
2015-09-16 13:55:15 +00:00
Greg Clayton 4947b21cb9 Fix MacOSX since "imported" and "Imported::imported" are ambiguous. Test that we can read the global when specified with the global namespace and test that we can read "Imported::imported" correctly. The commented out test should be testing for ambiguity when just "imported" is evaluated as an expression, but that doesn't work yet.
llvm-svn: 247764
2015-09-16 00:42:50 +00:00
Paul Herman d628cbb999 Search variables based on clang::DeclContext and clang::Decl tree
Summary: SymbolFileDWARF now creates VarDecl and BlockDecl and adds them to the Decl tree. Then, in ClangExpressionDeclMap it uses the Decl tree to search for a variable. This fixes lots of variable scoping problems.

Reviewers: sivachandra, chaoren, spyffe, clayborg

Subscribers: tberghammer, jingham, lldb-commits

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

llvm-svn: 247746
2015-09-15 23:44:17 +00:00
Jason Molenda 63bd0db071 Clean up register naming conventions inside lldb.
"gcc" register numbers are now correctly referred to as "ehframe"
register numbers.  In almost all cases, ehframe and dwarf register
numbers are identical (the one exception is i386 darwin where ehframe
regnums were incorrect).

The old "gdb" register numbers, which I incorrectly thought were
stabs register numbers, are now referred to as "Process Plugin"
register numbers.  This is the register numbering scheme that the
remote process controller stub (lldb-server, gdbserver, core file
support, kdp server, remote jtag devices, etc) uses to refer to the
registers.  The process plugin register numbers may not be contiguous
- there are remote jtag devices that have gaps in their register
numbering schemes.

I removed all of the enums for "gdb" register numbers that we had
in lldb - these were meaningless - and I put LLDB_INVALID_REGNUM
in all of the register tables for the Process Plugin regnum slot.

This change is almost entirely mechnical; the one actual change in
here is to ProcessGDBRemote.cpp's ParseRegisters() which parses the
qXfer:features:read:target.xml response.  As it parses register
definitions from the xml, it will assign sequential numbers as the
eRegisterKindLLDB numbers (the lldb register numberings must be
sequential, without any gaps) and if the xml file specifies register
numbers, those will be used as the eRegisterKindProcessPlugin
register numbers (and those may have gaps).  A J-Link jtag device's
target.xml does contain a gap in register numbers, and it only 
specifies the register numbers for the registers after that gap.
The device supports many different ARM boards and probably selects
different part of its register file as appropriate.

http://reviews.llvm.org/D12791
<rdar://problem/22623262> 

llvm-svn: 247741
2015-09-15 23:20:34 +00:00
Todd Fiala 68615ce606 Add JUnit/XUnit-formatted output to the lldb test run system
Also introduces the test event system into our test runner framework.
See the following for details:
http://reviews.llvm.org/D12831

llvm-svn: 247722
2015-09-15 21:38:04 +00:00
Tamas Berghammer f304d5eb2b Skip TestGoASTContext on remote targets as it it not remote compatible
llvm-svn: 247690
2015-09-15 14:04:52 +00:00
Tamas Berghammer 41b1f73122 Add support for DW_OP_GNU_const_index to dwarf expression
DW_OP_GNU_const_index is a new opcode used when split dwarf is enabled

Differential revision: http://reviews.llvm.org/D12849

llvm-svn: 247672
2015-09-15 10:33:54 +00:00
Todd Fiala d089060d87 Mark TestMultipleDebuggers as flakey on Darwin.
See if this gets us past a few machines that are failing it when
it is expected to pass.

llvm-svn: 247665
2015-09-15 05:31:27 +00:00
Todd Fiala 25bddd3b52 Fixed up TestConstVariables for Linux/FreeBSD, take 2.
Marked XFAIL for:
clang - all versions < 3.5.  I verified the first version it passes on Linux is 3.5.
clang - version 3.7 (verified this fails)
clang - TOT/3.8 (verified this currently fails)

Ideally we dig into why this started failing and (hopefully) get this passing again.

llvm-svn: 247664
2015-09-15 04:53:14 +00:00
Chaoren Lin cadbf3dcf8 Revert "Fixup XFAIL marking on TestConstVariables for clang version"
Summary:
Linux with ToT clang (3.8) fails.

This reverts commit r247633.

Reviewers: tfiala

Subscribers: lldb-commits

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

llvm-svn: 247648
2015-09-15 00:52:00 +00:00
Todd Fiala 6d4742d8a1 Marked TestEvents test as flakey on Linux.
It's passing all the time for me (50/50), and was passing what
looks like 9/10 times for the originator.

llvm-svn: 247639
2015-09-14 23:35:00 +00:00
Todd Fiala 8ef7a5b4b7 Fixup XFAIL marking on TestConstVariables for clang version
Linux/clang on clang 3.6+ is passing this test.  As OS X was
in a similar position, I'm guessing this was fixed by a recent
compiler.  Might work on 3.5/3.4, but it is definitely working
on clang 3.6.  I didn't break out FreeBSD since this appears to
be related to a compiler fix.

llvm-svn: 247633
2015-09-14 23:17:15 +00:00
Ryan Brown 57bee1edfc Add a TypeSystem for Go
Add GoASTContext and DWARFASTParserGo to support go.

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

llvm-svn: 247629
2015-09-14 22:45:11 +00:00
Todd Fiala ff1fa40cdf Final unexpected success cleanup for OS X.
Top of tree is running with no unexpected successes with this
change, on latest available El Capitan and Xcode betas.

llvm-svn: 247608
2015-09-14 20:16:34 +00:00
Todd Fiala a22006183f Fixes lldb-server commandline test xpass for OS X and Linux; resolves llvm.org/pr20273
llvm-svn: 247605
2015-09-14 19:53:00 +00:00
Todd Fiala a85feabe3a Another round of macosx unexpected success corrections.
llvm-svn: 247602
2015-09-14 19:25:22 +00:00
Todd Fiala 7b6fbcf365 OS X unexpected success cleanup
TestPersistObjCPointeeType and TestObjCNewSyntax marked up to expect
success on clang >= 7.0.0.

TestMultipleDebuggers passed 25/25 times, taking off intermittent.
If this changes, I'll make sure it goes into a flaky/flakey category.

llvm-svn: 247601
2015-09-14 19:12:56 +00:00
Ed Maste a5f384487a Remove expectedFailureFreeBSD from now-passing test
ExprCommandCallUserDefinedFunction::test_with_dwarf

llvm.org/pr20274

llvm-svn: 247596
2015-09-14 18:50:23 +00:00
Ed Maste 6052b4cd02 Correct XFAIL OS list after r247576
In ConstVariableTestCase::test_with_dwarf_and_run_command - the test
fails with Clang (and presumably ICC) also on FreeBSD.

llvm-svn: 247594
2015-09-14 18:40:52 +00:00
Todd Fiala f9fe8b8d49 Fix up bad compiler spec on ConstVariableTestCase; fixup two more OS X unexpected successes.
llvm-svn: 247591
2015-09-14 18:34:36 +00:00
Todd Fiala 5c37863daf Cleaned up a few unexpected successes on OS X
TestCallStdStringFunction
TestCallWithTimeout
TestConstVariables
TestClassTypes

llvm-svn: 247576
2015-09-14 16:25:34 +00:00
Pavel Labath 11282dcac6 Skip TestBatchMode for remote platforms
the test does not know how to run executables on the remote platform.

llvm-svn: 247574
2015-09-14 16:11:11 +00:00
Todd Fiala e68a15e7bc Removed XFAIL marker from passing tests, rdars 18684124, 15367233
Related to these two test case classes:
test/driver/batch_mode/TestBatchMode.py
test/functionalities/inferior-assert/TestInferiorAssert.py

llvm-svn: 247567
2015-09-14 14:48:53 +00:00
Ed Maste 703c30904e Add expectedFlakeyFreeBSD to TestMultithreaded tests
One or more of these tests failed in 25 of 100 dotest.py runs.

llvm-svn: 247566
2015-09-14 14:42:22 +00:00
Ed Maste 32868feeee Enable StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf on FreeBSD
This test passes locally but was disabled due to pexpect issues on the
FreeBSD buildbot. That buildbot has been retired as it was overloaded,
and we will investigate again if this fails once a new buildbot is in
place. Noted by John Wolfe.

llvm.org/pr22784

This re-applies r247013.

llvm-svn: 247565
2015-09-14 14:41:58 +00:00
Ed Maste 906d7be922 Remove expectedFailureFreeBSD from passing test_inferior_asserting_disassemble
llvm.org/pr18533

llvm-svn: 247564
2015-09-14 14:40:22 +00:00
Ed Maste e1daedfbb4 Remove expectedFailureFreeBSD from passing test_with_dwarf_formatters_api
llvm.org/pr24282

llvm-svn: 247563
2015-09-14 14:31:46 +00:00
Ed Maste 149a352eb3 Remove expectedFailureFreeBSD from passing test_process_list
This test passes locally but was marked XFAIL due to failures on the
FreeBSD buildbot. That buildbot has been retired as it was overloaded,
and we will investigate again if this fails once a new buildbot is in
place.

llvm.org/pr23747

llvm-svn: 247562
2015-09-14 14:27:05 +00:00
Pavel Labath 7cc26d1765 Remove XTIMEOUT from TestChangeProcessGroup on linux
llvm-svn: 247552
2015-09-14 12:31:47 +00:00
Zachary Turner 14181dbb57 Fix a thinko causing test logs for crashes to not get written.
llvm-svn: 247479
2015-09-11 21:27:37 +00:00
Oleksiy Vyalov b00792e2dc Add missed import lldbtest.
llvm-svn: 247469
2015-09-11 20:46:46 +00:00
Zachary Turner 9c7b08e609 XFAIL miscellaneous tests on windows.
llvm.org/pr24778

llvm-svn: 247460
2015-09-11 20:01:24 +00:00
Zachary Turner 3109990048 XFAIL 2 breakpoint tests on Windows.
llvm.org/pr24777

llvm-svn: 247459
2015-09-11 20:00:39 +00:00
Zachary Turner 0df2865083 XFAIL some more tests related to value api
llvm.org/pr24772

llvm-svn: 247458
2015-09-11 20:00:25 +00:00
Zachary Turner db8201f11c XFAIL TestDisassembleBreakpoint.
This is a trivial issue to fix, just marking it for later.
Windows prints function signatures a bit differently, and the
test expects a specific format.

llvm-svn: 247457
2015-09-11 20:00:09 +00:00
Zachary Turner 608cb82e46 XFAIL tests that try to call a function in the inferior.
llvm.org/pr21765

llvm-svn: 247456
2015-09-11 20:00:00 +00:00
Zachary Turner 6e8cbc0ff2 XFAIL some C++ language specific tests on Windows.
http://llvm.org/pr24764

llvm-svn: 247455
2015-09-11 19:59:39 +00:00
Ed Maste 8bc3f5cd50 Demote TestAttachResume back to @expectedFailureFreeBSD
It turns out it fails consistently for me.

llvm.org/pr19310

llvm-svn: 247411
2015-09-11 13:43:07 +00:00
Ilia K dae2e564d8 Fix an AttributeError in dotest.py if --executable points to a wrong place
This patch fixes the following case:
```
  $ ./dotest.py --executable=~/p/llvm/build_ninja/bin/lldb tools/lldb-mi/
  '~/p/llvm/build_ninja/bin/lldb' is not a path to a valid executable
  Traceback (most recent call last):
    File "./dotest.py", line 1306, in <module>
      setupSysPath()
    File "./dotest.py", line 1004, in setupSysPath
      if not lldbtest_config.lldbExec:
  AttributeError: 'module' object has no attribute 'lldbExec'
```

And with this fix:
```
  $ ./dotest.py --executable=~/p/llvm/build_ninja/bin/lldb tools/lldb-mi/
  '~/p/llvm/build_ninja/bin/lldb' is not a path to a valid executable
  The 'lldb' executable cannot be located.  Some of the tests may not be run as a result.
```

llvm-svn: 247256
2015-09-10 09:24:43 +00:00
Ed Maste 81f3ccb505 For now skip ThreadSpecificBreakTestCase on FreeBSD
It often hangs or times out, and obscures issues with other tests.
Just skip it for now (until the FreeBSD test suite is producing
consistent results) so that we can get a buildbot back.

Previous investigation (for failures) in llvm.org/pr18522

llvm-svn: 247190
2015-09-09 21:00:10 +00:00
Zachary Turner 1132152db4 Don't allow duplicate names for tests.
We had 2 tests named TestCPPBreakpoints.py.  If one of those tests
failed, both of them would be reported as failures and contribute
to the failure count.  There may be other examples of duplicate
test names, and we should fix those as we find them.

llvm-svn: 247173
2015-09-09 18:25:13 +00:00
Ed Maste d7b073e0aa Update expectedFailureFreeBSD to expectedFlakeyFreeBSD for intermittent tests
Due to LLDB or test race conditions these tests do not pass
consistently.

llvm.org/pr15037
llvm.org/pr19310
llvm.org/pr22611

llvm-svn: 247143
2015-09-09 13:15:14 +00:00
Ed Maste bfd03da5ba XFAIL TestFormatters on FreeBSD
The test is hitting an assertion in Clang.  This is an extension of
r246766.

llvm.org/pr24691

llvm-svn: 247141
2015-09-09 13:10:33 +00:00
Tamas Berghammer 1535bebac6 Remove the dwo files in the cleanup stage of the tests
The dwo files are generated when the tests run with split dwarf info.

llvm-svn: 247130
2015-09-09 10:20:30 +00:00
Todd Fiala a195adde00 Fix regressions in dotest.py when passing filters or directories.
See https://llvm.org/bugs/show_bug.cgi?id=24708 for details.
Using '-f FILTER' or unnamed arguments (directories) to dotest.py
will now force no-multiprocessing mode.  This stops a bombardment
of test output spam when following the instructions we provide
in a test session trace for rerunning the test.

llvm-svn: 247101
2015-09-08 23:22:19 +00:00
Oleksiy Vyalov c57b482fc2 Reverting r247000 since it's causing TestRegisters.test_fp_special_purpose_register_read to fail on OSX.
llvm-svn: 247090
2015-09-08 22:41:13 +00:00
Todd Fiala 8cbeed3248 dotest.py ctrl-c support, addition of --test-runner-name option.
See http://reviews.llvm.org/D12651 for more details.

For the parallel test runner, -v now also implies --output-on-success.

llvm-svn: 247084
2015-09-08 22:22:33 +00:00
Ed Maste fa84aa3fa1 Revert "Enable StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf on FreeBSD"
And update the comment describing the reason this test is skipped.
Unlike the issue described llvm.org/pr22784 this test sometimes causes
a hang on my local machine and is not just a problem on the retired
buildbot.

This reverts commit r247013.

llvm-svn: 247024
2015-09-08 16:35:28 +00:00
Ed Maste 109dba05b1 Enable StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf on FreeBSD
This test passes locally but was disabled due to pexpect issues on the
FreeBSD buildbot. That buildbot has been retired as it was overloaded,
and we will investigate again if this fails once a new buildbot is in
place. Noted by John Wolfe.

llvm.org/pr22784

llvm-svn: 247013
2015-09-08 13:33:21 +00:00
Ed Maste bd2a41a656 Remove expectedFailureFreeBSD from passing PluginCommandTestCase::test_load_plugin
This test was failing due to a libc++ vs libsdc++ conflict which should
be fixed by r200646.

llvm.org/pr17430

llvm-svn: 247012
2015-09-08 13:27:27 +00:00
Ed Maste 75a5de99d9 Exception registers aren't supported outside of Darwin
Apply test update from r234992 to FreeBSD

llvm-svn: 247009
2015-09-08 13:05:15 +00:00
Abhishek Aggarwal 139a096dce Bug 24733: TestRegisters.py for Clang inferiors
Summary:
  - Bug 24457 can now be tested for inferiors compiled
    by clang compiler also.
    
  - A generic test case for GCC and Clang inferiors:
    -- Works even when Clang and GCC produce different
       assembly for the same inferior.
  
  - Refer Differential Revision: http://reviews.llvm.org/D12677

Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>
llvm-svn: 247000
2015-09-08 10:19:37 +00:00
Tamas Berghammer 25d41fa148 XFAIL single_step_only_steps_one_instruction related tests on arm/aarch64
llvm-svn: 246972
2015-09-07 16:01:26 +00:00
Tamas Berghammer cf6f92a870 XFAIL TestBuiltinTrap on android-arm (gcc bug)
llvm-svn: 246971
2015-09-07 15:50:19 +00:00
Tamas Berghammer 72eea4e644 XFAIL test_fp_special_purpose_register_read on android i386
llvm-svn: 246970
2015-09-07 15:18:24 +00:00
Pavel Labath 63a579c752 Mark TestCreateDuringInstructionStep as flaky on android arm
llvm-svn: 246966
2015-09-07 12:15:27 +00:00
Hafiz Abid Qadeer 8647f4381f Fix -data-evaluate-expression for array.
Summary:
For an array declared like "blk[2][3]", this command was showing:
-data-evaluate-expression blk
^done,value="{[0] = [3], [1] = [3]}"

After this fix, it shows:
-data-evaluate-expression blk
^done,value="{[0] = {[0] = 1, [1] = 2, [2] = 3}, [1] = {[0] = 4, [1] = 5, [2] = 6}}"

The code to do the right thing was already available and used by other commands.
So I have just used that and removed the half-baked previous implementation.

Reviewers: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 246965
2015-09-07 12:00:51 +00:00
Pavel Labath 058faef6ce Skip RegisterCommandsTestCase.test_fp_register_write on Android i386
it appears a kernel bug is preventing us from writing into the register.

llvm-svn: 246964
2015-09-07 11:59:01 +00:00
Pavel Labath b5d5ead8c9 Fixup TestRegisters after r246955
- clang is picky about inline assembly: add the correct instruction size suffix
- mark the new test as expectedFailureClang: the test fails as the breakpoint is set in the wrong
  place

llvm-svn: 246957
2015-09-07 08:54:34 +00:00
Pavel Labath 53159c9b78 Extend the XFAIL for TestMiBreak
the test is occasionally failing on linux for all tested scenarios.

llvm-svn: 246956
2015-09-07 07:58:29 +00:00
Abhishek Aggarwal 7f658edd61 Bug 24457 - X87 FPU Special Purpose Registers
Summary:
  - For 'register read --all' command on x86_64-Linux Platform:

      -- Provide correct values of X87 FPU Special Purpose Registers
      -- Both 32-bit & 64-bit inferiors give correct values on this
         Platform

  - Added a Test Vector:
      -- To verify the expected behaviour of the command

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

Reviewers: ashok.thirumurthi, granata.enrico, tfiala, clayborg

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

llvm-svn: 246955
2015-09-07 07:40:16 +00:00
Siva Chandra fdc11d5895 [TestMiBreak] Replace expectedFlakeyLinux with an appropriate expectedFailureAll
Reviewers: chaoren

Subscribers: lldb-commits

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

llvm-svn: 246894
2015-09-04 23:11:38 +00:00
Enrico Granata 964211f25f Add a --language (-l) option to type category {enable|disable} to allow people to turn on and off formatters for a given language
llvm-svn: 246884
2015-09-04 22:07:48 +00:00
Enrico Granata 33e97e63a5 Move the C++ data formatters to the C++ language plugin
llvm-svn: 246873
2015-09-04 21:01:18 +00:00
Adrian McCarthy a729204103 Sleep-and-retry after a failure to delete a log file, which may be because antimalware is holding the handle to the just-created file.
Differential Revision: http://reviews.llvm.org/D12641

llvm-svn: 246870
2015-09-04 20:48:48 +00:00
Pavel Labath cb405bf311 Add a repro case for bug llvm.org/pr24702
llvm-svn: 246845
2015-09-04 10:21:15 +00:00
Dawn Perchik 009d110de4 Set the default language to use when evaluating to that of the frame's CU.
* Use the frame's context (instead of just the target's) when evaluating,
  so that the language of the frame's CU can be used to select the
  compiler and/or compiler options to use when parsing the expression.
  This allows for modules built with mixed languages to be parsed in
  the context of their frame. 
* Add all C and C++ language variants when determining the language options
  to set.
* Enable C++ language options when language is C or ObjC as a workaround since
  the expression parser uses features of C++ to capture values.
* Enable ObjC language options when language is C++ as a workaround for ObjC
  requirements.
* Disable C++11 language options when language is C++03.
* Add test TestMixedLanguages.py to check that the language being used
  for evaluation is that of the frame.
* Fix test TestExprOptions.py to check for C++11 instead of C++ since C++ has
  to be enabled for C, and remove redundant expr --language test for ObjC.
* Fix TestPersistentPtrUpdate.py to not require C++11 in C.

Reviewed by: clayborg, spyffe, jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11102

llvm-svn: 246829
2015-09-04 01:02:30 +00:00
Siva Chandra 0f4873d7d0 Lookup function using full name if one with mangled name is not found.
Summary:
Remove expected failure decorators from tests which now should start
passing.

Reviewers: clayborg, spyffe

Subscribers: lldb-commits

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

llvm-svn: 246820
2015-09-03 23:27:10 +00:00
Zachary Turner b8dec76f26 Protect dotest.py with an if __name__ == "__main__"
llvm-svn: 246816
2015-09-03 23:03:16 +00:00
Todd Fiala fed95660f3 Roll dosep.py parallel test runner into dotest.py command line
See the following for details:
http://reviews.llvm.org/D12587

llvm-svn: 246794
2015-09-03 18:58:44 +00:00
Ying Chen e14653d9f0 Fix TestCompletion.py failure on Darwin after r246639
Summary: - send empty line for multiple commands to complete

Reviewers: tberghammer

Subscribers: lldb-commits

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

llvm-svn: 246791
2015-09-03 18:29:27 +00:00
Zachary Turner c7a52d594a i386 and i686 are equivalent, update the test accordingly.
llvm-svn: 246783
2015-09-03 16:41:31 +00:00
Pavel Labath 01c4a45c51 Mark TestAttachResume as flaky on linux
There is a more race condition regarding process detach, which this test exposes, marking as
flaky until it is fixed.

llvm-svn: 246777
2015-09-03 15:44:16 +00:00
Pavel Labath 4bff4d0182 XFAIL TestFormatters on android (llvm.org/pr24691)
the test is hitting an assertion in clang.

llvm-svn: 246766
2015-09-03 13:52:29 +00:00
Pavel Labath b18469f5d7 Enable TestFdLeak on linux
it has been consistently passing at least the last 100 builds on the bot.

llvm-svn: 246761
2015-09-03 12:00:15 +00:00
Pavel Labath 5055685cda Fix deadlock while attaching to inferiors
Summary:
There was a race condition in the AsyncThread, where we would end up sending a vAttach
notification to the thread before it got a chance set up its listener (this can be reproduced by
adding a sleep() at the very beginning of ProcessGDBRemote::AsyncThread()). This event would then
get lost and we LLDB would deadlock. I fix this by setting up the listener early on, in the
ProcessGDBRemote constructor.

This should improve the stability of all attach tests. For now, I am removing XTIMEOUT from
TestAttachResume, and will watch the buildbots for signs of trouble.

Reviewers: clayborg, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 246756
2015-09-03 09:36:22 +00:00
Zachary Turner a5bebcc5ea Skip the rest of the Objective C tests on Windows.
llvm-svn: 246726
2015-09-02 22:41:28 +00:00
Zachary Turner 77377408f8 XFAIL more watchpoint tests on Windows.
llvm.org/pr24446

llvm-svn: 246725
2015-09-02 22:41:15 +00:00
Zachary Turner 11ac206f67 XFAIL more bugs that depend on dynamic value resolution.
llvm.org/pr24663

llvm-svn: 246724
2015-09-02 22:40:59 +00:00
Zachary Turner 428ffcfa8d XFAIL tests that rely on exact thread counts.
On Windows we have to deal with OS created threads, so we can never
know the exact number of threads.

llvm.org/pr24681

llvm-svn: 246723
2015-09-02 22:40:40 +00:00
Zachary Turner 853037101f Change Windows XFAIL comment for TestCompletion.py
Instead of fixing these tests by finding a pexpect replacement,
this set of tests can be fixed by re-writing the test to not use
pexpect.

llvm.org/pr24679

llvm-svn: 246671
2015-09-02 16:47:37 +00:00
Zachary Turner 656ef0b277 XFAIL tests on Windows that are failing to resolve breakpoints.
llvm.org/pr24668

llvm-svn: 246670
2015-09-02 16:47:29 +00:00
Zachary Turner 991dae85d9 [Windows] XFAIL test that depend on dynamic value types.
llvm-svn: 246669
2015-09-02 16:47:13 +00:00
Zachary Turner fbb79bb789 XFAIL test_thread_state_after_continue on Windows.
https://llvm.org/pr24660

llvm-svn: 246668
2015-09-02 16:47:01 +00:00
Pavel Labath e457c8862d Enable a couple of tests in TestExitDuringStep on linux
tests have been reliably passing at least the last 100 runs of the build bot.

llvm-svn: 246647
2015-09-02 13:01:21 +00:00
Pavel Labath 8a58af3398 XFAIL new tests in TestCompletion on windows due to missing pexpect
llvm-svn: 246644
2015-09-02 12:09:31 +00:00
Tamas Berghammer 89d3f090b2 Fix tab completion for command arguments containing spaces
If a command argument contains a space then it have to be escaped with
backslash signs so the argument parsing logic can parse it properly.
This CL fixes the tab completion code for the arguments to create
complitions with correctly escaped strings.

Differential revision: http://reviews.llvm.org/D12531

llvm-svn: 246639
2015-09-02 10:35:27 +00:00
Pavel Labath 5dcb02501f Address flakyness in TestAttachResume
Summary:
The test (among other things) attempts to verify that detaching works while the inferior is
running. However, this was racy since the inferior could end up stopping again before we got a
chance to detach from it (the test could be made to fail reliably by inserting a sleep just after
the last "continue" command). The reason for the stop was that we had a breakpoint set in a place
that can be hit by multiple threads, and we stop because another thread hit a breakpoint.

I fix this by moving the breakpoint to a place that is reachable from only one thread. I also
make sure that the same thread cannot hit the breakpoint if we are exceptionaly slow by flipping
a flag which makes the breakpoint unreachable (I cannot just disable or delete the breakpoint as
the test makes it a point to try detaching while breakpoints are still set).

Another source or racyness was that the test verified that the process resumes and
stops after a "continue". However, if these two events happened too fast, the initial start event
would be lost, and the test would end up confused. I have implemented this in a safer manner and
made a utility function out of it, as I know of a couple of other tests which need the same
functionality.

Reviewers: zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 246623
2015-09-02 09:12:28 +00:00
Zachary Turner 81ab77d424 Un-XFAIL a couple tests that are now passing.
llvm-svn: 246570
2015-09-01 18:25:05 +00:00
Zachary Turner bc556d382b XFAIL TestHelloWorld on Windows.
https://llvm.org/pr24600

llvm-svn: 246569
2015-09-01 18:24:49 +00:00
Ed Maste 8bb3d04adc Remove expectedFailureFreeBSD for passing pexpect tests
These tests work when run locally. They had been occasionally failing
on the FreeBSD buildbot due to pexpect issues. That buildbot is
currently down, and I expect the replacement will not have this issue.

llvm.org/pr22784

llvm-svn: 246490
2015-08-31 21:37:15 +00:00
Zachary Turner b1490b6172 Don't throw an exception when module cleanup fails.
Just because one test fails to clean up correctly, it should not
prevent other tests from attempting to run.

llvm-svn: 246063
2015-08-26 19:44:56 +00:00
Zachary Turner 0844d8db4c On Windows, use 'del' instead of 'rm' to delete the test executable.
This is a nasty hack to work around the issue described in
https://llvm.org/pr24589

llvm-svn: 246062
2015-08-26 19:44:45 +00:00
Zachary Turner 893b09e1af XFAIL environment variable setting test on Windows.
Fixing this is tracked by https://llvm.org/pr24579

llvm-svn: 246061
2015-08-26 19:44:36 +00:00
Zachary Turner 93bf79a719 Disable Objective C test on non-Darwin platforms.
llvm-svn: 246060
2015-08-26 19:44:28 +00:00
Dawn Perchik 2b6eab3273 Skip test which is causing ERRORs in dotest.py after r237053
This test runs fine on its own, but leaves python in a bad state to
where all tests that run after it error out.  See llvm.org/pr24575.
This resolves the concerns raised in http://reviews.llvm.org/rL237053.

Reviewed by: clayborg, ted
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12329

llvm-svn: 246043
2015-08-26 18:16:45 +00:00
Enrico Granata 54ed7e18f2 Rename all functionalities/data-formatter test case with radar bug numbers in them to more meaningful names
llvm-svn: 245993
2015-08-25 23:55:10 +00:00
Zachary Turner 2cd2f39ea5 XFAIL TestQuoting on Windows.
A couple of edge cases are broken with regards to quote handling.

Fixing this is tracked by http://llvm.org/pr24557

llvm-svn: 245984
2015-08-25 22:25:33 +00:00
Zachary Turner d1c5b6f66b Fix a bunch of portability issues in test executables.
llvm-svn: 245983
2015-08-25 22:25:21 +00:00
Pavel Labath db2f8a3cfd Add the correct decorator to TestCreateDuringInstructionStep
apparently, just placing the file under linux/ does not make the test linux specific. :)

llvm-svn: 245848
2015-08-24 15:49:12 +00:00
Pavel Labath d3aaa18e5d Fix TestCreateDuringInstructionStep on i386
llvm-svn: 245842
2015-08-24 14:24:20 +00:00
Pavel Labath 84f43f36f3 Make TestCreateDuringInstructionStep linux-specific
Summary:
There were a number of issues about the way I have designed this test originally:
- it relied on single-stepping through large parts of code, which was slow and unreliable
- the threading libraries interfered with the exact thing we wanted to test

For this reason, I have rewritted the test using low-level linux api, which allows the test to be
much more focused. The functionality for other platforms will need to be tested separately.

Reviewers: tberghammer

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 245838
2015-08-24 13:23:48 +00:00
Tamas Berghammer e5197af450 Fix teardown cleanup in TestRecursiveTypes
llvm-svn: 245836
2015-08-24 10:31:36 +00:00
Zachary Turner 2156787b96 XFAIL pthreads test on Windows.
This test needs to be ported to c++ threads.

llvm-svn: 245751
2015-08-21 22:11:50 +00:00
Zachary Turner b20bafaec8 Fix TestPaths on Windows.
llvm-svn: 245750
2015-08-21 22:11:40 +00:00
Zachary Turner 7c9e1c0bef XFAIL the last Windows test that calls a function in the target.
llvm-svn: 245749
2015-08-21 22:11:31 +00:00
Zachary Turner 6df0cbc040 Skip TestCreateAfterAttach on Windows.
As with every other platform, this test occasionally hangs on
Windows.

llvm-svn: 245748
2015-08-21 22:11:21 +00:00
Zachary Turner 28ee0cd30e XFAIL Tests that require C++ exceptions on Windows.
clang-cl does not yet support C++ exceptions, so these tests will
not even compile.

Re-enabling these tests is tracked by llvm.org/pr24538

llvm-svn: 245747
2015-08-21 22:11:09 +00:00
Pavel Labath b3b1f467ce Increase timeout in TestExpressionInSyscall
test times out on the windows->android buildbot (probably due to android emulator being slow)

llvm-svn: 245691
2015-08-21 10:52:02 +00:00
Pavel Labath 57f4f1737f Add repro test case for bug #24530
llvm-svn: 245687
2015-08-21 10:38:31 +00:00
Zachary Turner 075c6ee843 Change TestBSDArchives to expectedFailureWindows.
llvm-svn: 245631
2015-08-20 22:25:45 +00:00
Zachary Turner 1844284403 [Windows] XFAIL tests that require calling a function in target.
This has known issues on Windows.  Fixing this is tracked by
http://llvm.org/pr21765

llvm-svn: 245630
2015-08-20 22:09:35 +00:00
Zachary Turner 02ca878711 XFAIL breakpoint tests on Windows
llvm.org/pr24528 tracks fixing this test.

llvm-svn: 245629
2015-08-20 22:09:08 +00:00
Zachary Turner 9509c356db XFAIL TestBSDArchives.py on Windows
llvm.org/pr24527 tracks this bug.  Makefile.rules does not know
how to build static libraries on Windows.

llvm-svn: 245628
2015-08-20 22:08:57 +00:00
Zachary Turner 6313884914 XFAIL TestAnonymous.test_expr_null_with_dwarf on Windows.
This bug is tracked in llvm.org/pr21550, and also reproduces on
FreeBSD apparently.

llvm-svn: 245627
2015-08-20 22:08:48 +00:00
Pavel Labath c6a144b0aa Increase timeout in TestCallWithTimeout to reduce flakyness
The test was flaky on the android buildbot, because the 10ms test completed before we got a
chance to interrupt it. I increase the duration to 50ms to hopefully get more consistent results.

llvm-svn: 245555
2015-08-20 12:12:09 +00:00
Pavel Labath 090152bd1f Skip TestCreateDuringInstructionStep on android aarch64
we are unable to step through _M_start_thread due to atomic instruction sequences.

llvm-svn: 245552
2015-08-20 11:37:19 +00:00
Pavel Labath 0e1d729b75 [NativeProcessLinux] Fix a bug in instruction-stepping over thread creation
Summary:
There was a bug in NativeProcessLinux, where doing an instruction-level single-step over the
thread-creation syscall resulted in loss of control over the inferior. This happened because
after the inferior entered the thread-creation maintenance stop, we unconditionally performed a
PTRACE_CONT, even though the original intention was to do a PTRACE_SINGLESTEP. This is fixed by
storing the original state of the thread before the stop (stepping or running) and then
performing the appropriate action when resuming.

I also get rid of the callback in the ThreadContext structure, which stored the lambda used to
resume the thread, but which was not used consistently.

A test verifying the correctness of the new behavior is included.

Reviewers: ovyalov, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 245545
2015-08-20 09:06:12 +00:00
Chaoren Lin 99f25befee XTIMEOUT TestIntegerTypesExpr for Darwin.
llvm-svn: 245532
2015-08-20 01:26:57 +00:00
Paul Herman 6e0fe6fbf5 Fix tests to work on remote targets.
llvm-svn: 245515
2015-08-19 22:44:48 +00:00
Paul Herman 641e1987d6 Fix evaluation of global operators in C++
llvm-svn: 245508
2015-08-19 21:44:56 +00:00
Paul Herman 493bb398e7 Improve tests regarding imported namespaces and chained calls in C++
llvm-svn: 245505
2015-08-19 21:23:01 +00:00
Chaoren Lin b0138025ec XTIMEOUT TestChangeProcessGroup for Linux.
llvm-svn: 245477
2015-08-19 18:39:25 +00:00
Chaoren Lin febef1b017 XTIMEOUT TestEvents and TestThreadStates for Windows to Android.
llvm-svn: 245464
2015-08-19 17:22:12 +00:00
Chaoren Lin d904371271 XTIMEOUT TestExitDuringStep for Darwin.
llvm-svn: 245460
2015-08-19 17:13:02 +00:00
Pavel Labath 4b48595adf Increase timeout in TestCallThatRestarts
the test was failing on android because processing 30 signals involved a lot of round-trips,
which was not possible in the 0.5s default timeout. After the increase the test seems to pass
reliably.

llvm-svn: 245448
2015-08-19 15:24:02 +00:00
Pavel Labath 14e21925a5 Add TestCrashDuringStep
this tests that a crash that happens during instruction step is reported correctly.

llvm-svn: 245440
2015-08-19 14:15:45 +00:00
Pavel Labath 78856474fb On Linux, clear the signal mask of the launched inferior
Summary:
Due to fork()/execve(), the launched inferior inherits the signal mask of its parent (lldb-server). But because lldb-server modifies its signal mask (It blocks SIGCHLD, for example), the inferior starts with some signals being initially blocked.

One consequence is that TestCallThatRestarts.ExprCommandThatRestartsTestCase (test/expression_command/call-restarts) fails because sigchld_handler() in lotta-signals.c is not called, due to the SIGCHLD signal being blocked.

To prevent the signal masking done by lldb-server from affecting the created inferior, the signal mask of the inferior is now cleared before the execve().

Patch by: Yacine Belkadi

Reviewers: ovyalov, labath

Subscribers: lldb-commits

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

llvm-svn: 245436
2015-08-19 13:47:57 +00:00
Chaoren Lin 9a379c19a9 XFAIL TestCppScope for Darwin.
llvm-svn: 245418
2015-08-19 06:21:09 +00:00
Chaoren Lin 464be90e6d Fix TestCppNsImport and TestCppScope for remote tests.
llvm-svn: 245412
2015-08-19 04:08:56 +00:00
Chaoren Lin 46fc8168c2 XFAIL TestCppChainedCalls for GCC.
llvm-svn: 245407
2015-08-19 02:55:33 +00:00
Paul Herman 10bc1a4e83 Fix resolution conflict between global and class static variables in C++
llvm-svn: 245381
2015-08-18 22:46:57 +00:00
Paul Herman b058fb47db Test chaned function calls and imported namespaces in C++
llvm-svn: 245380
2015-08-18 22:43:37 +00:00
Zachary Turner 913f776ff9 Fix TestArrayTypes on Windows.
Whether or not frames print their tid in hex or decimal is apparently
hardcoded to depend on the operating system.  For now a comment was
added that this should be changed to a more sane check (for example
a setting), and the OS check is updated to do the right thing for
Windows.

llvm-svn: 245371
2015-08-18 22:25:40 +00:00
Oleksiy Vyalov 6e295cd179 Mark TestCModules as XFAIL on OSX.
http://reviews.llvm.org/D11962

llvm-svn: 245357
2015-08-18 21:20:25 +00:00
Zachary Turner 2878bf44b1 [Windows] XFAIL tests that depend on expression name lookup.
Name lookup doesn't work properly with Windows targets.  This is
most likely due to issues with name mangling, although there is at
least one set of debug info related issues as well, since some of
the name lookup requests appear to be failing on types rather than
symbols.

Specifically, this patch XFAILS the following set of tests:

TestChar1632T.py
TestRdar12991846.py
TestConstVariables.py
TestCallCPPFunction.py
TestCallStopAndContinue.py
TestCallUserDefinedFunction.py
TestCModules.py
TestCPPThis.py
TestExprs2.py
TestOverloadedFunctions.py
TestRvalueReferences.py

And fixing the underlying issue is tracked in http://llvm.org/pr24489

llvm-svn: 245338
2015-08-18 20:01:28 +00:00
Siva Chandra 9851b1f62b [ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclaration
Summary:
Returns the declaration of the parent (non-synthetic or static) value.


Reviewers: granata.enrico, clayborg

Subscribers: lldb-commits

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

llvm-svn: 245319
2015-08-18 17:56:06 +00:00
Chaoren Lin dea51da7a5 Revert part of "Convert all use of pthreads in tests to c++11 threads."
TestExprDoesntBlock started failing because deadlocks behave differently with
pthread_mutex and std::mutex.

This reverts part of commit r245234.

llvm-svn: 245262
2015-08-18 00:27:08 +00:00
Zachary Turner 8778fea0bb Convert all use of pthreads in tests to c++11 threads.
This eliminates portability issues among platforms that don't have
a pthreads implementation.

Differential Revision: http://reviews.llvm.org/D12043
Reviewed By: Greg Clayton

llvm-svn: 245234
2015-08-17 20:12:04 +00:00
Zachary Turner 398f9ed95c Enable settings test for i686 as well as i386.
llvm-svn: 245128
2015-08-14 23:29:32 +00:00
Zachary Turner 793d997585 Make skipUnlessArch decorator actually skip instead of XFAIL.
llvm-svn: 245127
2015-08-14 23:29:24 +00:00
Zachary Turner 6e19fe9954 XFAIL some data formatter tests on Windows.
Fixing these bugs is tracked by http://llvm.org/pr24462.

llvm-svn: 245126
2015-08-14 23:29:17 +00:00
Zachary Turner c714b07433 Disable libstdc++ and libcxx data formatter tests on Windows.
Neither of these libraries has been ported to Windows.  Eventually
if they are ever ported we can re-enable these tests.  But more
immediately what we need to do is add new data formatters for
MSVC's STL implementation.  This is tracked in
http://llvm.org/pr24460.

llvm-svn: 245125
2015-08-14 23:28:49 +00:00
Greg Clayton ecc7443384 Don't test the output of "target modules dump symfile a.out" as this isn't something we should be testing for. This makes this test pass again.
llvm-svn: 245078
2015-08-14 18:18:07 +00:00
Zachary Turner 4cceca7c15 Update dosep to print unexpected successes at the end.
llvm-svn: 245066
2015-08-14 16:45:32 +00:00
Zachary Turner 9ff56b2ec7 Remove Unicode byte-order mark from python files.
This was caused by a bug in the PTVS source file editor, which has
since been fixed and awaiting a new release.  For now people using
this editor need to remember to manually remove this before
committing a file.

llvm-svn: 244963
2015-08-13 22:05:54 +00:00
Zachary Turner ba2ab8e92b Disable lldb-mi tests on Windows.
Most were already XFAIL'ed, but the reason for the XFAIL is that
we don't have a suitable pexpect implementation on Windows.  This
isn't going to change unintentionally, so there is no reason to
XFAIL them as opposed to just skip them.

llvm.org/pr22274 tracks finding a suitable pexpect module for
Windows, which should fix many of these issues.  llvm.org/pr24452
tracks the larger issue of making the entire lldb-mi test suite
work on Windows, of which finding a pexpect module is just one
component.

llvm-svn: 244951
2015-08-13 20:50:17 +00:00