Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustbuild: Don't re-run tests suites that already passed #36385
Comments
alexcrichton
added
the
A-rustbuild
label
Sep 10, 2016
alexcrichton
assigned
sanxiyn
Sep 10, 2016
This comment has been minimized.
This comment has been minimized.
|
@sanxiyn would love to tackle! |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
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) |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
@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). |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov That's surprising, we invoke |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
|
From testing 39321aa:
|
This comment has been minimized.
This comment has been minimized.
|
Thanks for testing @petrochenkov! Want to send a PR w/ the rsbegin/rsend patch after that PR lands? |
petrochenkov
referenced this issue
Feb 4, 2017
Closed
debuginfo-gdb tests fail: <error reading variable> #39522
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Feb 22, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Feb 23, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Feb 23, 2017
bors
added a commit
that referenced
this issue
Feb 24, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Feb 24, 2017
This comment has been minimized.
This comment has been minimized.
|
I believe this is more-or-less done now, so closing. |
alexcrichton commentedSep 10, 2016
For example if the
run-passtest 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!