[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
[LLDB] Fix TestJobControl.py decorators import
[LLDB] Skip TestJobControl.py AArch64/Arm LinuxTestJobControl.py is randomly failing on AArch64/Arm Linux buildbots.I am marking it as skipped to make buildbot stable.
[lldb/driver] Fix SIGTSTP handlingOur SIGTSTP handler was working, but that was mostly accidental.The reason it worked is because lldb is multithreaded for most of itslifetime and the OS is reas
[lldb/driver] Fix SIGTSTP handlingOur SIGTSTP handler was working, but that was mostly accidental.The reason it worked is because lldb is multithreaded for most of itslifetime and the OS is reasonably fast at responding to signals. So,what happened was that the kill(SIGTSTP) which we sent from inside thehandler was delivered to another thread while the handler was still setto SIG_DFL (which then correctly put the entire process to sleep).Sometimes it happened that the other thread got the second signal afterthe first thread had already restored the handler, in which case thesignal handler would run again, and it would again attempt to send theSIGTSTP signal back to itself.Normally it didn't take many iterations for the signal to be deliveredquickly enough. However, if you were unlucky (or were playing aroundwith pexpect) you could get SIGTSTP while lldb was single-threaded, andin that case, lldb would go into an endless loop because the secondSIGTSTP could only be handled on the main thread, and only after thehandler for the first signal returned (and re-installed itself). In thatsituation the handler would keep re-sending the signal to itself.This patch fixes the issue by implementing the handler the way itsupposed to be done:- before sending the second SIGTSTP, we unblock the signal (it gets automatically blocked upon entering the handler)- we use raise to send the signal, which makes sure it gets delivered to the thread which is running the handlerThis also means we don't need the SIGCONT handler, as our TSTP handlerresumes right after the entire process is continued, and we can do therequired work there.I also include a test case for the SIGTSTP flow. It uses pexpect, but itincludes a couple of extra twists. Specifically, I needed to create anextra process on top of lldb, which will run lldb in a separate processgroup and simulate the role of the shell. This is needed because SIGTSTPis not effective on a session leader (the signal gets delivered, but itdoes not cause a stop) -- normally there isn't anyone to notice thestop.Differential Revision: https://reviews.llvm.org/D120320
[LLDB] Skip random fails on Arm/AArch64 Linux buildbotFollowing tests fail on Arm/AArch64 randomly with timeouts:TestMultilineNavigation.pyTestBatchMode.pyTestUnicode.pyTestGdbRemote_vContThre
[LLDB] Skip random fails on Arm/AArch64 Linux buildbotFollowing tests fail on Arm/AArch64 randomly with timeouts:TestMultilineNavigation.pyTestBatchMode.pyTestUnicode.pyTestGdbRemote_vContThreads.pyI am marking them as skipped until we find a away make to pass reliably.
[lldb/test] Catch invalid calls to expect()Add preconditions to `TestBase.expect()` that catch semantically invalid callsthat happen to succeed anyway. This also fixes the broken callsites caught
[lldb/test] Catch invalid calls to expect()Add preconditions to `TestBase.expect()` that catch semantically invalid callsthat happen to succeed anyway. This also fixes the broken callsites caught bythese checks.This prevents the following incorrect calls:1. `self.expect("lldb command", "some substr")`2. `self.expect("lldb command", "assert message", "some substr")`Differential Revision: https://reviews.llvm.org/D88792
[lldb] Modify the `skipIfRemote` decorator so we can skip all PExpect tests.This patch modifies the skipIfRemote decorator so it can apply to awhole class, which allows us to skip all PExpect test
[lldb] Modify the `skipIfRemote` decorator so we can skip all PExpect tests.This patch modifies the skipIfRemote decorator so it can apply to awhole class, which allows us to skip all PExpect tests as a whole.Differential revision: https://reviews.llvm.org/D85365
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdi
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runnerfor d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done```lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.Reviewers: labath, JDevlieghereTags: #lldbDifferential Revision: https://reviews.llvm.org/D71151