This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [llgs] Add base nonstop fork/vfork tests
ClosedPublic

Authored by mgorny on Jun 27 2022, 5:54 AM.

Details

Summary

Extend the most of baseline fork tests to run in nonstop mode as well.
For more cases, we're just testing one example scenario to save time.
This patch does not cover tests that rely on correct exit handling,
as fixing that is addressed in a followup patch.

Sponsored by: The FreeBSD Foundation

Diff Detail

Event Timeline

mgorny created this revision.Jun 27 2022, 5:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 5:54 AM
Herald added a subscriber: arichardson. · View Herald Transcript
mgorny requested review of this revision.Jun 27 2022, 5:54 AM

BTW this test is getting a bit long as well but I don't have a good idea how to split it, except for just moving some functions into a second file and making some reusable base class.

mgorny retitled this revision from [lldb] [llgs] Add nonstop fork/vfork tests to [lldb] [llgs] Add base nonstop fork/vfork tests.Jun 27 2022, 9:03 PM
mgorny edited the summary of this revision. (Show Details)
labath accepted this revision.Jun 28 2022, 6:45 AM

BTW this test is getting a bit long as well but I don't have a good idea how to split it, except for just moving some functions into a second file and making some reusable base class.

I don't know if that's necessary right now, but the general approach seems fine to me.

This revision is now accepted and ready to land.Jun 28 2022, 6:45 AM

Ok, I'll commit as-is then and will revisit if we start seeing timeouts.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2022, 12:49 PM
mib added a subscriber: mib.Jun 28 2022, 3:48 PM

Hi @mgorny,

There are some random test failures following this patch on lldb-debian-x86_64: https://lab.llvm.org/buildbot/#/builders/68/builds/34883

********************
Unresolved Tests (1):
  lldb-api :: tools/lldb-server/TestGdbRemoteFork.py

Would you mind taking a look at this ? Thanks!

I am trying to but unfortunately the server seems to be down. Unfortunately, I can't reproduce this on my aarch64 test machine but maybe the test is taking too long now (we've been suspecting that might be the case). I'm going to split it and see if that helps.

This looks like a genuine problem, see https://lab.llvm.org/buildbot/#/builders/68/builds/34903. If I had to guess, I'd say the problem is you're overwriting the context object holding the first pid (here: https://github.com/llvm/llvm-project/blob/main/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py#L87)

This looks like a genuine problem, see https://lab.llvm.org/buildbot/#/builders/68/builds/34903. If I had to guess, I'd say the problem is you're overwriting the context object holding the first pid (here: https://github.com/llvm/llvm-project/blob/main/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py#L87)

Good catch, I obviously meant to use pid1 and pid2 vars there. Thanks!

Ok, it seems that all the relevant bots are green now. Thanks again!

mib added a comment.Jun 29 2022, 4:35 PM

Not sure if this is related to this patch but TestGdbRemote_vContThreads.py is still timing out on the macOS bot:

https://green.lab.llvm.org/green/job/lldb-cmake/44958/console

Not sure if this is related to this patch but TestGdbRemote_vContThreads.py is still timing out on the macOS bot:

https://green.lab.llvm.org/green/job/lldb-cmake/44958/console

I see Jonas has already marked them "skip". Since I don't really have an environment to investigate this, I suppose this is as far as it gets.