4 ms·
> ... there are a bunch of internal APIs: linked lists come to mind. Those already have unit tests: https://github.com/torvalds/linux/blob/master/lib/list-tes
by st_goliath 4y ago
> ... there are a bunch of internal APIs: linked lists come to mind.
Those already have unit tests:
https://github.com/torvalds/linux/blob/master/lib/list-test.c https://github.com/torvalds/linux/blob/master/lib/list-test....
using an existing in-kernel test framework no less.
If you step up into the 'lib' directory (containing generic in-kernel utility code) you might notice that there are a whole bunch of C files already that have an "_test" suffix in their name (or "_kunit").