selftests: netconsole: add a userdata torture testThe userdata payload is rebuilt and republished on every configfs write,including while the target is enabled and messages are being sent.Add ne
selftests: netconsole: add a userdata torture testThe userdata payload is rebuilt and republished on every configfs write,including while the target is enabled and messages are being sent.Add netcons_userdata.sh that runs random tests with userdata.Signed-off-by: Breno Leitao <leitao@debian.org>Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com>Link: https://patch.msgid.link/20260810-netcons-userdata-rcu-v3-2-f65557f769ce@debian.orgSigned-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
selftests: netconsole: ignore busywait errorsIn these netconsole tests, bash is used with errexit (set -e). It meansthat if the busywait timeout, the tests finish without printing an errormessage
selftests: netconsole: ignore busywait errorsIn these netconsole tests, bash is used with errexit (set -e). It meansthat if the busywait timeout, the tests finish without printing an errormessage.It is fine to ignore these errors, because the following validate_xxxhelpers will check the content of the output file, and exit with anappropriated error message, e.g. FAIL: File was not generated.Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Reviewed-by: Breno Leitao <leitao@debian.org>Link: https://patch.msgid.link/20260710-net-sft-fix-containers-v1-7-a2915c294ef5@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
selftests: netconsole: only restore MAC when it changed on resumeThe "mac" bind mode reactivation downs the interface, restores the savedMAC and renames it to trigger a target resume. This assumes
selftests: netconsole: only restore MAC when it changed on resumeThe "mac" bind mode reactivation downs the interface, restores the savedMAC and renames it to trigger a target resume. This assumes the recreatedinterface comes back with a different MAC, which is true underMACAddressPolicy=none (as on the Netdev CI) but not when MACs arepersistent. In the persistent case netconsole resumes the target on itsown, and the down/restore/rename flow instead drops it and fails the test.Guard the block on the MAC having actually changed so the test passesunder both policies.Fixes: 6ecc08329bab ("selftests: netconsole: validate target resume")Reported-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Closes: https://lore.kernel.org/netdev/f398373e-2cb4-4649-a491-9763df94d98b@kernel.org/Signed-off-by: Andre Carvalho <asantostc@gmail.com>Tested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>Reviewed-by: Breno Leitao <leitao@debian.org>Link: https://patch.msgid.link/20260710-netcons-mac-reload-v1-1-3fb1bcc70b4a@gmail.comSigned-off-by: Paolo Abeni <pabeni@redhat.com>
selftests: netconsole: print diagnostic on busywait timeout in netcons_basicThe script uses set -euo pipefail, so when busywait times out waitingfor the netconsole message to arrive, it returns 1
selftests: netconsole: print diagnostic on busywait timeout in netcons_basicThe script uses set -euo pipefail, so when busywait times out waitingfor the netconsole message to arrive, it returns 1 and the script exitsimmediately without printing any error message. As reported by Jakub,this makes failures hard to diagnose since the test reports exit=1 withno explanation.Handle the busywait failure explicitly so that a FAIL message is printedbefore exiting. This is how it looks like now: Running with target mode: basic (ipv6) [ 167.452561] netconsole selftest: netcons_QdMay FAIL: Timed out waiting (20000 ms) for netconsole message in /tmp/netcons_QdMayThe remaining silent failures under set -e can only happen during thesetup phase (netdevsim creation, interface configuration, configfswrites). So, it is not expected to have any silent failure once the teststarts.Note that this issue might be less frequent now, since commita68a9bd086c28 ("selftests: netconsole: Increase port listening timeout")increased the timeout that _might_ have been the root cause of theserandom failures in NIPA.Signed-off-by: Breno Leitao <leitao@debian.org>Link: https://patch.msgid.link/20260302-netconsole_test_verbose-v1-1-b1be5d30cd7d@debian.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
netconsole: selftests: Move netconsole selftests to separate targetThis patch moves netconsole selftests from drivers/net to its own targetin drivers/net/netconsole.This change helps saving some
netconsole: selftests: Move netconsole selftests to separate targetThis patch moves netconsole selftests from drivers/net to its own targetin drivers/net/netconsole.This change helps saving some resources from CI since tests indrivers/net automatically run against real hardware which are not usedby netconsole tests as they rely solely on netdevsim.lib_netcons.sh is kept under drivers/net/lib since it is also used bybonding selftests. Finally, drivers/net config remains unchanged asnetpoll_basic.py requires netconsole (and does leverage real HW testing).Reviewed-by: Breno Leitao <leitao@debian.org>Signed-off-by: Andre Carvalho <asantostc@gmail.com>Link: https://patch.msgid.link/20260127-netcons-selftest-target-v2-1-f509ab65b3bc@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>