Hello Andre,
On Mon, Aug 11, 2025 at 07:32:09PM +0100, Andre Carvalho wrote:
Extend the existing netconsole cmdline selftest to also validate that interface selection can be performed via MAC address.
The test now validates that netconsole works with both interface name and MAC address, improving test coverage.
Thanks for adding this test!
--- a/tools/testing/selftests/drivers/net/netcons_cmdline.sh +++ b/tools/testing/selftests/drivers/net/netcons_cmdline.sh @@ -17,10 +17,6 @@ source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
+# Run the test twice, with different cmdline parameters +for BINDMODE in "ifname" "mac" +do
- echo "Running with bind mode: ${BINDMODE}"
Please echo this message to stderr.
- # Create the command line for netconsole, with the configuration from the
This is over 80 chars, move the 'the' word in to live below.
- # function above
- CMDLINE="$(create_cmdline_str "${BINDMODE}")"
I don't think these nested double quotes would work as expected. Maybe something as:
CMDLINE=$(create_cmdline_str "${BINDMODE}")
- # The content of kmsg will be save to the following file
- OUTPUT_FILE="/tmp/${TARGET}-${BINDMODE}"
- # Unload the module, if present
- rmmod netconsole 2> /dev/null || true
In this case, you do not want netconsole to fail to unload, otherwise your test will fail, right?
You might want to remove '|| true' completely.
Other than that, the rest looks fine, and with the changes above, please add:
Reviewed-by: Breno Leitao leitao@debian.org