Commit Graph

371 Commits

Author SHA1 Message Date
Siva Chandra a07e1e7f2b Add test for SBValue.GetNonSyntheticValue in presence of synth provider.
Test Plan: dotest.py -p TestFormattersSBAPI

Reviewers: granata.enrico

Reviewed By: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 240861
2015-06-26 23:57:38 +00:00
Vince Harron 7ac3ea424b Added expectedFlakey test decorator
SUMMARY
Flakey tests get two chances to pass

Also, switched a bunch of tests to use new decorator.

TEST PLAN
Add one of these decorators to a test
Edit a test to pass on the first invocation, confirm test appears as pass
Edit a test to pass on the first invocation, pass on the second, confirm test appears as xfail
Edit a test to fail on two consecutive runs, confirm test appears in results as fail/error

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

llvm-svn: 240789
2015-06-26 15:13:21 +00:00
Pavel Labath ecc728bde9 Update TestPrintStackTraces XFAIL once more
it seems the failure happens also with clang. The main thing which triggers the failure is
architecture.

llvm-svn: 240652
2015-06-25 15:25:30 +00:00
Tamas Berghammer 09d74b7140 Fix TestThreadAPI on Linux
On Linux malloc calls itself in some case. Change the test case to
handle this scenario.

llvm-svn: 240651
2015-06-25 15:19:22 +00:00
Pavel Labath 35a24ded0a Make XFAIL on TestPrintStackTraces more specific
the thread creation failure was fixed, but a backtracing problem remains in some situations.

llvm-svn: 240635
2015-06-25 12:16:50 +00:00
Bruce Mitchener 58ef391f3e Fix a variety of typos.
No functional change.

llvm-svn: 239995
2015-06-18 05:27:05 +00:00
Chaoren Lin 5d76b1b56e Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.
Summary: Updated `append_to_remote_wd` to work for both remote and local.

Reviewers: clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 239203
2015-06-06 00:25:50 +00:00
Pavel Labath 8e9c266a77 Un-enable TestEvents test on linux
Test still seems to fail about 1/10 runs. Skipping the test, but it a more greppable fashion.

llvm-svn: 238826
2015-06-02 12:50:25 +00:00
Pavel Labath e0f9708410 Enable TestEvents test on linux
This test was very inconspicuosly skipped on linux, when it was crashing for local debugging. It
seems to work fine with LLGS, so I'm enabling it.

llvm-svn: 238816
2015-06-02 10:19:33 +00:00
Siva Chandra 3154aa23f3 [TestBase.runCmd] Better error message when runCmd fails.
Summary:
Before:
    AssertionError: False is not True : Process is launched successfully

After:
    AssertionError: False is not True : Command 'run a.out' failed.
    >>> error: invalid target, create a target using the 'target create' command
    >>> Process could not be launched successfully

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, vharron

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

llvm-svn: 238363
2015-05-27 22:27:41 +00:00
Siva Chandra 73eddaa2d8 [TestChangeValueAPI] Remove expectedFailureGcc decorator.
Test Plan: dotest.py -C <clang|gcc> -p TestChangeValueAPI

Reviewers: vharron

Reviewed By: vharron

Subscribers: lldb-commits

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

llvm-svn: 237927
2015-05-21 18:20:46 +00:00
Tamas Berghammer a98788d17e Add bug number for TestEvents
llvm-svn: 237904
2015-05-21 14:04:17 +00:00
Tamas Berghammer b5f4e6dd53 XFAIL TestEvents on Linux bacuse it is flaky
llvm-svn: 237888
2015-05-21 10:16:55 +00:00
Vince Harron 121fa77e92 Added minor comment
llvm-svn: 237174
2015-05-12 20:55:43 +00:00
Chaoren Lin 3e2bdb4640 os.path.join does not always work for paths on remote platforms.
Summary:
Since we don't yet have remote windows debugging, it should be safe to assume
that the remote target uses unix path separators.

Reviewers: ovyalov, zturner, clayborg, vharron

Reviewed By: vharron

Subscribers: lldb-commits

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

llvm-svn: 237006
2015-05-11 17:53:39 +00:00
Siva Chandra 8a1f76936c [TestEvents] Add a 'connected' state to include remote debugging.
Test Plan: dotest.py -p TestEvents

Reviewers: vharron, chaoren

Reviewed By: chaoren

Subscribers: lldb-commits

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

llvm-svn: 236800
2015-05-08 00:43:28 +00:00
Pavel Labath c23ba555c2 Enable TestChangeValueAPI on Linux
the test has passed in the last 300 runs, enabling to see what the build bot says. Also,
downgrading skipIfGcc to XFAIL, with plans of enabling it in the future if it shows to be
working.

llvm-svn: 236496
2015-05-05 12:10:13 +00:00
Vince Harron 410a9e1e1e un-skipped a bunch of tests on Linux
Some have been marked as skipIfLinux for years.
The seem to be passing so I've enabled them.

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

llvm-svn: 236403
2015-05-04 03:06:04 +00:00
Pavel Labath 6884aa1b43 Enabling two watchpoint tests on linux
After recent changes, these tests should be stable. Please let me know if you still see failures.

llvm-svn: 236226
2015-04-30 11:28:06 +00:00
Pavel Labath 634b602983 XFAILing TestPrintStackTraces on linux to stabilize the build bot
llvm-svn: 235169
2015-04-17 09:05:26 +00:00
Vince Harron 7343ab44ee Exception registers aren't supported outside of Darwin
Updated test to match

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

llvm-svn: 234992
2015-04-15 10:31:42 +00:00
Chaoren Lin 9cb8988b91 Remove gcc xfail for TestTargetWatchAddress.
llvm-svn: 234828
2015-04-14 00:51:57 +00:00
Greg Clayton e0d0a7652d Many many test failures after some recent changes. The problem is lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin".
There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a:

lldbtest.platformIsDarwin()

which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function:

lldbtest.getDarwinOSTriples()

Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well.

llvm-svn: 233933
2015-04-02 18:24:03 +00:00
Vince Harron 091a95d412 TestPrintStackTraces - made XFAIL more precise
Works with x86_64 inferior, fails w/i386 inferior - updated test to
reflect

llvm-svn: 233717
2015-03-31 17:45:54 +00:00
Vince Harron 3d2979ee2f Enabled a bunch of tests on Linux
Removed expectedFailureLinux from failures that I was unable to
reproduce, updated and improved some other comments near XFAIL tests

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

llvm-svn: 233716
2015-03-31 17:44:37 +00:00
Robert Flack 13c7ad9cd2 Replace sys.platform skips in tests with @skip decorators which check against remote platform.
Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if /
unless the target platform is in the provided platform list.

Test Plan:
ninja check-lldb shows no regressions.
When running cross platform, tests which cannot run on the target platform are
skipped.

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

llvm-svn: 233547
2015-03-30 14:12:17 +00:00
Ilia K 841e30ae71 Fix RegisterCommandsTestCase and HelloWorldTestCase tests which hang on OS X after TestBase.tearDown()
llvm-svn: 233279
2015-03-26 15:43:46 +00:00
Ying Chen 4e0587d26a xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot green
Summary:
-Refer to bug https://buganizer.corp.google.com/issues/19893563
-Test log http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/1145

Test Plan: Run tests with different compiler and archs locally

Reviewers: sivachandra, ovyalov, chaoren, vharron

Subscribers: llvm-commits

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

llvm-svn: 233157
2015-03-25 00:39:25 +00:00
Robert Flack 666a986839 Don't clobber CFLAGS_EXTRAS in tests.
To run tests against a different target platform many extra compiler flags are
needed to specify sysroot, include dirs, etc. The environment variable
CFLAGS_EXTRAS seems suited for this purpose except that several Makefiles
clobber the current flags. This change modifies all of these to add to
CFLAGS_EXTRAS instead.

Test Plan:
Verify no regressions in ninja check-lldb.
Run tests using CFLAGS_EXTRAS to specify cross compilation flags for a different
target running lldb-server platform.

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

llvm-svn: 233066
2015-03-24 12:41:20 +00:00
Vince Harron b63c1880f2 Use -fno-limit-debug-info instead of -fstandalone-debug in tests
This fixes tests on clang-3.4

AFAICT, these flags have the same affect and -fstandalone-debug wasn't
added until after clang-3.4

Committed to try to fix buildbot

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

llvm-svn: 232326
2015-03-15 18:05:53 +00:00
Tamas Berghammer 00c45289f4 Make TestSBFrameFindValue compatible with remote targets
llvm-svn: 232171
2015-03-13 14:54:42 +00:00
Greg Clayton 6ef9712296 Avoid a failing test case by fixing things so the compiler generates a line table entry for line the very start of the printf() before any values have been loaded into registers.
The issue was the previous code tried to stop on the following code in main.c:

21    // Stop here and set values
22    printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", 
23            val, 
24            mine.first_val, mine.second_val, mine.third_val,
25            ptr->first_val, ptr->second_val, ptr->third_val); 

We we set a source regex breakpoint on "// Stop here and set values" we would set a breakpoint on line 22 as expected. 

The problem is the most recent clang compiler generates a line table like this


0x1000: main.c:23 // Loading of "val" into a register
0x1010: main.c:24 // Load mine.first_val, mine.second_val, mine.third_val values into registers or on the stack
0x1020: main.c:25 // Load ptr->first_val, ptr->second_val, ptr->third_val values into registers or on the stack
0x1030: main.c:22 // Call to printf

In this test, we run to line 22, then we use python to modify the value of "val" and then continue to another breakpoint and try to read the STDOUT from the printf to verify the values changed correctly.

With the above line table the value for "val" had already been loaded into a register so the string from printf would be incorrect.

Doing an easy fix for now by changing the code to:

21    // Stop here and set values
22  printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", val, 
23          mine.first_val, mine.second_val, mine.third_val,
24          ptr->first_val, ptr->second_val, ptr->third_val); 


Now we get a line table entry for line 22 that is before any locals are read from the stack into registers.

I need to follow up with the compiler guys and see if we can get a fix for this as anyone setting file + line breeakpoints might be very surprised to have code from lines below the current line already have had their code run.

llvm-svn: 232068
2015-03-12 17:42:15 +00:00
Pavel Labath 3f5df53fde Fix ProcessIO test failures
Summary:
There was a race condition regarding the output of the inferior process. The reading of the
output is performed on a separate thread, and there was no guarantee that the output will get
eventually consumed. Because of that, it was happening that calling Process::GetSTDOUT was not
returning anything even though the process was terminated and would definitely not produce any
further output. This was usually happening only under very heavy system load, but it can be
reproduced by placing an usleep in the stdio thread (Process::STDIOReadThreadBytesReceived).

This patch addresses this by adding synchronization capabilities to the Communication thread.
After calling Communication::SynchronizeWithReadThread one can be sure that all pending input has
been processed by the read thread. This function is then called after every public event which
stops the process to obtain the entire process output.

Test Plan: TestProcessIO.py should now succeed every time instead of flaking in and out.

Reviewers: clayborg, jingham

Subscribers: lldb-commits

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

llvm-svn: 232023
2015-03-12 10:12:41 +00:00
Oleksiy Vyalov 4eab4bc23c Restore commented setTearDownCleanup in TestHelloWorld.test_with_dwarf_and_attach_to_process_with_id_api.
llvm-svn: 231737
2015-03-10 01:58:47 +00:00
Oleksiy Vyalov 63acdfdeb2 Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer - in order to allow modules caching from remote targets.
http://reviews.llvm.org/D8037

llvm-svn: 231734
2015-03-10 01:15:28 +00:00
Ilia K d4ec5a70ea Improve ValueObject::GetValueDidChange test; Add a comment for it
Summary: This patch adds a few comments for GetValueDidChange and contains improvements for TestValueVarUpdate.py test which checks ValueObject::GetValueDidChange for complex types.

Reviewers: zturner, granata.enrico, clayborg

Reviewed By: clayborg

Subscribers: jingham, lldb-commits, granata.enrico, zturner, clayborg

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

llvm-svn: 231526
2015-03-06 22:35:08 +00:00
Vince Harron 6caca38f68 XFAIL tests that are known to fail occasionally on Linux
Trying to get the build green so we can notice new failures easier.

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

llvm-svn: 231407
2015-03-05 21:35:28 +00:00
Chaoren Lin ac8263dbf0 Applying D7950 to four near copies of the file.
Summary:
Using std::thread/random instead of pthread/rand.
Two of them also suffered from the synchronization problem in D7916.

Reviewers: clayborg, zturner, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 230993
2015-03-02 19:12:18 +00:00
Vince Harron 5a6b8aa4dd Use -fstandalone-debug for few tests to get around a Clang optimization
clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD targets.
Other targets do not, which causes several tests to fail.  This flag
enables FullDebugInfo for all targets.

Fixes the following tests:

TestCallStdStringFunction.py
TestDataFormatterSkipSummary.py
TestDataFormatterStdIterator.py
TestDataFormatterStdList.py
TestDataFormatterStdString.py
TestSBValuePersist.py
TestStringPrinter.py
TestTypeCompletion.py

llvm-svn: 230831
2015-02-28 01:07:50 +00:00
Vince Harron 4a8abd3f94 Fix TestProcessIO.py when run against a remote target
Fixed test case to copy redirected stdout/stderr files from remote
target to host

llgs wasn't bothering to put the pty master file handle in the right
place if stdout/stderr were redirected to a file. It is still needed
for stdin.

Corrected some log message text

llvm-svn: 229141
2015-02-13 19:15:24 +00:00
Vince Harron df3f00f30a Fix 'process launch -i' for remote processes
We want to forward stdin when stdio is not disabled and when we're not
redirecting stdin from a file.

renamed m_stdio_disable to m_stdin_forward and inverted value because
that's what we want to remember.

There was previously a bug that if you redirected stdin from a file,
stdout and stderr would also be redirected to /dev/null

Adds support for remote target to TestProcessIO.py

Fixes ProcessIOTestCase.test_stdin_redirection_with_dwarf for remote
Linux targets

llvm-svn: 228744
2015-02-10 21:09:04 +00:00
Pavel Labath ef0d0c65f0 Check-in generated test makefiles
for rationale, see D7407.

llvm-svn: 228314
2015-02-05 17:03:22 +00:00
Vince Harron c46945149c Fix TestTargetAPI.py when run against remote host.
In tests where stdio is redirected to a file, the file must be copied
back from the remote host for analysis by the test.

llvm-svn: 228175
2015-02-04 19:25:21 +00:00
Greg Clayton 199e7c125e Fix the test to disassemble as if at address zero, not at an invalid address. The default SBAddress constructor sets the offset to 0xffffffffffffffff and the section to NULL.
This was causing problems on clang 602 branches that use MemoryObjects to as the container for opcode bytes instead of a plain array of bytes. So we were asking for 3 bytes to be disassembled at address 0xffffffffffffffff which would cause an unsigned overflow and cause the MemoryObject to refuse to read anymore bytes.

llvm-svn: 227153
2015-01-27 00:22:36 +00:00
Zachary Turner 12947b7e25 Fix a number of tests on Windows.
These fix various issues with path handling and disable a few tests
which use features of LLVM which are not yet supported on Windows.

llvm-svn: 226042
2015-01-14 21:42:53 +00:00
Siva Chandra aaa3d47863 [TestEvents] Replace expectedFailureLinux with skipIfLinux
Summary:
If we do not mark them as skip, they are still executed, which in
turn is leading to an assertion failure. The change also adds
skipIfLinux to a testlet which was not previously marked with
skipIfLinux. This is because running even that test let leads to an
assertion failure.

Test Plan: dotest.py -C clang -p TestEvents.py

Reviewers: vharron

Reviewed By: vharron

Subscribers: lldb-commits

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

llvm-svn: 224644
2014-12-19 22:41:43 +00:00
Enrico Granata cf87ab9390 Now that AddressOf() does sane things with const results, this check is wrong. Since this is actually quite orthogonal to what this test is all about, actually get rid of the assertions
llvm-svn: 224290
2014-12-15 23:36:23 +00:00
Enrico Granata 15ee703045 Add a test case to validate that AddressOf() and GetLoadAddress() work on a ValueObjectConstResult. This test passing is the baseline of functionality we want to ensure for our const results
llvm-svn: 224151
2014-12-12 21:23:55 +00:00
Zachary Turner 29278a6ac4 Disable the remaining ProcessIO test on Windows.
This still relies on PutSTDIN, just indirectly.  So it was hanging
due to not being able to get stdin from the test.

llvm-svn: 223983
2014-12-10 23:25:28 +00:00
Oleksiy Vyalov b9321bd774 Skip TestExprPathSynthetic test on FreeBSD, Linux & Windows.
llvm-svn: 223905
2014-12-10 01:48:17 +00:00