netconsole: selftests: Move netconsole selftests to separate target
This patch moves netconsole selftests from drivers/net to its own target in drivers/net/netconsole. This change helps saving some resources from CI since tests in drivers/net automatically run against real hardware which are not used by netconsole tests as they rely solely on netdevsim. lib_netcons.sh is kept under drivers/net/lib since it is also used by bonding selftests. Finally, drivers/net config remains unchanged as netpoll_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.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>master
parent
a010fe8d86
commit
b3827c91cc
|
|
@ -18021,7 +18021,7 @@ S: Maintained
|
|||
F: Documentation/networking/netconsole.rst
|
||||
F: drivers/net/netconsole.c
|
||||
F: tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
|
||||
F: tools/testing/selftests/drivers/net/netcons\*
|
||||
F: tools/testing/selftests/drivers/net/netconsole/
|
||||
|
||||
NETDEVSIM
|
||||
M: Jakub Kicinski <kuba@kernel.org>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ TARGETS += drivers/ntsync
|
|||
TARGETS += drivers/s390x/uvdevice
|
||||
TARGETS += drivers/net
|
||||
TARGETS += drivers/net/bonding
|
||||
TARGETS += drivers/net/netconsole
|
||||
TARGETS += drivers/net/team
|
||||
TARGETS += drivers/net/virtio_net
|
||||
TARGETS += drivers/platform/x86/intel/ifs
|
||||
|
|
|
|||
|
|
@ -15,13 +15,6 @@ TEST_PROGS := \
|
|||
hds.py \
|
||||
napi_id.py \
|
||||
napi_threaded.py \
|
||||
netcons_basic.sh \
|
||||
netcons_cmdline.sh \
|
||||
netcons_fragmented_msg.sh \
|
||||
netcons_overflow.sh \
|
||||
netcons_resume.sh \
|
||||
netcons_sysdata.sh \
|
||||
netcons_torture.sh \
|
||||
netpoll_basic.py \
|
||||
ping.py \
|
||||
psp.py \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
TEST_INCLUDES := \
|
||||
../../../net/lib.sh \
|
||||
../lib/sh/lib_netcons.sh \
|
||||
# end of TEST_INCLUDES
|
||||
|
||||
TEST_PROGS := \
|
||||
netcons_basic.sh \
|
||||
netcons_cmdline.sh \
|
||||
netcons_fragmented_msg.sh \
|
||||
netcons_overflow.sh \
|
||||
netcons_resume.sh \
|
||||
netcons_sysdata.sh \
|
||||
netcons_torture.sh \
|
||||
# end of TEST_PROGS
|
||||
|
||||
include ../../../lib.mk
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
CONFIG_NETCONSOLE_EXTENDED_LOG=y
|
||||
CONFIG_NETDEVSIM=m
|
||||
|
|
@ -18,7 +18,7 @@ set -euo pipefail
|
|||
|
||||
SCRIPTDIR=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")
|
||||
|
||||
source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
|
||||
source "${SCRIPTDIR}"/../lib/sh/lib_netcons.sh
|
||||
|
||||
modprobe netdevsim 2> /dev/null || true
|
||||
modprobe netconsole 2> /dev/null || true
|
||||
|
|
@ -12,7 +12,7 @@ set -euo pipefail
|
|||
|
||||
SCRIPTDIR=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")
|
||||
|
||||
source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
|
||||
source "${SCRIPTDIR}"/../lib/sh/lib_netcons.sh
|
||||
|
||||
check_netconsole_module
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ set -euo pipefail
|
|||
|
||||
SCRIPTDIR=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")
|
||||
|
||||
source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
|
||||
source "${SCRIPTDIR}"/../lib/sh/lib_netcons.sh
|
||||
|
||||
modprobe netdevsim 2> /dev/null || true
|
||||
modprobe netconsole 2> /dev/null || true
|
||||
|
|
@ -13,7 +13,7 @@ set -euo pipefail
|
|||
|
||||
SCRIPTDIR=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")
|
||||
|
||||
source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
|
||||
source "${SCRIPTDIR}"/../lib/sh/lib_netcons.sh
|
||||
# This is coming from netconsole code. Check for it in drivers/net/netconsole.c
|
||||
MAX_USERDATA_ITEMS=256
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ set -euo pipefail
|
|||
|
||||
SCRIPTDIR=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")
|
||||
|
||||
source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
|
||||
source "${SCRIPTDIR}"/../lib/sh/lib_netcons.sh
|
||||
|
||||
SAVED_SRCMAC="" # to be populated later
|
||||
SAVED_DSTMAC="" # to be populated later
|
||||
|
|
@ -18,7 +18,7 @@ set -euo pipefail
|
|||
|
||||
SCRIPTDIR=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")
|
||||
|
||||
source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
|
||||
source "${SCRIPTDIR}"/../lib/sh/lib_netcons.sh
|
||||
|
||||
# Enable the sysdata cpu_nr feature
|
||||
function set_cpu_nr() {
|
||||
|
|
@ -17,7 +17,7 @@ set -euo pipefail
|
|||
|
||||
SCRIPTDIR=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")
|
||||
|
||||
source "${SCRIPTDIR}"/lib/sh/lib_netcons.sh
|
||||
source "${SCRIPTDIR}"/../lib/sh/lib_netcons.sh
|
||||
|
||||
# Number of times the main loop run
|
||||
ITERATIONS=${1:-150}
|
||||
Loading…
Reference in New Issue