On Wed, 15 Oct 2025 17:49:22 +0300 Яна Башлыкова wrote:
The motivation for this work is to improve the test coverage and reliability of the Netlink subsystem, specifically for the core af_netlink.c and genetlink.c components. While the subsystem is critical for kernel-userspace communication, its coverage by the existing selftests is quite limited.
To quantify the improvement, these new selftests achieve the following line coverage (as measured by gcov):
- net/netlink/af_netlink.c: 84.0%
- net/netlink/genetlink.c: 88.8%
For what it's worth syzbot has:
af_netlink.c 91% genetlink.c 68%
Without a line of code added to the kernel. Of course it's not functional testing.
Integrating these tests into the upstream suite will provide long-term stability and make it safer to refactor or add new features to the Netlink core in the future.
Happy to hear from others if they disagree but what kernel tests get merged into the tree is pretty subjective. Do we have a lot of bugs in genetlink? Are you planning to do major development in this area and want to catch regressions? If the answers to both of those questions is "no" IMHO this 7kLoC is not worth carrying in the tree.