What does HackerNews think of ltp?

Linux Test Project http://linux-test-project.github.io/

Language: C

#20 in C
#42 in Linux
There are tests, they're mainly just out of tree, focused on integration rather than unit, and very decentralized. You'll get nastygrams on lkml if you break them.

Here's one prominent example: https://github.com/linux-test-project/ltp

It's not in the codebase proper, but the Linux Test Project https://github.com/linux-test-project/ltp is probably a good place to start to see what's currently being tested for a syscall and to add new tests if there's a gap. https://github.com/linux-test-project/ltp/tree/master/testca... is some tests of this particular syscall.
I used to assume that Linux had a huge test suite with hundreds of thousands of tests, given the crazy feature matrix that the kernel has to support.

And that they would have started requiring tests for new features and bug fixes.

Alas, that's not the case. There are a few external test suites like the Linux Test Project [1], but nothing that looks very extensive.

The process seems to mostly rely on maintainers giving patches a good look, plus developers and first line users, including hardware manufacturers and corps like IBM or Red Hat, running their own software on kernel pre-releases and reporting the bugs.

I realize that most of Linux is device drivers or code that is tightly coupled to hardware, which is more or less impossible to test without a huge test farm and lot's of manual labor, but it's still surprising to me that they don't do it for the more or less device independent functionality.

This particular bug looks like it might have been caught by a relatively straight-forward swap file test case.

[1] https://github.com/linux-test-project/ltp

I don't think it is surprise that Linux is about adding more features in an organic way, instead of being well thought like *BSDs.

However saying that no testing happens in Linux kernel is dishonest, to say at least: there is automated tests maintained by big corporations like LTP [1] or autotest [2], thousands of people run different versions of unstable/mainline kernels with different configurations, security researches does multiple tests like running fuzzers and reporting issues, multiple opensource projects run tests in current versions of Linux kernel (that in the end also serves as a test of kernel itself), etc etc.

Linux is basically the kind of project that is big enough and impactful enough that naturally gets testing for free from the community.

[1]: https://github.com/linux-test-project/ltp

[2]: https://github.com/autotest/autotest