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