Ask HN: Why the Linux Kernel doesn't have unit tests?
To add to all the excellent answers in this thread: unit tests are massively overrated.<p>It is good to know that your base64 encoding function is tested for all corner cases, but integration and behaviour tests for the external interface&#x2F;API are more important than exercising an internal implementation detail.<p>What is the external interface of the kernel? What is its surface area? A kernel is so central and massive the only way to test its complete contract with the user (space) is... just to run stuff and see if it breaks.<p>TDD has some good ideas but for a while it had turned in a religion. While tests are great to have, a good and underrated integration testing system is just for someone to run your software. If no one complains, either no one is using it, or the software is doing its work. Do you really need tests for the read(2) syscall when Linux is running on a billion devices, and that syscall is called some 10^12 times per second globally?<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=EZ05e7EMOLM" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=EZ05e7EMOLM</a>