Commit Graph

23 Commits

Author SHA1 Message Date
Zachary Turner d1c5b6f66b Fix a bunch of portability issues in test executables.
llvm-svn: 245983
2015-08-25 22:25:21 +00:00
Oleksiy Vyalov c8a3e9273c Try to enable TestProcessAttach tests on Linux.
http://reviews.llvm.org/D11013

llvm-svn: 241702
2015-07-08 18:15:32 +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
Ed Maste 31bc506987 Avoid Linux-specific header in platform-independent tests
llvm-svn: 237371
2015-05-14 16:39:02 +00:00
Siva Chandra ff2b29d0ea [TestAttachDenied] Use a file instead of a pipe for synchronization.
Summary:
One cannot use mknod or mkfifo on user Android devices. This commit
changes the use of pipe to a file to synchronize between the inferior
and the test.

Test Plan: dotest.py -P TestAttachDenied

Reviewers: ovyalov, chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 237328
2015-05-14 01:36:47 +00:00
Pavel Labath ac8be96242 Add expectedFailureLinux to TestProcessAttach
The test is skipped anyway due to timeout, but adding XFAIL improves grepability.

llvm-svn: 236224
2015-04-30 11:00:15 +00:00
Pavel Labath bbaba96860 Skip TestProcessAttach.py on Linux
The test was already XFAILed. Changing this to skip, because the test timeouts and gets flagged
as an error anyway.

llvm-svn: 235979
2015-04-28 12:28:08 +00:00
Siva Chandra 0bbe4f2c8e [TestProcessAttach] Decorate with expectedFailureLinux
Summary: Link to PR: llvm.org/pr23360

Test Plan: dotest.py -p TestProcessAttach

Reviewers: sivachandra

Subscribers: lldb-commits

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

llvm-svn: 235947
2015-04-27 23:56:23 +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 c235b16819 Destroy the attached process in tearDown() to fix ProcessAttachTestCase tests on OS X
This patch fixes the following:
```
1: test_attach_to_process_by_id_with_dsym (TestProcessAttach.ProcessAttachTestCase)
   Test attach by process id ... ok
2: test_attach_to_process_by_id_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
   Test attach by process id ... ok
3: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase)
   Test attach by process name ... FAILURE
4: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
   Test attach by process name ... FAILURE

======================================================================
FAIL: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase)
   Test attach by process name
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 462, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 35, in test_attach_to_process_by_name_with_dsym
    self.process_attach_by_name()
  File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name
    self.runCmd("process attach -n s" + exe_name)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd
    msg if msg else CMD_MSG(cmd))
AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully
Config=x86_64-clang
======================================================================
FAIL: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
   Test attach by process name
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 41, in test_attach_to_process_by_name_with_dwarf
    self.process_attach_by_name()
  File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name
    self.runCmd("process attach -n s" + exe_name)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd
    msg if msg else CMD_MSG(cmd))
AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully
Config=x86_64-clang
----------------------------------------------------------------------
```

Failure-x86_64-clang-TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_name_with_dsym.log:
```
[...]
runCmd: process attach -n ProcessAttach
runCmd failed!
error: attach failed: more than one process named ProcessAttach:
PID    PARENT USER       TRIPLE                   ARGUMENTS
====== ====== ========== ======================== ============================
43752  43680  IliaK      x86_64-apple-macosx      /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach
43663  1      IliaK      x86_64-apple-macosx      /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach
[...]
```

llvm-svn: 233272
2015-03-26 13:39:25 +00:00
Tamas Berghammer 05b098d250 Fix AttachDeniedTestCase on android
Failure caused by a missing mkfifo command in the android OS. This fix
replace mkfifo with "mknode p" command on android.

llvm-svn: 231651
2015-03-09 13:11:42 +00:00
Oleksiy Vyalov 891f88c1ac Fix TestAttachDenied.py remote execution on Linux.
http://reviews.llvm.org/D7659

llvm-svn: 229587
2015-02-17 23:37:19 +00:00
Oleksiy Vyalov 5d06474b29 Add test for denied process attach by pid and fix found bugs in Process/ProcessPOSIX.cpp
and FreeBSD/ProcessMonitor.

http://reviews.llvm.org/D6240

llvm-svn: 222372
2014-11-19 18:27:45 +00:00
Todd Fiala 0135e236b6 Fix TestProcessAttach for Linux ptracer lock-down and llgs-local.
llvm-svn: 220660
2014-10-27 00:31:05 +00:00
Steve Pucci befe2b1c48 This commit provides support for running the dosep.ty test driver with multiple threads.
It speeds up running the full test suite on my HP z620 Ubuntu machine with 32 hyperthreaded CPUs from 11 minutes to about 1m13s (about 9x).

The default behavior is to run single-threaded as before.  If the environment variable LLDB_TEST_THREADS is set, a Python work queue is set up with that many worker threads.

To avoid collisions within a test directory where multiple tests make use of the same prebuilt executable, the unit of work for the worker threads is a single directory (that is, all tests within a directory are processed in the normal serial way by a single thread).

tfiala & I have run this way a number of times; the only issue I found was that the TestProcessAttach.py test failed once, when attempting to attach to the process "a.out" by name.  I assume this is because some other thread was running an executable of that name at the same time, and we were attempting to attach to the wrong one, so I changed that test to use a different executable name (that change is also included in this commit).

llvm-svn: 203180
2014-03-07 00:01:11 +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 8607c24638 Attach by name tests now pass on FreeBSD
A FreeBSD implementation of Host::FindProcesses was added in r189295.
Contrary to my earlier report of failing tests it seems all attach by
name tests now pass.

http://www.llvm.org/pr16699

llvm-svn: 189680
2013-08-30 15:35:32 +00:00
Ed Maste 6c00f6d54a tests: Mark expected FreeBSD failures due to pr16699
FreeBSD's Host class doesn't yet return a list of running processes,
so 'platform process list' fails and attach by process name does not
work.

llvm-svn: 187142
2013-07-25 18:36:09 +00:00
Daniel Malea 243b379aa1 Re-enable tests disabled due to llvm.org/pr14541
- "platform process list" command works on Linux now
- "process attach -n" (attach to process by name also works on Linux now)

llvm-svn: 181905
2013-05-15 17:55:12 +00:00
Greg Clayton 65c163529d Fixed the process attach by name test to get the target _after_ doing process attach. Otherwise the target isn't valid. This fixes 2 test suite failures on darwin.
llvm-svn: 181488
2013-05-08 23:45:06 +00:00
Andrew Kaylor bf9b4c171a Adding support for process attach by pid on Linux.
llvm-svn: 181374
2013-05-07 22:46:38 +00:00
Greg Clayton 5fe0e7b2f6 Fixed a test suite typo error that caused the test to fail.
llvm-svn: 181069
2013-05-03 23:04:47 +00:00
Andrew Kaylor 46791da61a Adding test for non-API process attach
llvm-svn: 180977
2013-05-03 00:10:27 +00:00