mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
b3098d32ed
Add unit testing for skb segment. This function is exercised by many different code paths, such as GSO_PARTIAL or GSO_BY_FRAGS, linear (with or without head_frag), frags or frag_list skbs, etc. It is infeasible to manually run tests that cover all code paths when making changes. The long and complex function also makes it hard to establish through analysis alone that a patch has no unintended side-effects. Add code coverage through kunit regression testing. Introduce kunit infrastructure for tests under net/core, and add this first test. This first skb_segment test exercises a simple case: a linear skb. Follow-on patches will parametrize the test and add more variants. Tested: Built and ran the test with make ARCH=um mrproper ./tools/testing/kunit/kunit.py run \ --kconfig_add CONFIG_NET=y \ --kconfig_add CONFIG_DEBUG_KERNEL=y \ --kconfig_add CONFIG_DEBUG_INFO=y \ --kconfig_add=CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y \ net_core_gso Signed-off-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
44 lines
1.5 KiB
Makefile
44 lines
1.5 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the Linux networking core.
|
|
#
|
|
|
|
obj-y := sock.o request_sock.o skbuff.o datagram.o stream.o scm.o \
|
|
gen_stats.o gen_estimator.o net_namespace.o secure_seq.o \
|
|
flow_dissector.o
|
|
|
|
obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
|
|
|
|
obj-y += dev.o dev_addr_lists.o dst.o netevent.o \
|
|
neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
|
|
sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
|
|
fib_notifier.o xdp.o flow_offload.o gro.o \
|
|
netdev-genl.o netdev-genl-gen.o gso.o
|
|
|
|
obj-$(CONFIG_NETDEV_ADDR_LIST_TEST) += dev_addr_lists_test.o
|
|
|
|
obj-y += net-sysfs.o
|
|
obj-$(CONFIG_PAGE_POOL) += page_pool.o
|
|
obj-$(CONFIG_PROC_FS) += net-procfs.o
|
|
obj-$(CONFIG_NET_PKTGEN) += pktgen.o
|
|
obj-$(CONFIG_NETPOLL) += netpoll.o
|
|
obj-$(CONFIG_FIB_RULES) += fib_rules.o
|
|
obj-$(CONFIG_TRACEPOINTS) += net-traces.o
|
|
obj-$(CONFIG_NET_DROP_MONITOR) += drop_monitor.o
|
|
obj-$(CONFIG_NET_SELFTESTS) += selftests.o
|
|
obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o
|
|
obj-$(CONFIG_NET_PTP_CLASSIFY) += ptp_classifier.o
|
|
obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o
|
|
obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o
|
|
obj-$(CONFIG_LWTUNNEL) += lwtunnel.o
|
|
obj-$(CONFIG_LWTUNNEL_BPF) += lwt_bpf.o
|
|
obj-$(CONFIG_DST_CACHE) += dst_cache.o
|
|
obj-$(CONFIG_HWBM) += hwbm.o
|
|
obj-$(CONFIG_GRO_CELLS) += gro_cells.o
|
|
obj-$(CONFIG_FAILOVER) += failover.o
|
|
obj-$(CONFIG_NET_SOCK_MSG) += skmsg.o
|
|
obj-$(CONFIG_BPF_SYSCALL) += sock_map.o
|
|
obj-$(CONFIG_BPF_SYSCALL) += bpf_sk_storage.o
|
|
obj-$(CONFIG_OF) += of_net.o
|
|
obj-$(CONFIG_NET_TEST) += gso_test.o
|