4 ms·
How is testing done in kernels? Is there unit testing, integration, end to end? I'm unfamiliar, but curious.
by dmarlow 4y ago
How is testing done in kernels? Is there unit testing, integration, end to end? I'm unfamiliar, but curious.
- seanhunter 4y agoNot in the Linux kernel. In the Linux kernel it has traditionally always been done by the developer sticking lots of printk statements into their code until they are happy with the outputs and then removing most of them. Make of that what you will.
- bonzini 4y agoLOL that is so false that is not even worth correcting.
- marcellus23 4y agoActually could you correct it? I don't know anything about the Linux kernel so I'm curious.
- seanhunter 4y agoI'll correct myself. That was how it was done circa 2000-2005, but my info was way out of date because I haven't followed kernel development much for a while. Here's some stuff about how it's done now. https://www.kernel.org/doc/html/latest/dev-tools/testing-overview.html https://www.kernel.org/doc/html/latest/dev-tools/testing-ove... Basically there is a system called KUnit for writing white box unit tests and there is code coverage to determine coverage as you would expect, then there are systems for static analysis and verifying assertions.
- deleted 4y ago[deleted]
- vfclists 4y agoThis is so wrong!!
- post-it 4y agoAs in that's not how it's done, or that's not how it should be done?
- xtreak29 4y agohttps://stackoverflow.com/q/3177338 https://stackoverflow.com/q/3177338
- pikrzyszto 4y agoSee the following https://kunit.dev/ https://kunit.dev/ - unit tests for kernel https://docs.kernel.org/dev-tools/testing-overview.html https://docs.kernel.org/dev-tools/testing-overview.html - entire testing overview.
- nomel 4y agoThere seems to be a missing piece here. The change that created this includes no tests. It appears to be completely untested.
- jeffbee 4y agoAs you can see from the patch that introduced the bug, the kernel is severely under-tested and has little to no testing culture among the core contributors. The patch changes logic but no tests, indicating that the changed code has insufficient test coverage.