The test suite for SQLite is very impressive.<p>> The reliability and robustness of SQLite is achieved in part by thorough and careful testing. As of version 3.23.0 (2018-04-02), the SQLite library consists of approximately 128.9 KSLOC of C code. (KSLOC means thousands of "Source Lines Of Code" or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 711 times as much test code and test scripts - 91772.0 KSLOC.<p>Plus they have a whole page on their site about testing [1]. Which is more then you can say about a lot of open source projects.<p>[1] <a href="https://www.sqlite.org/testing.html" rel="nofollow">https://www.sqlite.org/testing.html</a>
While I wouldn't suggest that his code is meant to be read for beauty/inspiration, djb's code is of incredibly high quality.<p>I would suggest starting with qmail and looking at the (very mainstream) patches that people are running on top of it.<p>tinydns is also worth a look.
There are a lot of ways to judge this, but obvious candidates would be GNU Emacs, the GNU coreutils packages, etc., and the Linux kernel itself. (Probably also the BSDs, though I don't know these.)