4 ms·
If you want to contribute unit tests, I believe that Linus would be open to the idea. For example, there are a bunch of internal APIs: linked lists come to min
by throwaway2037 4y ago
If you want to contribute unit tests, I believe that Linus would be open to the idea. For example, there are a bunch of internal APIs: linked lists come to mind. If you wrote unit tests for an internal API, he might accept it. I would start very small -- one .c file with no more than 20 unit tests -- to gauge if there is interest from the community. It seems like a nice gateway to get junior developers (university-level students) in the kernel development. Reading open source mailing lists, I have learned that the best way to "break-in" is a tiny code change that is well-tested. It is hard to reject this type of submission. Be unopinionated, but competant in your submission, and they will be open-minded.
- deleted 4y ago[deleted]
- codethief 4y ago> If you want to contribute unit tests, I believe that Linus would be open to the idea. Not saying this is not true but has Linus stated this anywhere? Because once unit tests have been introduced, the question becomes: Who / what executes those unit tests? Who makes sure no one breaks them? You basically need CI pipelines and infrastructure and suddenly the tiny code change is not so tiny anymore.
- IgorPartola 4y agoYou can also run them yourself and just submit bug reports. You don’t need anyone’s permission to do that.
- 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").