Allow running the mold test suite#903
Conversation
|
Since the architecture being tested should be injectable via environment variables from outside, expanding this support to all architectures currently supported by wild should be achievable when running these tests via GitHub Actions. |
|
Thanks for working on this PR! Don't worry about those two test failures on ubuntu:25.10, they're not related to your change and have been happening all day. We might need to disable 25.10 if they continue. My first question is how does this use wild as the linker when running the tests? |
8aac347 to
a187694
Compare
|
@davidlattimore Sorry, I simply forgot to add the |
a187694 to
b8b85b2
Compare
fe716fd to
8da0878
Compare
|
Have a couple of general comments:
|
|
One potential integration opportunity would be adding Mold as a submodule of the project. |
I guess that should be OK. Perhaps in a subdirectory. e.g. |
I'm generally reluctant to use external test suites as submodules:
|
8da0878 to
7f1d62b
Compare
Well, yes, but we're speaking about a rather small git repository.
That's, from my perspective, a desired feature. Every time we pull Mold's changes, one needs to triage new tests and mark them as passing or failing. Otherwise, everyone from Wild's developers will stick to a different revision of Mold, and then we'll see test suite pass rate inconsistency. Plus, having the test suite at a fixed location will simplify any current code that deals with the proper finding of the tests. |
|
You also do not always have to initialize the submodules. This is how the Rust compiler repository works. It has some necessary submodules, like docs, but you can skip others depending on your build configuration. |
I think this argument is a pretty compelling reason to want either a submodule, or some other mechanism that involves having the commit hash of mold to use checked into our repo.
This would definitely be very nice and from the look of things, I think shouldn't be too hard. It's also fine to leave changes until later PRs if you prefer - just let us know which things you'd like to leave for later. |
9c5c412 to
ece6606
Compare
f1d0075 to
5d1e723
Compare
5d1e723 to
810dbcd
Compare
810dbcd to
4dd7c62
Compare
|
Submodules and nix flakes interact extremely poorly for very silly reasons. I have no clue how to get them to work together after messing with it for a few minutes and googling around. If it is holding you up, you can comment out these lines and it should work |
|
It looks as though rstest is giving an error at build time if the file pattern doesn't exist. That's unfortunate. The only solution I can think of at the moment would be to put that test behind a |
|
Or, if we wanted it to be driven by |
f5c32fc to
7e64075
Compare
|
I'm curious if we could simply remove the |
073685d to
ee42093
Compare
I was exactly struggling with the best way to centrally manage |
I guess that means that we don't need anything in |
0850fb5 to
36c6133
Compare
36c6133 to
117c016
Compare
The goal is to make running the mold test suite in wild mode easier, thereby facilitating the discovery of potential bugs and missing implementations. This can be achieved by executing tests with the
mold_testsfeature enabled (i.e.,cargo test --features mold_tests). Future PRs will automatically classify which outputs should be properly ignored, such as error messages.As some preliminary statistics, the following tests currently pass as is (on my x86-64 machine):
click to expand
All output of
cargo test --features mold_testshas been consolidated into this.