Commit Graph

3638 Commits

Author SHA1 Message Date
Zachary Turner ff890daf12 Convert print statements to print function calls.
This patch was generating by running `2to3` on the files in the
lldb/test directory.  This patch should be NFC, but it does
introduce the `from __future__ import print_function` line, which
will break future uses of the print statement.

llvm-svn: 250763
2015-10-19 23:45:41 +00:00
Enrico Granata a512103bdf Add a flakey category for flakey tests
llvm-svn: 250750
2015-10-19 22:53:34 +00:00
Enrico Granata 238de51eed Teach the lldbinline test cases to run in DWO mode
llvm-svn: 250734
2015-10-19 20:40:50 +00:00
Greg Clayton 3fd1f746c3 Split getting the key from a window from the code that handles the key.
llvm-svn: 250580
2015-10-16 23:34:40 +00:00
Adrian McCarthy 128d4ab71f Skip hanging watchpoint test on Windows (rather than just xfailing).
llvm-svn: 250576
2015-10-16 23:19:22 +00:00
Greg Clayton c12cc596ed More general fixes to the tree view and BoxedPanel.
llvm-svn: 250478
2015-10-16 00:34:18 +00:00
Adrian McCarthy 6ecdbc87e6 Factor the execution of the test method into a separate function to ensure that any exceptions that are thrown go out of scope and no longer hold references to SB objects that need to be freed before teardown.
Differential Revision: http://reviews.llvm.org/D13788

llvm-svn: 250467
2015-10-15 22:39:55 +00:00
Todd Fiala 3b82908f0f Fixup previous commit.
Looks like I blasted something into my editor...

llvm-svn: 250454
2015-10-15 20:32:25 +00:00
Todd Fiala 125b1bd361 Modify pylint/flake8 path helper to add lldb python module to path.
It was adding all the test infrastructure paths properly, but it
was not adding the lldb module.  The current approach only adds the
lldb from the path.  That can be improved (in the comments) to add
the one from the related build directory if it can be ascertained.

With this change, lldb tests can be run through pylint/flake8
and have the lldb module found and used as part of the checks.

llvm-svn: 250453
2015-10-15 20:27:23 +00:00
Jason Molenda f415791bda In r240466, when Greg added the jThreadsInfo packet, he accidentally
disabled the use of the jThreadGetExtendedInfo packet which is used
to retrieve additional information about a thread, such as the QoS
setting for that thread on darwin systems.  

Re-enable the use of the jThreadGetExtendedInfo packet, and add 
some quick tests to the TestQueues mac test case which will verify
that we can retrieve the QoS names for these test threads.

<rdar://problem/22925096> 

llvm-svn: 250364
2015-10-15 04:20:42 +00:00
Greg Clayton 5ea4483a32 Fix the ability to quit and use a custom exception. Also print tree items out so they are more aligned.
llvm-svn: 250353
2015-10-15 00:49:36 +00:00
Enrico Granata bbf1da3c9a Add a data formatter for __NSArray0, the type of empty arrays
llvm-svn: 250341
2015-10-14 22:45:04 +00:00
Pavel Labath 3bf1125619 lldb-server: add support for binary memory reads
Summary:
This commit adds support for binary memory reads ($x) to lldb-server. It also removes the "0x"
prefix from the $x client packet, to make it more compatible with the old $m packet. This allows
us to use almost the same code for handling both packet types. I have verified that debugserver
correctly handles $x packets even without the leading "0x". I have added a test which verifies
that the stub returns the same memory contents for both kinds of memory reads ($x and $m).

Reviewers: tberghammer, jasonmolenda

Subscribers: iancottrell, lldb-commits

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

llvm-svn: 250295
2015-10-14 12:59:37 +00:00
Pavel Labath 6934ef31e8 Mark TestBatchMode as flaky on linux
llvm-svn: 250280
2015-10-14 08:57:55 +00:00
Todd Fiala 7df337f85c ArchSpec: fix unintentional promotion of unspecified unknowns to specified unknowns
* ArchSpec::MergeFrom() would erroneously promote an unspecified
  unknown to a specified unknown when both the ArchSpec and the merged
  in ArchSpec were both unspecified unknowns. This no longer happens,
  which fixes issues with global module cache lookup in some
  situations.

* Added ArchSpec::DumpTriple(Stream&) that now properly prints
  unspecified unknowns as '*' and specified unknows as 'unknown'.
  This makes it trivial to tell the difference between the two.
  Converted printing code over ot using DumpTriple() rather than
  building from scratch.

* Fixed up a couple places that were not guaranteeing that an
  unspecified unknown was recorded as such.

llvm-svn: 250253
2015-10-13 23:41:19 +00:00
Greg Clayton 72d514478f Added tree panels.
llvm-svn: 250248
2015-10-13 23:16:29 +00:00
Adrian McCarthy ed2146d235 Xfail a watchpoint test on Windows, until Windows implements watchpoints.
llvm-svn: 250189
2015-10-13 17:55:58 +00:00
Adrian McCarthy 1d34f74470 Fix TestTargetAPI.py test for users who use Swig 3.0.5 or greater.
DifferentialRevision: http://reviews.llvm.org/D13679
llvm-svn: 250188
2015-10-13 17:54:15 +00:00
Jim Ingham ab1e86b223 Fix test for change in a summary string (objects -> elements).
llvm-svn: 250081
2015-10-12 19:00:28 +00:00
Pavel Labath 4111d5f372 TestAttachResume is still flaky on linux. mark it as such
llvm-svn: 250069
2015-10-12 17:43:03 +00:00
Adrian McCarthy 040b31d386 Switch threading mode for tests on Windows when there are lots of cores.
This prevents a "too many files" error.

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

llvm-svn: 250044
2015-10-12 14:46:57 +00:00
Pavel Labath f882f6fcd5 dotest.py: Remove useless AttributeError catches
Summary:
Test decorators were ignoring AttributeError exceptions. These were introduced three years ago,
and copied to all decorators. They seem to serve no purpose and removing them produces no errors.
Given that they have prevented us from noticing the problem in r249819, I am removing them.

Reviewers: zturner, tfiala

Subscribers: iancottrell, lldb-commits

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

llvm-svn: 250038
2015-10-12 13:42:16 +00:00
Tamas Berghammer 6faa07fac5 Improve TestValueOfVectorVariable
* XFAIL it for android arm/aarch64 as watchpoints aren't supported there
* Remove the dwarf/dsym test separation as they will be generated automatically

llvm-svn: 250024
2015-10-12 10:33:04 +00:00
Abhishek Aggarwal b352a1c88f X86: Change FTAG register size in FXSAVE structure
Summary:
 - Changed from 16 bits to 8 bits for Intel Architecture
    -- FXSAVE structure now conforms with the layout of FXSAVE
       area specified by IA Architecture Software Developer Manual

 - Modified Linux and FreeBSD specific files to support this change
    -- MacOSX already uses 8 bits for ftag register

 - Modified TestRegisters.py and a.cpp:
    -- Change allows 8 bit comparison of ftag values

    -- Change resolves Bug 24733:
       Removed XFAIL for Clang as the test works and passes for
       Clang compiler as well

    -- Change provides a Generic/Better way of testing Bug 24457
       and Bug 25050 by using 'int3' inline assembly in inferior

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

Reviewers: ovyalov, jingham, clayborg

Subscribers: tfiala, emaste

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

llvm-svn: 250022
2015-10-12 09:57:00 +00:00
Siva Chandra 1fa4c1b177 [TestValueOfVectorVariable] Reduce the vector size to 4.
Summary: On x86, we only have 4 watchpoint registers.

Reviewers: mohit.bhakkad

Subscribers: lldb-commits

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

llvm-svn: 249916
2015-10-09 23:05:28 +00:00
Mohit K. Bhakkad 3b27bf4d47 Correction in rL249838: Moving test to appropriate directory
llvm-svn: 249897
2015-10-09 20:36:54 +00:00
Pavel Labath 6204506fa6 dotest.py: Fail if we detect multiple tests with the same name
Summary:
Log files produced by dotest have names derived from the test name, and this produces errors in
case we have multiple tests with the same name. Additionally, it's good if the test name explains
what the test is testing (which it clearly doesn't do well if there are multiple tests with
identical names). This commit makes the presence of such tests a hard error.

Reviewers: tberghammer, zturner

Subscribers: iancottrell, lldb-commits

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

llvm-svn: 249828
2015-10-09 12:48:17 +00:00
Tamas Berghammer 6f5d647c17 Fix the way dwo tests are skipped on darwin
We want to skip these tests when the target platform is darwin, not
when the host because they have to be enabled in case of darwin ->
android

llvm-svn: 249825
2015-10-09 12:06:07 +00:00
Pavel Labath 2a7e046c7f Rename one of the TestGoASTContexts
llvm-svn: 249823
2015-10-09 11:15:50 +00:00
Tamas Berghammer 62a1514ca7 Fix regression caused by r249769
* Change TestSettings to test qith go instead of pascal as ToT pascal
  support isn't complete
* Fix crash inside PluginManager

llvm-svn: 249821
2015-10-09 11:01:56 +00:00
Pavel Labath 8112dd9951 Fix disabling of dwo tests
without this, dwo tests would be run even if they were meant to be disabled.

llvm-svn: 249819
2015-10-09 10:09:36 +00:00
Ravitheja Addepally 4069730c75 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.

-> This patch was reverted due to segfaults in
FreeBSD and Mac, I fixed the problems for both now.

Reviewers: emaste, granata.enrico, jingham, clayborg

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

llvm-svn: 249673
2015-10-08 09:45:41 +00:00
Greg Clayton 69d25a8d7b Expected fail this test and supplied the radar number that is tracking the fix.
llvm-svn: 249631
2015-10-07 22:36:52 +00:00
Siva Chandra 27e33a837a [DWARFASTParserClang] Strengthen incomplete type handling.
Summary: This change fixes pr24916. As associated test has been added.

Reviewers: clayborg

Subscribers: zturner, lldb-commits

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

llvm-svn: 249629
2015-10-07 22:11:52 +00:00
Greg Clayton db2a576a77 Don't do DWO tests on darwin as they aren't supported. If this is an error and they are supported, we need to add support _only_ if the clang compiler that is being used supports the compiler option for DWO stuff as right now I just get an error saying "warning: unused option -gsplit-dwarf". So unless we can successfully test if "-gsplit-dwarf" is truly supported, I am going to disable it on darwin for now so we don't get test suite failures.
llvm-svn: 249625
2015-10-07 22:06:08 +00:00
Greg Clayton 7d0ea14cb0 This test is useless. It doesn't work and it fails on MacOSX. Removing it.
llvm-svn: 249613
2015-10-07 20:38:20 +00:00
Greg Clayton 512011c3f0 Another stripped test that requires darwin and a dSYM (no Dwarf or DWO).
llvm-svn: 249605
2015-10-07 20:08:26 +00:00
Greg Clayton 9bb69f059b More fixes for binaries that we strip. When we strip a binary we can't do Dwarf or DWO.
llvm-svn: 249604
2015-10-07 20:06:45 +00:00
Greg Clayton edea2371f3 Fix a test that should only be run with a dSYM file by adding @skipIfDwarf and using a new @skipIfDWO.
llvm-svn: 249601
2015-10-07 20:01:13 +00:00
Greg Clayton 37191a2c2d Fixed up some first responder issues and added menubar support that isn't in use yet.
llvm-svn: 249600
2015-10-07 20:00:28 +00:00
Dawn Perchik 74b8f4cbdf [lldb-mi] Fix evaluation of strings containing characters from non-ascii range
If a string contained characters outside the ASCII range, lldb-mi would
print them as hexadecimal codes.  This patch fixes this behaviour by
converting to UTF-8 instead, by having lldb-mi use registered type
summary providers, when they are available.  This patch also fixes
incorrect evaluation of some composite types, like std::string, by
having them use a type registered type summary provider.

Based on patch from evgeny.leviant@gmail.com
Reviewed by: ki.stfu, granata.enrico, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13058

llvm-svn: 249597
2015-10-07 19:55:33 +00:00
Enrico Granata 675f49bbd5 This is the work I was building up to with my patches yesterday
Introduce the notion of Language-based formatter prefix/suffix
This is meant for languages that share certain data types but present them in syntatically different ways, such that LLDB can now have language-based awareness of which of the syntax variations it has to present to the user when formatting those values

This is goodness for new languages and interoperability, but is NFC for existing languages. As such, existing tests cover this

llvm-svn: 249587
2015-10-07 18:36:53 +00:00
Ed Maste 848a0686a1 Add expectedFailureFreeBSD for Go runtime test
AssertionError: False is not True : No thread stopped at our breakpoint.

llvm.org/pr24895

llvm-svn: 249561
2015-10-07 16:21:43 +00:00
Pavel Labath fcc7f6622f Resumbit "Fix race condition during process detach"
This is a resubmission of r248371. It also incorporates the process event hijack patch by Kyrill
Lapshin in D12968.

llvm-svn: 249554
2015-10-07 15:11:11 +00:00
Tamas Berghammer 11db2d3ddd Fix race condition in the working directory cleanup code
llvm-svn: 249549
2015-10-07 14:52:16 +00:00
Tamas Berghammer f2addf8905 Remove working directory from remote platform in the test suite
Previously we haven't cleaned up the working directory we created on
the remote platform and because of it we run out of storage on some
android device/emulator (caused by the 2x increase of the number of
test cases because of dwo).

llvm-svn: 249541
2015-10-07 12:38:29 +00:00
Tamas Berghammer ca2bc7865d XFAIL new dwo test failing with totclang on linux i386
llvm-svn: 249539
2015-10-07 11:40:10 +00:00
Tamas Berghammer 4c0c7a7f52 Run tests with dwo symbol files
dwo symbol files are generated when code compiled with the "-gsplit-dwarf"
command option (https://gcc.gnu.org/wiki/DebugFission). This CL modifies
the test system to run tests with inferiors compile with the "-gsplit-dwarf"

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

llvm-svn: 249530
2015-10-07 10:02:17 +00:00
Enrico Granata 73e8c4d09c Route the preferred-display-language mechanism to the ValueObjectPrinter and actually fill in a few gaps for dynamic and synthetic values to be able to adopt this in useful ways
llvm-svn: 249507
2015-10-07 02:36:35 +00:00
Todd Fiala 02c08d04e2 Modify minimumg go version to 1.4.0 for tests.
llvm-svn: 249477
2015-10-06 22:14:33 +00:00
Ryan Brown 2b56f86dab Add missing GoLanguageRuntime files.
llvm-svn: 249459
2015-10-06 20:31:08 +00:00
Todd Fiala 9f23680a16 Bungled my last change in a tweak.
I took out a skip_test check that wasn't necessary, but
didn't fully yank it out.  Would break a normal go install.

llvm-svn: 249448
2015-10-06 19:23:22 +00:00
Todd Fiala be5dfc5065 Address failing Go tests on go version from Ubuntu 14.04
Go tests fail on Ubuntu 14.04's go1.2.1.  This change puts a minimum
go version in the skipUnlessGoInstalled() decorator of go1.3.0.
Go maintainers are encouraged to modify as needed.  For now this fixes
failing tests on Ubuntu 14.04 x86_64 buildbots with stock distro go installed.

llvm-svn: 249446
2015-10-06 19:15:56 +00:00
Todd Fiala 873111ec10 Convert expectedFlakeyDarwin to expectedFlakeyDsym for TestCallUserDefinedFunction.py
Closes:
https://llvm.org/bugs/show_bug.cgi?id=25076

llvm-svn: 249425
2015-10-06 15:57:55 +00:00
Todd Fiala 5c3cc83b26 Reduce load on TestMultipleDebuggers.
4-core CPUs have a hard time keeping up with the number of debuggers
we were simultaneously spawning.  This leads to a timeout, which
leaves processes hanging around in "suspended mode", which can't be
killed with signals.

llvm-svn: 249421
2015-10-06 15:33:51 +00:00
Todd Fiala 0f247a479e Switching TestCallUserDefinedFunction from xfail to flaky on OS X.
This is passing 50/50 times for me.  Moving to flaky as precautionary
measure.

llvm-svn: 249419
2015-10-06 15:23:52 +00:00
Tamas Berghammer 63e6bd3687 Rename a test case to avoid name conflict
Rename the python source file for DataFormatterOSTypeTestCase to match
the purpose of the test and to avoid a name conflict with
DataFormatterBoolRefPtr. The name conflict caused a race condition in
the test runner what we have to address separately.

llvm-svn: 249407
2015-10-06 14:39:05 +00:00
Mohit K. Bhakkad 72207b167c [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPS
Reviewers: jaydeep.
Subscribers: lldb-commits.
Differential Revision: http://reviews.llvm.org/D13335

llvm-svn: 249299
2015-10-05 10:56:19 +00:00
Enrico Granata bd0998a1be Do not attempt to join the remote paths if none exist
llvm-svn: 249210
2015-10-02 22:53:32 +00:00
Zachary Turner 25b9ced0ed Re-disable TestBuiltinTrap on Windows.
This was inadvertently re-enabled as a in r248883.

llvm-svn: 249209
2015-10-02 22:47:37 +00:00
Zachary Turner a259116513 Updated xfail / skip status on a few tests.
TestDiamond and TestSBValueCast were due to a bug in clang.  That
bug has been fixed, so xfail is removed.  However fixing that bug
exposed another bug in clang, which is not yet fixed.  That bug
causes one test to start crashing, and another to fail unexpectedly
so the status of those tests is updated as well.

llvm-svn: 249208
2015-10-02 22:47:28 +00:00
Oleksiy Vyalov a1733984f2 Fix TestCompDirSymLink.py - remove existing symlink leftovers if previous test run
was terminated (e.g., due timeout).

llvm-svn: 249203
2015-10-02 22:37:55 +00:00
Todd Fiala ae5dee8031 Fix race on subprocess.Popen return values.
This fixes:
https://llvm.org/bugs/show_bug.cgi?id=25019

llvm-svn: 249182
2015-10-02 20:51:11 +00:00
Tamas Berghammer b285e9e0d2 Change expected stop reason in TestInferiorAssert for Android API <= 16
llvm-svn: 249120
2015-10-02 12:00:04 +00:00
Enrico Granata 72d8a72241 Teach 'type lookup' to pull types from clang modules; also add a test case
llvm-svn: 249117
2015-10-02 01:23:11 +00:00
Dawn Perchik 8587212085 [lldb-mi] Add support for StopAtEntry in MI via "-exec-run --start".
This patch adds a --start option to the lldb-mi -exec-run command for
getting process stopped at entry point after launch.  It is equivelent
to the -s option in the lldb command line interpreter:
    process launch -s
and is therefore not supported on all hosts and/or targets.  To check
if the --start option is supported, see if the corresponding feature
"exec-run-start-option" is in the list of options reported by the lldb-mi
"-list-features" command.

Patch from engineer.developer@gmail.com (Kirill Lapshin)
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12977

llvm-svn: 249072
2015-10-01 21:15:43 +00:00
Todd Fiala 84f14ab0fb Fixes a potential hang in test runner timeout logic.
Part of https://llvm.org/bugs/show_bug.cgi?id=25002

In writing the new process_control test included here,
I discovered that the scenario would hang indefinitely,
bypassing the timeout logic.

This fixes the indefinite hang, converting an error
in the new test to a failure.  I'll fix the failure
next.  This one was heinous enough to fix on its own,
though.

llvm-svn: 248936
2015-09-30 20:13:58 +00:00
Tamas Berghammer b926d01d2a XFAIL 2 test in TestTargetCommands on android-aarch64
The 2 test just get enabled with the recemt test system refactor.

llvm-svn: 248901
2015-09-30 13:42:06 +00:00
Pavel Labath 8f4db787d5 Fix TestAttachDenied on linux
This test was timing out because the test inferior was forking a child, which was not terminated
correctly. The test contained provisions to terminate this child, but these were no longer
working. The idea was to wake up upon receiving SIGTERM and then kill the child. However, this
was failing because the test first tried to use SIGHUP, which ended up killing the inferior.

Fix: make sure we catch SIGHUP also.
llvm-svn: 248889
2015-09-30 10:59:39 +00:00
Tamas Berghammer c8fd130a2c Merge dwarf and dsym tests
Currently most of the test files have a separate dwarf and a separate
dsym test with almost identical content (only the build step is
different). With adding dwo symbol file handling to the test suit it
would increase this to a 3-way duplication. The purpose of this change
is to eliminate this redundancy with generating 2 test case (one dwarf
and one dsym) for each test function specified (dwo handling will be
added at a later commit).

Main design goals:
* There should be no boilerplate code in each test file to support the
  multiple debug info in most of the tests (custom scenarios are
  acceptable in special cases) so adding a new test case is easier and
  we can't miss one of the debug info type.
* In case of a test failure, the debug symbols used during the test run
  have to be cleanly visible from the output of dotest.py to make
  debugging easier both from build bot logs and from local test runs
* Each test case should have a unique, fully qualified name so we can
  run exactly 1 test with "-f <test-case>.<test-function>" syntax
* Test output should be grouped based on test files the same way as it
  happens now (displaying dwarf/dsym results separately isn't
  preferable)

Proposed solution (main logic in lldbtest.py, rest of them are test
cases fixed up for the new style):
* Have only 1 test fuction in the test files what will run for all
  debug info separately and this test function should call just
  "self.build(...)" to build an inferior with the right debug info
* When a class is created by python (the class object, not the class
  instance), we will generate a new test method for each debug info
  format in the test class with the name "<test-function>_<debug-info>"
  and remove the original test method. This way unittest2 see multiple
  test methods (1 for each debug info, pretty much as of now) and will
  handle the test selection and the failure reporting correctly (the
  debug info will be visible from the end of the test name)
* Add new annotation @no_debug_info_test to disable the generation of
  multiple tests for each debug info format when the test don't have an
  inferior

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

llvm-svn: 248883
2015-09-30 10:12:40 +00:00
Todd Fiala 6fe591b45d Skipping TestAttachDenied.py on Linux as it is hanging on a buildbot after r248834.
I'll track down what is happening here.

llvm-svn: 248846
2015-09-29 23:06:56 +00:00
Todd Fiala 2d3754d82e test runner: switch to pure-Python timeout mechanism
The timeout mechanism has been implemented in python,
so there is no more dependence on external utilities
for timing out an inferior dotest.py process.

Platform-specific bits are implemented for POSIX-like
and Windows platforms.  There is a small class named
ProcessHelper in process_control.py that needs to be
overridden for platforms that fall outside of the
POSIX-like and Windows platforms.

See http://reviews.llvm.org/D13124 for more details.

llvm-svn: 248834
2015-09-29 22:19:06 +00:00
Pavel Labath 4a7436fd82 Enable test_create_after_attach_with_dwarf_and_popen on linux
The test still remains XTIMEOUTed. Will remove that as well if it turns out its passing.

llvm-svn: 248790
2015-09-29 12:42:56 +00:00
Pavel Labath 8ff61200f4 Remove XTIMEOUT from TestProcessAttach on linux
llvm-svn: 248711
2015-09-28 13:27:48 +00:00
Pavel Labath c8c77d46ef Revert "Fix race condition during process detach"
This fix is not correct on its own until D12968 is resolved. Will resumbit once that is done.

llvm-svn: 248702
2015-09-28 09:37:51 +00:00
Todd Fiala d47346d0f8 Added python script to support running pylint.
See the script comments for how to modify your
pylintrc file (e.g. $HOME/.pylintrc) to support
always finding the lldb-specific Python library
directories.

With the pylintrc modification using this script,
the lldb python tests and test inferstructure can
be linted on any of potentially multiple lldb source
trees on the system without further work from
the developer.  

llvm-svn: 248676
2015-09-26 23:00:35 +00:00
Ed Maste 4d5dc31c9c Re-enable FreeBSD tests do not hang locally
These tests used to hang on the old FreeBSD buildbot, which has been
retired.  They do not hang when run locally, but do fail.

llvm.org/pr24939

llvm-svn: 248577
2015-09-25 16:10:40 +00:00
Ed Maste d1f06aecc0 Re-enable some skipped tests on FreeBSD
These tests were skipped because they hung the old FreeBSD buildbot.
They pass (and do not hang) when run locally so enable them again.  We
will investigate further if they hang again once the new FreeBSD
buildbot is installed.

llvm.org/pr16684
llvm.org/pr18200
llvm.org/pr18230

llvm-svn: 248574
2015-09-25 15:36:30 +00:00
Dawn Perchik 045c829223 Fix evaluation of unicode character arrays (char16_t[] and char32_t[])
Suppose we have the UTF-16 string:
    char16_t[] s = u"hello";
Before this patch, evaluating the string in lldb would get:
    (char16_t [6]) $0 = ([0] = U+0068 u'h', [1] = U+0065 u'e', [2] = U+006c u'l', [3] = U+006c u'l', [4] = U+006f u'o', [5] = U+0000 u'\0')
After applying the patch, we now get:
    (char16_t [6]) $0 = u"hello"

Patch from evgeny.leviant@gmail.com
Reviewed by: granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13053

llvm-svn: 248555
2015-09-25 02:16:52 +00:00
Siva Chandra 13a62c6595 [TestCppIncompleteTypes] Handle different archs when building a.o.
Reviewers: chying

Subscribers: lldb-commits

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

llvm-svn: 248547
2015-09-24 22:13:36 +00:00
Siva Chandra bd7f0dfaa2 [TestCppIncompleteTypes] Remove the dependence on std::string.
Reviewers: dblaikie, clayborg

Subscribers: lldb-commits

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

llvm-svn: 248541
2015-09-24 21:29:54 +00:00
Greg Clayton b877a20211 Don't enter interactive loop when finished running the test suite.
llvm-svn: 248513
2015-09-24 16:37:41 +00:00
Bruce Mitchener 3ad353f3f4 Rename clang_type -> compiler_type for variables.
Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 248461
2015-09-24 03:54:50 +00:00
Greg Clayton 414dba5799 Added the ability to register key callbacks for much easier key handling. Also added the elapsed time display to the status bar.
llvm-svn: 248450
2015-09-24 00:19:42 +00:00
Ying Chen d93aa1060a Check existence of SIGHUP before using it
Summary: -SIGHUP doesn't exist on Windows

Reviewers: tfiala

Subscribers: lldb-commits

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

llvm-svn: 248434
2015-09-23 21:53:18 +00:00
Enrico Granata e5ffa089cc Revert 248366 "Testcase and fix for bug 24074"
This commit introduced regressions in several test cases on FreeBSD and Mac OS X

llvm-svn: 248421
2015-09-23 19:32:56 +00:00
Siva Chandra 4327d7aa12 [TestCppIncompleteTypes] Fix Makefile to handle different archs.
Reviewers: chying

Subscribers: lldb-commits

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

llvm-svn: 248416
2015-09-23 18:36:39 +00:00
Ed Maste 9b597c7a1e Remove expectedFailureFreeBSD from passing test
ClassTypesTestCase::test_with_dwarf_and_constructor_name

llvm.org/pr14540

llvm-svn: 248411
2015-09-23 18:23:38 +00:00
Ed Maste 00719f5dec Remove expectedFailureFreeBSD from passing TestChangeValueAPI test
This test used fail intermittently, but now passes consistently on
FreeBSD in local runs. We'll investigate further if it's intermittent
on the FreeBSD buildbot, once it's restored.

llvm.org/pr15039

llvm-svn: 248410
2015-09-23 18:20:51 +00:00
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