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