]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: netconsole: selftests: Check if netdevsim is available
authorBreno Leitao <leitao@debian.org>
Fri, 8 Nov 2024 14:59:25 +0000 (06:59 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Nov 2024 03:05:48 +0000 (19:05 -0800)
commit43271bb5bf67e78def9c2898040505e7cb5935f3
treef108c77c002a0780f31ac8e9bb07b62c64747448
parent874ed898a2049cb326b1b28a22a831556a58d2c1
net: netconsole: selftests: Check if netdevsim is available

The netconsole selftest relies on the availability of the netdevsim module.
To ensure the test can run correctly, we need to check if the netdevsim
module is either loaded or built-in before proceeding.

Update the netconsole selftest to check for the existence of
the /sys/bus/netdevsim/new_device file before running the test. If the
file is not found, the test is skipped with an explanation that the
CONFIG_NETDEVSIM kernel config option may not be enabled.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241108-netcon_selftest_deps-v1-1-1789cbf3adcd@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/netcons_basic.sh