]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
docs: netdev: refine netdevsim testing guidance
authorJakub Kicinski <kuba@kernel.org>
Wed, 4 Mar 2026 15:16:46 +0000 (07:16 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Mar 2026 21:18:04 +0000 (13:18 -0800)
The library to create tests for both NIC HW and netdevsim has existed
for almost a year. netdevsim-only tests we get increasingly feel like
a waste, we should try to write tests that work both on netdevsim and
real HW. Refine the guidance accordingly.

Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260304151647.2770466-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/process/maintainer-netdev.rst

index 6bce4507d5d3136270bbf552880451e08b137b61..3aa13bc2405d53222bdcd3d3fe80cce2999e87ce 100644 (file)
@@ -479,8 +479,14 @@ netdevsim
 
 ``netdevsim`` is a test driver which can be used to exercise driver
 configuration APIs without requiring capable hardware.
-Mock-ups and tests based on ``netdevsim`` are strongly encouraged when
-adding new APIs, but ``netdevsim`` in itself is **not** considered
+Mock-ups and tests based on ``netdevsim`` are encouraged when
+adding new APIs with complex logic in the stack. The tests should
+be written so that they can run both against ``netdevsim`` and a real
+device (see ``tools/testing/selftests/drivers/net/README.rst``).
+``netdevsim``-only tests should focus on testing corner cases
+and failure paths in the core which are hard to exercise with a real driver.
+
+``netdevsim`` in itself is **not** considered
 a use case/user. You must also implement the new APIs in a real driver.
 
 We give no guarantees that ``netdevsim`` won't change in the future