<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/api/multiple-debuggers, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb] Include unistd.h for _exit  in multi-process-driver.cpp</title>
<updated>2025-06-13T17:02:41+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-06-13T17:02:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2704b27a0b452f4aaf87ab26d315fdc92857373a'/>
<id>2704b27a0b452f4aaf87ab26d315fdc92857373a</id>
<content type='text'>
This test fails to build on macOS without the correct header include.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test fails to build on macOS without the correct header include.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Disable TestMultipleDebuggers again</title>
<updated>2025-06-13T09:12:01+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-06-13T09:10:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=06c783567069db169ee2d1545a4bd3ffd0e3fec0'/>
<id>06c783567069db169ee2d1545a4bd3ffd0e3fec0</id>
<content type='text'>
I did manage to turn a crash into a non-zero return code,
but on the very first build it managed to time out.

I thought I had the appetite to tweak timeouts but
on second thought, I don't want yet another test to look
out for.

The test is not wrong, but on heavily loaded machines
it's always going to be inherently unstable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I did manage to turn a crash into a non-zero return code,
but on the very first build it managed to time out.

I thought I had the appetite to tweak timeouts but
on second thought, I don't want yet another test to look
out for.

The test is not wrong, but on heavily loaded machines
it's always going to be inherently unstable.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Don't call SBDebugger::Terminate if TestMultipleDebuggers times out (#143732)</title>
<updated>2025-06-13T08:31:57+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-06-13T08:31:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=addd98f7a5b964a5a5860d65f327f3fc3b7e0a42'/>
<id>addd98f7a5b964a5a5860d65f327f3fc3b7e0a42</id>
<content type='text'>
Fixes #101162

This test did this:
* SBDebugger::Initialize
* Spawn a bunch of threads that do:
  * SBDebugger::Create
  * some work
  * SBDebugger::Destroy
* Wait on those threads to finish then call SBDebugger::Terminate and
exit, or -
* Reach a time limit before all the threads finish, call
SBDebugger::Terminate and exit.

The problem was that in the timeout case, calling SBDebugger::Terminate
destroys data being used by threads that are still running. I expect
this test was expecting said threads to be so broken they were probably
stuck, but when the machine is just heavily loaded, one of them might
read that data before the whole program exits.

This means what should have been a timeout becomes a crash. Sometimes.
Which explains why we saw both timeouts and various signals on the
AArch64 Linux bot. It depends on the timings.

So I'm changing it not to call SBDebugger::Terminate in the timeout
case. We will have to tweak the timeout value based on what happens on
the buildbot, but we will know it's machine load not an lldb bug.

Also use _exit instead of exit, to skip more cleanup that might cause a
crash.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #101162

This test did this:
* SBDebugger::Initialize
* Spawn a bunch of threads that do:
  * SBDebugger::Create
  * some work
  * SBDebugger::Destroy
* Wait on those threads to finish then call SBDebugger::Terminate and
exit, or -
* Reach a time limit before all the threads finish, call
SBDebugger::Terminate and exit.

The problem was that in the timeout case, calling SBDebugger::Terminate
destroys data being used by threads that are still running. I expect
this test was expecting said threads to be so broken they were probably
stuck, but when the machine is just heavily loaded, one of them might
read that data before the whole program exits.

This means what should have been a timeout becomes a crash. Sometimes.
Which explains why we saw both timeouts and various signals on the
AArch64 Linux bot. It depends on the timings.

So I'm changing it not to call SBDebugger::Terminate in the timeout
case. We will have to tweak the timeout value based on what happens on
the buildbot, but we will know it's machine load not an lldb bug.

Also use _exit instead of exit, to skip more cleanup that might cause a
crash.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Disable TestMultipleDebuggers on Linux</title>
<updated>2024-09-04T09:33:35+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2024-09-04T09:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0b2550f8ab77a53f560f6a7a1b401c4803a36d48'/>
<id>0b2550f8ab77a53f560f6a7a1b401c4803a36d48</id>
<content type='text'>
This used to timeout (https://github.com/llvm/llvm-project/issues/101162)
now it's aborting (https://github.com/llvm/llvm-project/pull/105765#issuecomment-2327645665)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This used to timeout (https://github.com/llvm/llvm-project/issues/101162)
now it's aborting (https://github.com/llvm/llvm-project/pull/105765#issuecomment-2327645665)
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Fix TestMultipleDebuggers test on non-x86, other small issues (#101169)</title>
<updated>2024-07-31T07:37:42+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2024-07-31T07:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa07282a25c3d6df04af9a4d34874cc433c9c68a'/>
<id>aa07282a25c3d6df04af9a4d34874cc433c9c68a</id>
<content type='text'>
This test has been flaky lately
(https://github.com/llvm/llvm-project/issues/101162) and I disabled it
everywhere initially.

I found that it always uses "x86_64" for the program architecture so the
test was "passing" elsewhere but I don't think it was meant to. So I
have added a define to pass on the host's architecture when compiling.
This makes it work on AArch64 as well.

While I'm here I've fixed the uint64_t formatting warnings by using the
defined formats that'll work everywhere.

In addition, I found that the function names include "()" on Linux, so
now we check for "foo" or "foo()".

The test cpp file has never been, or was only partially formatted so
I've not formatted the changes, just kept to the local style.

I've removed the Linux skip to see if any of this helps the timeouts,
and to verify the build command changes. If the timeouts come back I'll
disable it again.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test has been flaky lately
(https://github.com/llvm/llvm-project/issues/101162) and I disabled it
everywhere initially.

I found that it always uses "x86_64" for the program architecture so the
test was "passing" elsewhere but I don't think it was meant to. So I
have added a define to pass on the host's architecture when compiling.
This makes it work on AArch64 as well.

While I'm here I've fixed the uint64_t formatting warnings by using the
defined formats that'll work everywhere.

In addition, I found that the function names include "()" on Linux, so
now we check for "foo" or "foo()".

The test cpp file has never been, or was only partially formatted so
I've not formatted the changes, just kept to the local style.

I've removed the Linux skip to see if any of this helps the timeouts,
and to verify the build command changes. If the timeouts come back I'll
disable it again.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Disable flakey TestMultipleDebuggers on Linux</title>
<updated>2024-07-10T15:30:06+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2024-07-10T15:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8210087beebe173e1ace7a0311adf942294c62c9'/>
<id>8210087beebe173e1ace7a0311adf942294c62c9</id>
<content type='text'>
This has been flakey lately on Linux on the buildbots and in CI
on PRs.

For example:
https://lab.llvm.org/buildbot/#/builders/59/builds/1324
https://github.com/llvm/llvm-project/pull/98237

I will try to track down the cause tomorrow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has been flakey lately on Linux on the buildbots and in CI
on PRs.

For example:
https://lab.llvm.org/buildbot/#/builders/59/builds/1324
https://github.com/llvm/llvm-project/pull/98237

I will try to track down the cause tomorrow.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Give more time to test/API/multiple-debuggers</title>
<updated>2024-06-20T16:45:58+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-06-20T15:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=869f5517605224944d6037716e234d9f1f0e7067'/>
<id>869f5517605224944d6037716e234d9f1f0e7067</id>
<content type='text'>
This test occasionally fails on two of the busiest CI bots (asan and
matrix), and we can't reproduce it locally. This leads to the
hypothesis that the test is timing out (in the sense of the number of
"join attempts" performed by this test's driver).

This commit doubles the number of iterations performed and also does
an NFC refactor of the main test loop so that it can be more easily
understood.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test occasionally fails on two of the busiest CI bots (asan and
matrix), and we can't reproduce it locally. This leads to the
hypothesis that the test is timing out (in the sense of the number of
"join attempts" performed by this test's driver).

This commit doubles the number of iterations performed and also does
an NFC refactor of the main test loop so that it can be more easily
understood.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Don't overwrite the dynamic loader library path for "driver tests"</title>
<updated>2024-02-16T16:47:38+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-16T16:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0da0966da4b813386a85cf70ae0d0efc7cb2eaea'/>
<id>0da0966da4b813386a85cf70ae0d0efc7cb2eaea</id>
<content type='text'>
We have a handful of tests that build a driver which links against LLDB.
When running those binaries, we overwrite the dynamic loader library
path to point to the build directory's libs dir, presumably to make sure
we load LLDB from there.

This above becomes an issue when you have libc++ enabled and the driver
is linked against the system's libc++, but the dynamic loader flag
forces it to pick up libc++ from the libs dir.

We could try to make the logic for building the driver smarter and have
it pick up the just-built libc++ like we do for our test binaries, but I
don't think we need to overwrite the library path in the first place.
The build logic to build these drivers already takes care to set the
correct RPATH in the linker.

This patch removes the logic and simplifies the tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have a handful of tests that build a driver which links against LLDB.
When running those binaries, we overwrite the dynamic loader library
path to point to the build directory's libs dir, presumably to make sure
we load LLDB from there.

This above becomes an issue when you have libc++ enabled and the driver
is linked against the system's libc++, but the dynamic loader flag
forces it to pick up libc++ from the libs dir.

We could try to make the logic for building the driver smarter and have
it pick up the just-built libc++ like we do for our test binaries, but I
don't think we need to overwrite the library path in the first place.
The build logic to build these drivers already takes care to set the
correct RPATH in the linker.

This patch removes the logic and simplifies the tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix and rename skipIfHostIncompatibleWithRemote</title>
<updated>2024-02-16T15:59:03+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-16T07:43:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bf93f4b85fd4efbd7a3083935a2ddbbb00f1a35f'/>
<id>bf93f4b85fd4efbd7a3083935a2ddbbb00f1a35f</id>
<content type='text'>
Fix and rename the broken and confusingly named decorator
skipIfHostIncompatibleWithRemote. The decorator is meant to skip test
which uses the inferior test build system (i.e. to build test inferiors)
to build host binaries (e.g. lldb drivers).

The decorator was broken on macOS, where the host and target platform
report macosx, but the decorator overwrote it with Darwin, resulting in
tests incorrectly being skipped.

The decorator was also missing on a handful of tests that use the
buildDriver helper, which this commit fixes as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix and rename the broken and confusingly named decorator
skipIfHostIncompatibleWithRemote. The decorator is meant to skip test
which uses the inferior test build system (i.e. to build test inferiors)
to build host binaries (e.g. lldb drivers).

The decorator was broken on macOS, where the host and target platform
report macosx, but the decorator overwrote it with Darwin, resulting in
tests incorrectly being skipped.

The decorator was also missing on a handful of tests that use the
buildDriver helper, which this commit fixes as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove obsolete signBinary helper (#79656)</title>
<updated>2024-01-27T04:37:44+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-01-27T04:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75952873036fc9989fcf12c526d1a2deaeef596a'/>
<id>75952873036fc9989fcf12c526d1a2deaeef596a</id>
<content type='text'>
On Darwin, the Makefile already (ad-hoc) signs everything it builds.
There's also no need to use lldb_codesign for this.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Darwin, the Makefile already (ad-hoc) signs everything it builds.
There's also no need to use lldb_codesign for this.</pre>
</div>
</content>
</entry>
</feed>
