Compiletest Archaeology: Uncovering Ancient Cursed Relics

By Julien Robert

Elevator Pitch

Prepare for a decade-old dive in compiletest, where you’ll learn how great feats of parallel execution of thousands of tests coexist with hilarious recently-patched unholy hacks… and how you can improve your own testing systems with the best the Rust compiler’s testing suite has to offer.

Description

Surely, the programming language which has made “safety” its middle name would be free from decade-old legacy code and ancient relics of Make and Bash hieroglyphs… This couldn’t be further from the truth! This talk is a guided exploration into compiletest, the automated testing system used by the Rust compiler - an enforcer of correctness for a language of correctness, from its most ingenious features to its most cursed duct-taped workarounds. You’ll learn how its greatest feats of parallel execution of thousands of tests coexist with hilarious recently-patched unholy hacks… and how you can improve your own testing systems with the best compiletest has to offer.

Notes

Most of the content of this talk is directly based off my 2024 Google Summer of Code project. Jieyou Xu (my mentor) and I have traversed 250+ edge-case tests, many containing bugs with strong comedic value from their sheer unpredictability - and we built together a new testing crate for compiletest which required me to learn the ins and outs of this crucial piece of the Rust compiler.

The talk is meant to alternate between technical insights into how compiletest runs thousands of tests every time a new pull request is updated in under an hour using fearless parallelism - and how this is applicable to the audience’s own projects in need of large scale testing - as well as more lighthearted examples of real cases of previously-unnoticed bugs encountered throughout the project.

Anyone with previous interest in basic parallel Rust should be capable of understanding the more technical portions of the talk. I am aware that infrastructure and testing are not the most exciting topics if presented without the right sauce - and I really loved Predrag Gruevski’s talk at RustConf 2024 on cargo-semver-checks. I hope to be able to match such energy on such an unassuming subject matter - and if this proposal is not selected, eventually in my life!

The talk will conclude with a short mention of the Rust Foundation Google Summer of Code’s awesomeness, and the possible new batch of 2025 projects! I hope it may encourage students among the audience to apply to this excellent learning experience for 2026, should it continue.