aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/lib/py/netns.py
Commit message (Collapse)AuthorAgeFilesLines
* selftests: net: Add python context manager for netns enteringXiao Liang2025-02-211-0/+18
| | | | | | | | | | | | | | Change netns of current thread and switch back on context exit. For example: with NetNSEnter("ns1"): ip("link add dummy0 type dummy") The command be executed in netns "ns1". Signed-off-by: Xiao Liang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
* selftests: drv-net: construct environment for running tests which require an ↵Jakub Kicinski2024-04-231-0/+31
endpoint Nothing surprising here, hopefully. Wrap the variables from the environment into a class or spawn a netdevsim based env and pass it to the tests. Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>