Re: [PATCH net-next v2 2/4] netconsole: selftest: Split the helpers from the selftest
From: Jakub Kicinski
Date: Mon Jan 06 2025 - 19:07:04 EST
On Fri, 03 Jan 2025 04:57:50 -0800 Breno Leitao wrote:
> Split helper functions from the netconsole basic test into a separate
> library file to enable reuse across different netconsole tests. This
> change only moves the existing helper functions to lib/sh/lib_netcons.sh
> while preserving the same test functionality.
>
> The helpers provide common functions for:
> - Setting up network namespaces and interfaces
> - Managing netconsole dynamic targets
> - Setting user data
> - Handling test dependencies
> - Cleanup operations
>
> Do not make any change in the code, other than the mechanical
> separation.
You have to update the Makefile, we don't wildcard all files under
drivers/net/lib, the lib support in ksft is not great :(
$ make -C tools/testing/selftests/ \
TARGETS="drivers/net drivers/net/hw" \
install INSTALL_PATH=/tmp/ksft-net-drv
[... noise ...]
$ find /tmp/ksft-net-drv/ -iname '*netcons*'
/tmp/ksft-net-drv/drivers/net/netcons_basic.sh
/tmp/ksft-net-drv/drivers/net/netcons_overflow.sh
.. your new lib file won't get installed.
--
pw-bot: cr