This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Replace TestAbortExitCode with a debugserver specific test
ClosedPublic

Authored by teemperor on Oct 13 2020, 3:06 AM.

Details

Summary

When I added TestAbortExitCode I actually planned this to be a generic test for the
exit code functionality on POSIX systems. However due to all the different test setups we
can have I don't think this worked out. Right now the test had to be made so permissive
that it pretty much can't fail.

Just to summarize, we would need to support the following situations:

  1. ToT debugserver (on macOS)
  2. lldb-server (on other platforms)
  3. Any old debugserver version when using the system debugserver (on macOS)

This patch is removing TestAbortExitCode and adds a ToT debugserver specific test
that checks the patch that motivated the whole exit code testing. There is already
an exit-code test for lldb-server from what I can see and 3) is pretty much untestable
as we don't know anything about the system debugserver.

Diff Detail

Event Timeline

teemperor created this revision.Oct 13 2020, 3:06 AM
teemperor requested review of this revision.Oct 13 2020, 3:06 AM
kastiglione accepted this revision.Oct 13 2020, 8:16 AM

Thanks

lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py
12

is this required even if it's not explicitly used?

This revision is now accepted and ready to land.Oct 13 2020, 8:16 AM
teemperor added inline comments.Oct 13 2020, 8:25 AM
lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py
12

If you mean whether this test will work without this line: Nope, TestBase will complain as it uses that to compute the actual path to the current test file.

Whether we could potentially get rid of the mydir = ... boilerplate: Potentially. I believe it was only really necessary due to the way the test suite was originally designed (where one could run dotest.py as the test driver for multiple *.py test files). Jonas probably knows more about that.

Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2020, 8:34 AM
lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py