This is an archive of the discontinued LLVM Phabricator instance.

[dotest] Add a dotest flag `--force-dwarf` to override the tested DWARF version.
ClosedPublic

Authored by JDevlieghere on Aug 16 2019, 4:07 PM.

Details

Summary

On the matrix bot on GreenDragon [1] we want to run the test suite against different DWARF versions. The idea here is not to replace targeted tests for certain DWARF features, but rather to provide an easy way to support this configuration.

[1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Aug 16 2019, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2019, 4:08 PM

This is definitely more elegant than the current solution!

lldb/packages/Python/lldbsuite/test/dotest.py
353 ↗(On Diff #215702)

Does this actually work with tests whose Makefiles manually set CFLAGS_EXTRAS? I.e., do we need to distinguish between extra CFLAGS that come in from the layer above and ones that are meant to be customized in the individual test Makefiles?

For DWARF >= 4 it also matters for testing whether one is using -fdebug-types-section or not.

lldb/packages/Python/lldbsuite/test/dotest.py
373 ↗(On Diff #215702)

intentional?

labath accepted this revision.Aug 19 2019, 6:21 AM

This looks fine to me. We spoke about this on irc, but I'll just repeat what I said here for the record. Running the dotest tests with different compilers/architectures/dwarf versions/etc. is very useful for increasing coverage, finding new bugs, etc. However, I don't think we should be using this facility as a first or only line of defence against regressions. Specifically, I'd like to avoid arguments like "there's no need to add tests for this because this code is exercised when running the test suite with gcc-47 and dwarf-13 on a Tuesday wearing shorts". New features/bugfixes should be testable in the default configuration, and this facility should be the "extra mile".

lldb/packages/Python/lldbsuite/test/dotest.py
353 ↗(On Diff #215702)

If makefiles do CFLAGS_EXTRAS += ... instead of CFLAGS_EXTRAS = foo (which I think most do), then everything should be fine.

lldb/packages/Python/lldbsuite/test/dotest_args.py
129 ↗(On Diff #215702)

Maybe just call the argument --dwarf-version, just like the source variable?

This revision is now accepted and ready to land.Aug 19 2019, 6:21 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2019, 9:05 AM