Commit Graph

3491 Commits

Author SHA1 Message Date
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