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