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