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