xref: /linux/tools/testing/selftests/net/Makefile (revision 0e59523b440c90ed1899476f32ad4e949282f43e)
1# SPDX-License-Identifier: GPL-2.0
2# Makefile for net selftests
3
4CFLAGS += -Wall -Wl,--no-as-needed -O2 -g
5CFLAGS += -I../../../../usr/include/ $(KHDR_INCLUDES)
6# Additional include paths needed by kselftest.h
7CFLAGS += -I../
8
9TEST_PROGS := \
10	altnames.sh \
11	amt.sh \
12	arp_ndisc_evict_nocarrier.sh \
13	arp_ndisc_untracked_subnets.sh \
14	bareudp.sh \
15	big_tcp.sh \
16	big_tcp_tunnels.sh \
17	bind_bhash.sh \
18	bpf_offload.py \
19	bridge_stp_mode.sh \
20	bridge_vlan_dump.sh \
21	broadcast_ether_dst.sh \
22	broadcast_pmtu.sh \
23	busy_poll_test.sh \
24	cmsg_ip.sh \
25	cmsg_so_mark.sh \
26	cmsg_so_priority.sh \
27	cmsg_time.sh \
28	cork_fragsize.py \
29	double_udp_encap.sh \
30	drop_monitor_tests.sh \
31	ecmp_rehash.sh \
32	exception_cache.sh \
33	fcnal-ipv4.sh \
34	fcnal-ipv6.sh \
35	fcnal-other.sh \
36	fdb_flush.sh \
37	fdb_notify.sh \
38	fib-onlink-tests.sh \
39	fib_nexthop_multiprefix.sh \
40	fib_nexthop_nongw.sh \
41	fib_nexthops.sh \
42	fib_rule_tests.sh \
43	fib_tests.sh \
44	fin_ack_lat.sh \
45	fou_mcast_encap.sh \
46	fq_band_pktlimit.sh \
47	gre_gso.sh \
48	gre_ipv6_lladdr.sh \
49	icmp.sh \
50	icmp_redirect.sh \
51	io_uring_zerocopy_tx.sh \
52	ioam6.sh \
53	ip6_gre_headroom.sh \
54	ip6_tunnel.sh \
55	ip_defrag.sh \
56	ip_local_port_range.sh \
57	ipv6_flowlabel.sh \
58	ipv6_force_forwarding.sh \
59	ipv6_route_update_soft_lockup.sh \
60	ipvtap_test.sh \
61	l2_tos_ttl_inherit.sh \
62	l2tp.sh \
63	link_netns.py \
64	lwt_dst_cache_ref_loop.sh \
65	macvlan_mcast_shared_mac.sh \
66	msg_zerocopy.sh \
67	nat6to4.sh \
68	ndisc_unsolicited_na_test.sh \
69	netdev-l2addr.sh \
70	netdev_lock.py \
71	netdevice.sh \
72	netns-name.sh \
73	netns-sysctl.sh \
74	nk_qlease.py \
75	nl_netdev.py \
76	nl_nlctrl.py \
77	pmtu.sh \
78	protodown.sh \
79	psock_snd.sh \
80	reuseaddr_ports_exhausted.sh \
81	reuseport_addr_any.sh \
82	route_hint.sh \
83	route_localnet.sh \
84	rps_default_mask.sh \
85	rtnetlink.py \
86	rtnetlink.sh \
87	rtnetlink_notification.sh \
88	run_afpackettests \
89	run_netsocktests \
90	rxtimestamp.sh \
91	sctp_vrf.sh \
92	skf_net_off.sh \
93	srv6_encap_lookup_l3vpn_test.sh \
94	srv6_end_dt46_l3vpn_test.sh \
95	srv6_end_dt4_l3vpn_test.sh \
96	srv6_end_dt6_l3vpn_test.sh \
97	srv6_end_dx4_netfilter_test.sh \
98	srv6_end_dx6_netfilter_test.sh \
99	srv6_end_flavors_test.sh \
100	srv6_end_next_csid_l3vpn_test.sh \
101	srv6_end_x_next_csid_l3vpn_test.sh \
102	srv6_hencap_red_l3vpn_test.sh \
103	srv6_hl2encap_red_l2vpn_test.sh \
104	srv6_iptunnel_cache.sh \
105	stress_reuseport_listen.sh \
106	tcp_ecmp_failover.sh \
107	tcp_fastopen_backup_key.sh \
108	test_bpf.sh \
109	test_bridge_backup_port.sh \
110	test_bridge_neigh_suppress.sh \
111	test_ingress_egress_chaining.sh \
112	test_neigh.sh \
113	test_so_rcv.sh \
114	test_vxlan_fdb_changelink.sh \
115	test_vxlan_mdb.sh \
116	test_vxlan_nh.sh \
117	test_vxlan_nolocalbypass.sh \
118	test_vxlan_under_vrf.sh \
119	test_vxlan_vnifilter_notify.sh \
120	test_vxlan_vnifiltering.sh \
121	tfo_passive.sh \
122	traceroute.sh \
123	txtimestamp.sh \
124	udpgro.sh \
125	udpgro_bench.sh \
126	udpgro_frglist.sh \
127	udpgro_fwd.sh \
128	udpgso.sh \
129	udpgso_bench.sh \
130	unicast_extensions.sh \
131	veth.sh \
132	vlan_bridge_binding.sh \
133	vlan_hw_filter.sh \
134	vrf-xfrm-tests.sh \
135	vrf_route_leaking.sh \
136	vrf_strict_mode_test.sh \
137	xfrm_policy.sh \
138	xfrm_state.sh \
139# end of TEST_PROGS
140
141TEST_PROGS_EXTENDED := \
142	xfrm_policy_add_speed.sh \
143# end of TEST_PROGS_EXTENDED
144
145TEST_GEN_FILES := \
146	bind_bhash \
147	cmsg_sender \
148	fin_ack_lat \
149	hwtstamp_config \
150	io_uring_zerocopy_tx \
151	ioam6_parser \
152	ip_defrag \
153	ip_local_port_range \
154	ipsec \
155	ipv6_flowlabel \
156	msg_zerocopy \
157	nettest \
158	psock_fanout \
159	psock_snd \
160	psock_tpacket \
161	reuseaddr_ports_exhausted \
162	reuseport_addr_any \
163	rxtimestamp \
164	sctp_hello \
165	skf_net_off \
166	so_netns_cookie \
167	so_rcv_listener \
168	socket \
169	stress_reuseport_listen \
170	tcp_fastopen_backup_key \
171	tcp_inq \
172	tcp_mmap \
173	tfo \
174	timestamping \
175	txring_overwrite \
176	txtimestamp \
177	udpgso \
178	udpgso_bench_rx \
179	udpgso_bench_tx \
180# end of TEST_GEN_FILES
181
182TEST_GEN_PROGS := \
183	bind_timewait \
184	bind_wildcard \
185	epoll_busy_poll \
186	getsockopt_iter \
187	icmp_rfc4884 \
188	ipv6_flowlabel_mgr \
189	ipv6_fragmentation \
190	proc_net_pktgen \
191	reuseaddr_conflict \
192	reuseport_bpf \
193	reuseport_bpf_cpu \
194	reuseport_bpf_numa \
195	reuseport_dualstack \
196	sk_bind_sendto_listen \
197	sk_connect_zero_addr \
198	sk_so_peek_off \
199	so_incoming_cpu \
200	so_reserve_mem \
201	tap \
202	tcp_port_share \
203	tls \
204	udp_splice_checksum \
205# end of TEST_GEN_PROGS
206
207TEST_FILES := \
208	fcnal-test.sh \
209	in_netns.sh \
210	lib.sh \
211	settings \
212# end of TEST_FILES
213
214# YNL files, must be before "include ..lib.mk"
215YNL_GEN_FILES := busy_poller
216YNL_GEN_PROGS := \
217	netlink-dumps \
218	tun \
219# end of YNL_GEN_PROGS
220
221TEST_GEN_FILES += $(YNL_GEN_FILES)
222TEST_GEN_PROGS += $(YNL_GEN_PROGS)
223
224TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
225
226TEST_INCLUDES := forwarding/lib.sh
227
228include ../lib.mk
229
230# YNL build
231YNL_GENS := \
232	netdev \
233	rt-addr \
234	rt-link \
235	rt-neigh \
236	rt-route \
237# end of YNL_GENS
238
239include ynl.mk
240
241$(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap
242$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
243$(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto
244$(OUTPUT)/tcp_inq: LDLIBS += -lpthread
245$(OUTPUT)/bind_bhash: LDLIBS += -lpthread
246$(OUTPUT)/io_uring_zerocopy_tx: CFLAGS += -I../../../include/
247
248include bpf.mk
249