Commit Graph

68 Commits

Author SHA1 Message Date
Greg Clayton fdbff2afed Don't let a test fail because of a teardown command returning an error. Use a function that doesn't check the return value.
llvm-svn: 241879
2015-07-10 00:30:22 +00:00
Sean Callanan 05834cd2ad Reversed r238363, because the message is inconsistent
with all the other assertion messages.

llvm-svn: 241212
2015-07-01 23:56:30 +00:00
Ying Chen 9b5eca903b Mark test_sb_api_listener_event_process_state as flakey
llvm-svn: 241203
2015-07-01 22:50:28 +00:00
Ying Chen 401a6f9c60 Revert "Mark test_sb_api_listener_event_process_state as flakey"
This reverts commit a4f5f4da7e164b7ac358a75f2e4254c25718ad4b.
This test fails 100% with gcc4.9.2, revert it first. Will find out why xfail is overruled by xflaky.

llvm-svn: 241014
2015-06-29 22:40:33 +00:00
Tamas Berghammer 2d4920e1ee Mark test_sb_api_listener_event_process_state as flakey
llvm-svn: 240964
2015-06-29 16:28:37 +00:00
Chaoren Lin 9acea45e19 Fix TestMultithreaded.
llvm-svn: 238529
2015-05-29 00:01:15 +00:00
Zachary Turner c7a7c8acca Refactor test runner to print sub-test-case pass/fail rate.
llvm-svn: 238467
2015-05-28 19:56:26 +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
Vince Harron a9c2a380b3 TestPublicAPIHeaders.py - Changed expectedFailureDarwin to skipIfDarwin
expectedFailure doesn't work if the failure is in a teardown step.

llvm-svn: 237089
2015-05-12 05:18:06 +00:00
Vince Harron 069391ac15 Working on getting the OSX build green
Added missing SBLanguageRuntime.h to lldb.xcodeproj, set to Public (fixed compile error in TestPublicAPIHeaders)
Removed reference to (temporarily) missing gtest.xcodeproj
Fixed TestDeadStrip compile error
XFAIL TestPublicAPIHeaders - test passes but teardown command 'settings remove target.env-vars DYLD_LIBRARY_PATH' fails
XFAIL TestCModules - use of undeclared identifier 'MIN'
XFAIL TestModulesAutoImport - clang: error: unknown argument: '-gmodules'
XFAIL TestObjCNewSyntax - expr -- @((char*)"Hello world" + 6) cannot box a string value because NSString has not been declared

http://reviews.llvm.org/D9643

llvm-svn: 237085
2015-05-12 02:20:27 +00:00
Oleksiy Vyalov 8a28b21fde Mark TestMultithreaded.test_sb_api_listener_resume as XFAIL with gcc 4.8 and higher.
llvm-svn: 236549
2015-05-05 22:02:56 +00:00
Vince Harron 0da0d4a948 XFAILing a test that fails with gcc 4.9 x86_64
llvm-svn: 236407
2015-05-04 03:53:22 +00:00
Vince Harron 026137628f TestMultithreaded improvements
These tests link against host lldb API. Compiler's target triple
must match liblldb triple. Instead of naively skipping i386, I added
a check of the liblldb arch against the compiler target arch.

This is useful for 32 bit API builds (planned for Windows)

Since remote is disabled, we can assume the os is the same.

Also, removed skipIfLinuxClang because it's passing

llvm-svn: 236396
2015-05-04 00:17:53 +00:00
Ying Chen 7091c2ca3f XFAIL tests that are failed on linux with gcc-4.9.2
Summary:
- add decorator functions to xfail and skip test on specific os, architecture and version of comipler
- xfail failing test with gcc-4.9.2 on linux
- add one usage of skipIf function

Test Plan:
Run tests with different archs, and version of compilers to verify decorator function working as expected
Run tests with gcc-4.9.2 and no failure reported

Reviewers: sivachandra, ovyalov, vharron, chaoren

Subscribers: lldb-commits

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

llvm-svn: 235368
2015-04-21 01:15:47 +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
Robert Flack 8f4c4d535b Update sys.platform switched behavior in tests to use self.getPlatform (remote target platform)
Uses target platform when determining which platform specific behavior to use
or expect in tests. TestHelp.py was unchanged because this is asserting
behavior of the local lldb binary.

Test Plan:
Run tests on different remote os. Several previously failing tests now pass:
TestArrayTypes.py
TestInferiorChanged.py
TestInferiorCrashing.py
TestIvarProtocols.py
TestProcessIO.py
TestPublicAPIHeaders.py
TestRecursiveInferior.py

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

llvm-svn: 233805
2015-04-01 13:26:16 +00:00
Adrian McCarthy b016b3cfea Fix lld command on Windows for many tests.
llvm-svn: 233416
2015-03-27 20:47:35 +00:00
Oleksiy Vyalov 49b71c609c Make OSX test run firewall friendly.
http://reviews.llvm.org/D7115

llvm-svn: 226856
2015-01-22 20:03:21 +00:00
Shawn Best d64bc4bee6 fix Bug21211 : reworked test/api/multithreaded/test_listener_event_description.cpp to work properly on Linux/FreeBSD
Issue D5632 fixed an issue where linux would dump spurious output to tty on startup (due to a broadcast stop event). After the checkin, it was noticed on FreeBSD a unit test was now failing. On closer investigation I found the test was using the C++ API to launch an inferior while using an SBListener to monitor the public state changes. As on OSx, it was expecting to see:

eStateRunning
eStateStopped

On Linux/FreeBSD, there is an extra state change

eStateLaunching
eStateRunning
eStateStopped

I reworked the test to work for both cases and re-enabled the test of FreeBSD.

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

llvm-svn: 222511
2014-11-21 06:49:39 +00:00
Shawn Best 954eae0ed4 add Makefile rule for test program CREATE_STD_THREADS
Effectively removes -lpthreads from linux/gcc build of test programs in test/api/multithreaded. This was done due to that combination causing a test program to hang due, likely due to an issue with gcc linker and libstdc++ conflicting pthreads code in test program and pthread used by lldb.  Issue has been documented at:
http://llvm.org/bugs/show_bug.cgi?id=21553

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

llvm-svn: 222031
2014-11-14 19:41:33 +00:00
Greg Clayton dc6224e0a3 Make the "synchronous" mode actually work without race conditions.
There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be.

llvm-svn: 220254
2014-10-21 01:00:42 +00:00
Enrico Granata 82909b9f1d Some more test marking
llvm-svn: 219981
2014-10-16 23:03:06 +00:00
Enrico Granata d2657c53ac This test needs the SB headers to make sense
llvm-svn: 219980
2014-10-16 23:02:45 +00:00
Ed Maste ef9bc3d857 Add decorator for FreeBSD failure
llvm.org/pr21211

llvm-svn: 219329
2014-10-08 18:16:24 +00:00
Enrico Granata 91c2d6d642 This test also relies on the SB API headers. Same logic
llvm-svn: 219147
2014-10-06 21:42:22 +00:00
Enrico Granata b633e43d2b In some cases, the LLDB test suite will be run on a built framework with no sources coming along. In those cases, we want to skip the SB API test case. Add a marker for that, and apply it
llvm-svn: 219146
2014-10-06 21:37:06 +00:00
Ed Maste ee7902d3b2 Add ENABLE_THREADS for these threaded tests
On at least FreeBSD linking with -lpthread is needed for std::thread.

llvm-svn: 218899
2014-10-02 19:15:00 +00:00
Greg Clayton ee3be91995 Add some tests to be skipped when run remotely and also fixed a test to be more reliable when it comes to stopping on a specific line.
llvm-svn: 218079
2014-09-18 21:32:05 +00:00
Jason Molenda 33a3017a7d Clean up after the multithreaded test case finishes.
Patch by Sean Callanan.
<rdar://problem/18140875> 

llvm-svn: 216504
2014-08-26 23:31:00 +00:00
Zachary Turner c7826524ac Get test executables compiling on Windows.
Many of the test executables use pthreads directly.  This isn't
portable on Windows, so this patch converts these test to use
C++11 threads and mutexes.  Since Windows' implementation of
std::thread classes throw and catch from header files, this patch
also disables exceptions when compiling with clang on Windows.

Reviewed by: Todd Fiala, Ed Maste

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

llvm-svn: 215562
2014-08-13 17:44:53 +00:00
Ed Maste 8abef69ad9 Add FreeBSD decorator for TestMultipleDebuggers
llvm.org/pr20282

llvm-svn: 212877
2014-07-12 15:21:55 +00:00
Todd Fiala 57cacb013f Flipped intermittent test failures from skip to XFAIL.
The following intermittently-failing tests have been flipped from
skip to XFAIL on some combo of Linux and MacOSX:

TestCallStopAndContinue.py (Linux, MacOSX)
TestCallWithTimeout.py (Linux)
TestConvenienceVariables.py (Linux)
TestStopHookMultipleThreads.py (Linux)

The following new tests have been marked XFAIL but are just
intermittently failing:

TestMultipleDebug.py (definitely intermittent on MacOSX, not sure I've seen
it pass yet on Linux)

llvm-svn: 212762
2014-07-10 20:52:08 +00:00
Jason Molenda 3b9a93498b Get the inferior binary's name via the command line argument instead
of hardcoding it.

llvm-svn: 212698
2014-07-10 10:23:01 +00:00
Jason Molenda 91c2a99740 Fix test name.
llvm-svn: 212694
2014-07-10 09:55:19 +00:00
Jason Molenda 277335f9b2 Add a new 'stresstest' category, set the api/multiple-debuggers test case as a stresstest.
llvm-svn: 212673
2014-07-10 02:21:16 +00:00
Jason Molenda 8c07401504 Add a new test in api/multiple-debuggers which tries to create 50
debug sessions simultaneously to expose race conditoin/locking
issues.

This directory has an inferior program, testprog.cpp that has a
couple of functions we can put breakpoints on.

It has a driver program, multi-process-driver.cpp, which links
against the LLDB solib and uses the SB APIs.  It creates 50 pthreads,
creates a debugger on all of them, launches a debug session of the
inferior testprog, hits a couple breakpoints, walks the stack,
continues, etc., and then kills the inferior and ends the debug
session.

A pass is if all fifty debug sessions complete successfully
in the alloted time (~60 seconds).

We may need to tweak this one to work correctly on different
platforms/targets but I wanted to get it checked in to start.

llvm-svn: 212671
2014-07-10 02:17:31 +00:00
Todd Fiala 9d03d8a65d Fix broken TestMultithreaded on Linux.
The clean line is failing under Ubuntu 12.04/gcc.  It cleans fine
without it on MacOSX.  It doesn't clean right on Linux but at least
now it doesn't fail the test.

llvm-svn: 208713
2014-05-13 17:20:17 +00:00
Todd Fiala 347284f82d Re-enable TestMultithreaded.py test on Linux.
I could not get http://llvm.org/bugs/show_bug.cgi?id=16016)
to fail on my end running 10 times in a row.  Re-enabling
the test.

llvm-svn: 202446
2014-02-28 00:13:00 +00:00
Ed Maste c5efc526c8 Remove decorators for now-fixed pr18191
llvm-svn: 199557
2014-01-18 17:03:41 +00:00
Greg Clayton c694751a06 Correctly set the working directory when launching processes for both local and remote targets.
llvm-svn: 197266
2013-12-13 19:18:59 +00:00
Greg Clayton 4570d3eba0 Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case.
This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated.

Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. 

llvm-svn: 196985
2013-12-10 23:19:29 +00:00
Ed Maste 1d981a9606 test: Update decorators for FreeBSD failures with threaded inferior support
llvm.org/pr18190
llvm.org/pr18191

llvm-svn: 196792
2013-12-09 17:27:18 +00:00
Enrico Granata e397a94c5d <rdar://problem/15368142>
For this test case, one needs to get the name of the symbol since we don't have debug info to generate an SBFunction

llvm-svn: 193879
2013-11-01 18:48:03 +00:00
Enrico Granata 4c379c2b8d Skip this test case pending figuring out why it fails
llvm-svn: 193844
2013-11-01 01:00:57 +00:00
Ed Maste 34bdbbdf97 test: Update FreeBSD failure decorators
llvm.org/pr15261 missing size for static arrays
llvm.org/pr15278 expressions generating signals
llvm.org/pr15824 thread states aren't properly maintained
llvm.org/pr16696 threaded inferior debugging not yet on FreeBSD
llvm.org/pr17214 inline stepping fails on FreeBSD
llvm.org/pr17225 Clang assertion failure
llvm.org/pr17226 frame info lost after failed expression evaluation
llvm.org/pr17228 test timeout

The first three are existing Linux issues that also affect FreeBSD.

llvm-svn: 190698
2013-09-13 15:34:59 +00:00
Ed Maste 2a1eb4318d Use getwd(0) on FreeBSD as on OS X.
llvm-svn: 190070
2013-09-05 17:05:37 +00:00
Daniel Malea e0f8f574c7 merge lldb-platform-work branch (and assorted fixes) into trunk
Summary:
    This merge brings in the improved 'platform' command that knows how to
    interface with remote machines; that is, query OS/kernel information, push
    and pull files, run shell commands, etc... and implementation for the new
    communication packets that back that interface, at least on Darwin based
    operating systems via the POSIXPlatform class. Linux support is coming soon.

    Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS
    X Mountain Lion.

    Additional improvements (not in the source SVN branch 'lldb-platform-work'):
    - cmake build scripts for lldb-platform
    - cleanup test suite
    - documentation stub for qPlatform_RunCommand
    - use log class instead of printf() directly
    - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely.
    - add new logging category 'platform'

    Reviewers: Matt Kopec, Greg Clayton

    Review: http://llvm-reviews.chandlerc.com/D1493

llvm-svn: 189295
2013-08-26 23:57:52 +00:00
Ed Maste 372c24d9f2 tests: Build test code on FreeBSD the same way as on Linux
llvm-svn: 187155
2013-07-25 21:02:34 +00:00
Daniel Malea 0a693d9d66 Disable test case that causes assertion failure on Linux
- filed llvm.org/pr16016
- fixed URL for llvm.org/pr16000

llvm-svn: 181902
2013-05-15 17:46:16 +00:00
Jim Ingham c0dfddb302 Didn't mean to check in this change...
llvm-svn: 181858
2013-05-15 01:12:43 +00:00