-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustbuild: Don't re-run tests suites that already passed #36385
Comments
@sanxiyn would love to tackle! |
Thinking back to #36032 I think the true solution is to teach cargo to test the whole dependency closure of the given package and cache suites exit statuses. Then |
What if this was done in compiletest? Doesn't it already record success of each test? It would significantly speed up fixing up a failing test, for example. |
Using compiletest sounds plausible, yeah! It'd have to check the mtime of not only the input files, though, but also other inputs like the compiler and standard libraries (just to be certain) |
I'd like to complain about this once more, because this is blocking my work unless I switch to the old build system. Rustbuild is not usable for testing in presence of transient failures ("can't create directory" or something like this).
@alexcrichton |
@petrochenkov IMO we can fix this at the compiletest level - AFAIK it already outputs some files in case of success, all it needs to do is check timestamps on them and compare to the test source(s). |
I'm continuing to investigate how rustbuild works and will try to look at compiletest as well today, maybe I'll come up with some simple solution if it exists. |
LLVM build has very similar problem - if spurious failure (or Ctrl+C) happens, then the whole LLVM build is done once more instead of building only remaining parts. Looks like at least few dependency tracking babies were thrown out with |
@petrochenkov That's surprising, we invoke |
We definitely need to investigate and fix these problems. Transient failures are unacceptable and need to always be weeded out ASAP. We shouldn't architect everything around making these sorts of test failures easier to work with. I do realize, though, that debugging these issues are often quite difficult. I've spent many hours/days of my life tracking down spurious failures on the bots through PRs but 100% of the time it's always been an important bug we needed to fix regardless!
One of the primary goals of rustbuild was to make the build system far more approachable than the old Makefiles. Out of curiosity, have you taken a look at the internals of the build system? I've tried to be quite thorough in terms of documentation both at Another major goal of rustbuild is to precisely dispel the notion that I personally must fix all build system issues. It's not scalable to rely on me to fix issues or really reasonable to have all information silo'd in one place. My hope is that rustbuild's barrier to entry is vastly lower than the makefiles and with some motivation and documentation it should be just as easy to get contributors ramped up on the build system as it is with the compiler/standard library. Along those lines I'd like to challenge the notion of "so I guess you'll have to continue fixing most of the issues yourself". I'm sorry if you're feeling bad about the makefiles to rustbuild transition (you've opened quite a few issues where you seem quite annoyed), but this is a great time to help identify all these problems and work towards solutions. The makefiles I'm sure had something on the order of years of man-hours put into them to get everything working just the way it did. Unfortunately they reached the limit where no one could understand them and we still had more ambitions for our build system and change was needed. My goal right now is to make rustbuild as easy as possible to understand and modify and if it's not there yet then there's work still to be done. I'd love for constructive feedback about how to improve the situation or any documentation/refactorings needed!
I believe @eddyb's solution is the most promising so far. I would imagine the steps for this look like:
We'd want to be careful that
Yes, very little effort has been made to ensure this incremental rebuild works. Right now the "let's always start from a guaranteed state" hammer is applied but it should be easy to modify this. The We can likely take a similar approach with reconfiguring and such to avoid deleting this directory, though. Or perhaps we can just avoid deletion unless Again, though, this should be relatively easy to fix, and shouldn't be blocked on me! In any case this should also become a separate issue, it's likely too distracting to discuss this here further. |
Of course I'm annoyed, I have to fight with infra instead of doing what I was going to do.
That's what I do!
... and that's what I don't do, probably. I wish I were a student with plenty of free time and energy. I've looked through the code though and it's clear enough, unless some hairy cross-compiling stuff, or unfamiliar platforms, or distribution are involved, so maybe I'll still fix something quickly fixable. |
Solving concrete transient failures and solving this issue are orthogonal IMO. I agree that "failed to create dir" issues would better be fixed, but there are non-transient issues as well, not all platforms are equally well and timely supported (e.g. half of |
From testing 39321aa:
|
Thanks for testing @petrochenkov! Want to send a PR w/ the rsbegin/rsend patch after that PR lands? |
Fix test caching on Windows/GNU Addresses rust-lang#36385 (comment) Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns. Now the sysroot directory is reused and mingw startup objects are rebuilt only when necessary, so test caching works.
Fix test caching on Windows/GNU Addresses rust-lang#36385 (comment) Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns. Now the sysroot directory is reused and mingw startup objects are rebuilt only when necessary, so test caching works.
Fix test caching on Windows/GNU Addresses rust-lang#36385 (comment) Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns. Now the sysroot directory is reused and mingw startup objects are rebuilt only when necessary, so test caching works.
Fix test caching on Windows/GNU Addresses #36385 (comment) Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns. Now mingw startup objects are built in the native directory and then copied into the sysroot directory. They are also rebuilt only when necessary, so test caching works.
Fix test caching on Windows/GNU Addresses rust-lang#36385 (comment) Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns. Now mingw startup objects are built in the native directory and then copied into the sysroot directory. They are also rebuilt only when necessary, so test caching works.
I believe this is more-or-less done now, so closing. |
For example if the
run-pass
test suite passes entirely then we shouldn't re-run it if none of the dependencies have changed.We should also be sure though that if there's a test filter that we don't consider the run-pass test suite as passing, an annoyance with the makefiles!
The text was updated successfully, but these errors were encountered: