xref: /linux/tools/testing/selftests/net/Makefile (revision 53e7352d65f70b479de04c2c197aa5e3ca64d8f1)
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_gre_gro.sh \
46	fou_mcast_encap.sh \
47	fq_band_pktlimit.sh \
48	gre_gso.sh \
49	gre_ipv6_lladdr.sh \
50	gtp.py \
51	icmp.sh \
52	icmp_redirect.sh \
53	io_uring_zerocopy_tx.sh \
54	ioam6.sh \
55	ip6_gre_headroom.sh \
56	ip6_tunnel.sh \
57	ip_defrag.sh \
58	ip_local_port_range.sh \
59	ipv6_flowlabel.sh \
60	ipv6_force_forwarding.sh \
61	ipv6_route_update_soft_lockup.sh \
62	ipvtap_test.sh \
63	l2_tos_ttl_inherit.sh \
64	l2tp.sh \
65	link_netns.py \
66	lwt_dst_cache_ref_loop.sh \
67	macvlan_mcast_shared_mac.sh \
68	msg_zerocopy.sh \
69	nat6to4.sh \
70	ndisc_unsolicited_na_test.sh \
71	netdev-l2addr.sh \
72	netdev_lock.py \
73	netdevice.sh \
74	netns-name.sh \
75	netns-sysctl.sh \
76	nk_qlease.py \
77	nl_netdev.py \
78	nl_nlctrl.py \
79	nsh_gso.sh \
80	pmtu.sh \
81	protodown.sh \
82	psock_snd.sh \
83	reuseaddr_ports_exhausted.sh \
84	reuseport_addr_any.sh \
85	route_hint.sh \
86	route_localnet.sh \
87	rps_default_mask.sh \
88	rtnetlink.py \
89	rtnetlink.sh \
90	rtnetlink_notification.sh \
91	run_afpackettests \
92	run_netsocktests \
93	rxtimestamp.sh \
94	sctp_ifwdtsn.sh \
95	sctp_vrf.sh \
96	skf_net_off.sh \
97	srv6_encap_lookup_l3vpn_test.sh \
98	srv6_end_dt46_l3vpn_test.sh \
99	srv6_end_dt4_l3vpn_test.sh \
100	srv6_end_dt6_l3vpn_test.sh \
101	srv6_end_dx4_netfilter_test.sh \
102	srv6_end_dx6_netfilter_test.sh \
103	srv6_end_flavors_test.sh \
104	srv6_end_next_csid_l3vpn_test.sh \
105	srv6_end_x_next_csid_l3vpn_test.sh \
106	srv6_hencap_red_l3vpn_test.sh \
107	srv6_hl2encap_red_l2vpn_test.sh \
108	srv6_iptunnel_cache.sh \
109	stress_reuseport_listen.sh \
110	tcp_ecmp_failover.sh \
111	tcp_fastopen_backup_key.sh \
112	test_bridge_backup_port.sh \
113	test_bridge_neigh_suppress.sh \
114	test_ingress_egress_chaining.sh \
115	test_neigh.sh \
116	test_so_rcv.sh \
117	test_vxlan_fdb_changelink.sh \
118	test_vxlan_mdb.sh \
119	test_vxlan_nh.sh \
120	test_vxlan_nolocalbypass.sh \
121	test_vxlan_under_vrf.sh \
122	test_vxlan_vnifilter_notify.sh \
123	test_vxlan_vnifiltering.sh \
124	tfo_passive.sh \
125	traceroute.sh \
126	txtimestamp.sh \
127	udpgro.sh \
128	udpgro_bench.sh \
129	udpgro_frglist.sh \
130	udpgro_fwd.sh \
131	udpgso.sh \
132	udpgso_bench.sh \
133	unicast_extensions.sh \
134	veth.sh \
135	vlan_bridge_binding.sh \
136	vlan_hw_filter.sh \
137	vrf-xfrm-tests.sh \
138	vrf_route_leaking.sh \
139	vrf_strict_mode_test.sh \
140	xfrm_policy.sh \
141	xfrm_state.sh \
142# end of TEST_PROGS
143
144TEST_PROGS_EXTENDED := \
145	xfrm_policy_add_speed.sh \
146# end of TEST_PROGS_EXTENDED
147
148TEST_GEN_FILES := \
149	bind_bhash \
150	cmsg_sender \
151	fin_ack_lat \
152	hwtstamp_config \
153	io_uring_zerocopy_tx \
154	ioam6_parser \
155	ip_defrag \
156	ip_local_port_range \
157	ipsec \
158	ipv6_flowlabel \
159	msg_zerocopy \
160	nettest \
161	nsh_gso \
162	psock_fanout \
163	psock_snd \
164	psock_tpacket \
165	reuseaddr_ports_exhausted \
166	reuseport_addr_any \
167	rxtimestamp \
168	sctp_hello \
169	sctp_ifwdtsn \
170	skf_net_off \
171	so_netns_cookie \
172	so_rcv_listener \
173	socket \
174	stress_reuseport_listen \
175	tcp_fastopen_backup_key \
176	tcp_inq \
177	tcp_mmap \
178	tfo \
179	timestamping \
180	txring_overwrite \
181	txtimestamp \
182	udpgso \
183	udpgso_bench_rx \
184	udpgso_bench_tx \
185# end of TEST_GEN_FILES
186
187TEST_GEN_PROGS := \
188	bind_timewait \
189	bind_wildcard \
190	epoll_busy_poll \
191	getsockopt_iter \
192	icmp_rfc4884 \
193	ipv6_flowlabel_mgr \
194	ipv6_fragmentation \
195	proc_net_pktgen \
196	reuseaddr_conflict \
197	reuseport_bpf \
198	reuseport_bpf_cpu \
199	reuseport_bpf_numa \
200	reuseport_dualstack \
201	sk_bind_sendto_listen \
202	sk_connect_zero_addr \
203	sk_so_peek_off \
204	so_incoming_cpu \
205	so_reserve_mem \
206	tap \
207	tcp_port_share \
208	tls \
209	udp_splice_checksum \
210# end of TEST_GEN_PROGS
211
212TEST_FILES := \
213	fcnal-test.sh \
214	in_netns.sh \
215	lib.sh \
216	settings \
217# end of TEST_FILES
218
219# YNL files, must be before "include ..lib.mk"
220YNL_GEN_FILES := busy_poller
221YNL_GEN_PROGS := \
222	netlink-dumps \
223	tun \
224# end of YNL_GEN_PROGS
225
226TEST_GEN_FILES += $(YNL_GEN_FILES)
227TEST_GEN_PROGS += $(YNL_GEN_PROGS)
228
229TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
230
231TEST_INCLUDES := forwarding/lib.sh
232
233include ../lib.mk
234
235# YNL build
236YNL_GENS := \
237	netdev \
238	rt-addr \
239	rt-link \
240	rt-neigh \
241	rt-route \
242# end of YNL_GENS
243
244include ynl.mk
245
246$(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap
247$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
248$(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto
249$(OUTPUT)/tcp_inq: LDLIBS += -lpthread
250$(OUTPUT)/bind_bhash: LDLIBS += -lpthread
251$(OUTPUT)/io_uring_zerocopy_tx: CFLAGS += -I../../../include/
252
253include bpf.mk
254