Criterion Growing Pains (LLO Archive)
Created 2025-11-30, last modified 2025-11-30
Part of my archive of Layover Linux Official posts on Tumblr.
2025-08-28
A little progress on the test suite conversions tonight. The good news is that with correct compile flags, I can easily break the test suite into multiple translation units that can be cheaply merged together and compiled in parallel. That's great for the normal use case - tinkering on a single topic at a time! The test suite is the most expensive artifact to compile, by far, so not needing to compile the whole thing in my rapid feedback loop is great!
The bad news is two-fold though. utest.h is scaling poorly with the number of assertions per file. I think it's the heavy use of macros, which easily expand to a lot of underlying C. It's also a bit less friendly to writing your own helper functions. I think this could be addressed with indexed tests in my use case, we'll see!
And as a side note, this approach also means each individually-compiled chunk of the test suite needs to parse the headers again, so we're finally stress testing the Prone headers, which have a lot of inline function definitions for runtime optimization. I might need to be more selective about that - we're paying this small tax with a bigger multiplier now.
That's it for tonight. Sleep now.

