[lldb-dev] Proposal: Using LLD in tests

Pavel Labath via lldb-dev lldb-dev at lists.llvm.org
Thu Apr 19 10:44:55 PDT 2018


On Thu, 19 Apr 2018 at 18:19, Leonard Mosescu <mosescu at google.com> wrote:

>>    the PDB tests under lit/SymbolFile/PDB need a linker to produce the
program database


> With this proposal, would we preserve any coverage for MSVC produced
debug information?


Well.. the question there is what are you trying to test? Is it the fact
your debugger works with a particular compiler+linker
combination (note that those tests already compile with clang-cl), or that
your pdb-parsing code is sane. (integration vs. regression test).

Historically we've only had the former kind of tests (dotest), and we've
had the ability (and used it) to run those tests against different kinds of
compilers. This is all nice, but it means that a specific test will be
testing a different thing for every person who runs it. That's why I would
like to build up a suite of more regression-like tests (*). I would say
that the tests under lit/*** should be regression tests and our goal should
be to remove as many system dependencies as possible, and leave the job of
testing integration with a specific toolchain to "dotest" tests (**).

Technically, the answer to your question is "no", because currently dotest
tests don't know how to work with cl+link. Making that work would be an
interesting project (although a bit annoying as the Makefiles are full of
gcc-isms). However, I don't think that should stop us here.

(*) Ideally I would like to leave even the compiler out of the equation for
these tests, and make it so that the tests always run on the exact same set
of bytes. I am hoping I will be able to write at least some tests using .s
files. However, I don't think I will do that for all of them, because these
files can be long/verbose/tedious to write.

(**) However, even "dotest" tests should have a "default" mode which is as
hermetic as possible.


More information about the lldb-dev mailing list