I love the concept of the "crater run" (or I guess now "cargo bomb"?), where the entire crate (i.e. "package") ecosystem is compiled, as a test for speculative compiler changes.<p>It's one of the huge benefits of being both a statically-typed compiled language and offering a modern package system. A lot of languages have the types & compiling but no standard package ecosystem (Haskell, Go, Java), or the package ecosystem but not the compiling (Ruby+Gems, JS+npm, etc). Rust is the only language I can think of that has both, although I'm sure there are others. I'm not sure if there's tooling for compiler writers in other languages to compile them all, though.<p>And this feature will only get more and more powerful as the ecosystem grows. I think it's a seriously important tool to keep the rust language feeling stable.
> There’s a big downside though in that landing patches to Rust is serialized on running the test suite on every patch, and it takes a particularly long time to Run the Rust test suite in all the configurations we care about.<p>One solution is speculative batched testing. Kubernetes uses this to keep up with its very high rate of PRs (>40 merges/day) and ~1hr maximum test times.<p>Given a queue of patches A, B, C, D, start the normal testing against A, but <i>also</i> start testing the merge of A+B+C+D against the master. If the batch passes first, merge them all. If A is merged first, it's still "compatible" with A+B+C+D, so they can go ahead. Doing a batch in parallel with a single PR like this slightly increases testing load, but ideally doesn't cause any slowdowns versus the fully serialized case.<p>It looks like bors already supports something like this with "rollups", where simple fixes can be marked for testing together: <a href="https://internals.rust-lang.org/t/batched-merge-rollup-feature-has-landed-on-bors/1019" rel="nofollow">https://internals.rust-lang.org/t/batched-merge-rollup-featu...</a>
> At some point though LLVM began doing a valid optimization that valgrind was unable to recognize as valid, and that made its application useless for us, or at least too difficult to maintain.<p>What optimization was that? Some searching didn't turn up any relevant results (other than this article).
> The thing we do differently from most is that we run the full test suite against every patch, as if it were merged to master, <i>before</i> committing it into the master branch, whereas most CI setups test <i>after</i> committing, or if they do run tests against every PR, they do so before merging, leaving open the possibility of regressions introduced during the merge.<p>Hm, Travis CI on GitHub runs tests on a pull request before the merge. Is what they're doing really that unusual?
It would be really nice if Travis had Linux-on-ARMv7 and Linux-on-aarch64 options on real ARM hardware. I wonder what the economics of Travis building such a thing on top of an existing ARM cloud offering like Scaleway would be.
I have been taking inspiration from the Rust project and the way they go about things in general. In my workplace, we have a bot similar to bors, which does the merge request testing and is the gatekeeper.<p>Tools like bors act as a "force-multiplier".
Heads up that your Google fonts (in site.css) trigger a warning about insecure scripts, and in Chrome at least they therefore don't load by default.
I don't get it, because you have just explained how to unit test everything else. Which is way better than nothing. Not sure how it is moot, also not sure how it is related to the article :)
Unit test in a nutshell, for a business system:<p>Practically every business system consists of a view, the logic and the database, plus some webservice and whatnot, but mainly its those 3 parts (the so called 3 layers).<p>Can you unit test, test the view layer? Not really.
Can you unit test, test the database by doing real test? Again, not really and its not always possible.
So, Unit test is mainly focused in the layer in between of the view and database and both, by their nature, can't be automatically tested.<p>I like the idea of Unit Test but, for business system, its moot.