linux/tools/testing/selftests/net
Kuniyuki Iwashima 632f55fa60 selftest: af_unix: Add tests for -ECONNRESET.
A new function resetpair() calls close() for the receiver and checks
the return value from recv() on the initial sender side.

Now resetpair() is added to each test case and some additional test
cases.

Note that TCP sets -ECONNRESET to the consumed OOB, but we have decided
not to touch TCP MSG_OOB code in the past.

Before:

  #  RUN           msg_oob.no_peek.ex_oob_ex_oob ...
  # msg_oob.c:236:ex_oob_ex_oob:AF_UNIX :Connection reset by peer
  # msg_oob.c:237:ex_oob_ex_oob:Expected:
  # msg_oob.c:239:ex_oob_ex_oob:Expected ret[0] (-1) == expected_len (0)
  # ex_oob_ex_oob: Test terminated by assertion
  #          FAIL  msg_oob.no_peek.ex_oob_ex_oob
  not ok 14 msg_oob.no_peek.ex_oob_ex_oob
  ...
  # FAILED: 36 / 48 tests passed.
  # Totals: pass:36 fail:12 xfail:0 xpass:0 skip:0 error:0

After:

  #  RUN           msg_oob.no_peek.ex_oob_ex_oob ...
  # msg_oob.c:244:ex_oob_ex_oob:AF_UNIX :
  # msg_oob.c:245:ex_oob_ex_oob:TCP     :Connection reset by peer
  #            OK  msg_oob.no_peek.ex_oob_ex_oob
  ok 14 msg_oob.no_peek.ex_oob_ex_oob
  ...
  # PASSED: 48 / 48 tests passed.
  # Totals: pass:48 fail:0 xfail:0 xpass:0 skip:0 error:0

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250619041457.1132791-5-kuni1840@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-06-24 10:10:07 +02:00
..
af_unix selftest: af_unix: Add tests for -ECONNRESET. 2025-06-24 10:10:07 +02:00
can selftests: can: test_raw_filter.sh: add support of physical interfaces 2025-05-21 18:05:11 +02:00
forwarding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-01 15:11:38 -07:00
hsr selftests: hsr: Add test for VLAN 2024-11-11 16:40:44 -08:00
lib selftests: net: exit cleanly on SIGTERM / timeout 2025-05-06 11:04:58 +02:00
mptcp selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
netfilter selftests: netfilter: nft_nat.sh: add test for reverse clash with nat 2025-06-05 10:50:05 +02:00
openvswitch selftests: openvswitch: don't hardcode the drop reason subsys 2025-03-06 16:45:43 -08:00
ovpn selftest/net/ovpn: fix missing file 2025-06-03 13:08:15 +02:00
packetdrill selftests/net: packetdrill: more xfail changes (and a correction) 2025-01-23 07:07:41 -08:00
rds selftests: rds: move test.py to TEST_FILES 2024-11-28 10:20:17 +01:00
tcp_ao net/selftests: Add loopback link local route for self-connect 2025-04-03 15:08:31 -07:00
.gitignore selftests: net: add passive TFO test binary 2025-06-18 18:30:51 -07:00
Makefile selftests: net: add test for passive TFO socket NAPI ID 2025-06-18 18:30:51 -07:00
altnames.sh
amt.sh selftests: net: amt: indicate progress in the stress test 2025-04-04 08:02:09 -07:00
arp_ndisc_evict_nocarrier.sh selftests/net: convert arp_ndisc_evict_nocarrier.sh to run it in unique namespace 2023-12-05 13:00:55 +01:00
arp_ndisc_untracked_subnets.sh selftests/net: use tc rule to filter the na packet 2024-05-21 13:25:11 +02:00
bareudp.sh selftests: net: use setup_ns for bareudp testing 2025-05-12 18:10:55 -07:00
big_tcp.sh selftests: net: let big_tcp test cope with slow env 2024-02-05 12:36:16 +00:00
bind_bhash.c selftests/net: Add test for timing a bind request to a port with a populated bhash entry 2022-08-24 19:30:09 -07:00
bind_bhash.sh selftests/net: Improve bind_bhash.sh to accommodate predictable network interface names 2023-09-10 18:49:29 +01:00
bind_timewait.c tcp: Add selftest for bind() and TIME_WAIT. 2022-12-30 07:25:53 +00:00
bind_wildcard.c selftest: tcp: Add bind() tests for SO_REUSEADDR/SO_REUSEPORT. 2024-03-29 14:48:39 -07:00
bpf.mk selftests: net: extract BPF building logic from the Makefile 2024-04-24 20:15:45 -07:00
bpf_offload.py selftests: net: bpf_offload: add 'libbpf_global' to ignored maps 2025-03-06 15:41:37 -08:00
busy_poll_test.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
busy_poller.c selftests: net: cleanup busy_poller.c 2024-12-06 17:42:15 -08:00
cmsg_ip.sh selftests/net: expand cmsg_ip with MSG_MORE 2025-03-10 13:13:04 -07:00
cmsg_sender.c selftests/net: expand cmsg_ip with MSG_MORE 2025-03-10 13:13:04 -07:00
cmsg_so_mark.sh selftests/net: convert cmsg tests to make them run in unique namespace 2023-12-05 13:00:56 +01:00
cmsg_so_priority.sh selftests: net: test SO_PRIORITY ancillary data with cmsg_sender 2024-12-16 18:14:12 -08:00
cmsg_time.sh selftests: net: give up on the cmsg_time accuracy on slow machines 2025-01-17 18:36:14 -08:00
config selftest: net: Remove DCCP bits. 2025-04-11 18:58:10 -07:00
drop_monitor_tests.sh selftests: net: lib: Add kill_process 2024-11-15 16:39:19 -08:00
epoll_busy_poll.c selftest: epoll_busy_poll: Fix spelling mistake "couldnt" -> "couldn't" 2024-05-13 13:53:53 -07:00
fcnal-test.sh selftests: net: Fix few spelling mistakes 2025-02-18 18:10:31 -08:00
fdb_flush.sh selftests: net: Fix few spelling mistakes 2025-02-18 18:10:31 -08:00
fdb_notify.sh selftests: net: lib: Rename ip_link_master() to ip_link_set_master() 2024-12-09 14:47:05 -08:00
fib-onlink-tests.sh selftests/net: convert fib-onlink-tests.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
fib_nexthop_multiprefix.sh selftests/net: convert fib_nexthop_multiprefix to run it in unique namespace 2023-12-14 18:38:35 -08:00
fib_nexthop_nongw.sh selftests/net: convert fib_nexthop_nongw.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
fib_nexthops.sh selftests: fib_nexthops: do not mark skipped tests as failed 2025-02-21 16:23:29 -08:00
fib_rule_tests.sh selftests: net: remove redundant rp_filter configuration 2025-05-12 18:10:55 -07:00
fib_tests.sh selftests: net: remove redundant rp_filter configuration 2025-05-12 18:10:55 -07:00
fin_ack_lat.c
fin_ack_lat.sh
fq_band_pktlimit.sh selftests/net: calibrate fq_band_pktlimit 2024-01-31 11:11:09 +00:00
gre_gso.sh selftests/net: convert gre_gso.sh to run it in unique namespace 2023-12-23 00:26:32 +00:00
gre_ipv6_lladdr.sh selftests: Add IPv6 link-local address generation tests for GRE devices. 2025-05-05 18:08:15 -07:00
gro.c selftests/net: only print passing message in GRO tests when tests pass 2025-02-27 18:38:23 -08:00
gro.sh selftests/net: deflake GRO tests 2025-02-27 18:38:23 -08:00
hwtstamp_config.c selftests/net: replace manual array size calc with ARRAYSIZE macro. 2023-07-18 17:43:51 -07:00
icmp.sh sleftests/net: convert icmp.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
icmp_redirect.sh selftests: net: remove redundant rp_filter configuration 2025-05-12 18:10:55 -07:00
in_netns.sh
io_uring_zerocopy_tx.c selftests/net: Extract uring helpers to be reusable 2023-10-19 16:42:03 -06:00
io_uring_zerocopy_tx.sh selftests/net: optmem_max became per netns 2023-12-15 11:01:27 +00:00
ioam6.sh selftests: net: add new ioam tests 2024-10-04 15:34:07 -07:00
ioam6_parser.c selftests: net: add new ioam tests 2024-10-04 15:34:07 -07:00
ip6_gre_headroom.sh
ip_defrag.c
ip_defrag.sh
ip_local_port_range.c selftests/net: fix uninitialized variables 2024-05-07 17:22:18 -07:00
ip_local_port_range.sh selftests/net: ensure mptcp is enabled in netns 2025-02-25 18:13:28 -08:00
ipsec.c selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack() 2025-01-20 11:25:25 -08:00
ipv6_flowlabel.c ping: support ipv6 ping socket flow labels 2022-07-22 12:40:27 +01:00
ipv6_flowlabel.sh ping: support ipv6 ping socket flow labels 2022-07-22 12:40:27 +01:00
ipv6_flowlabel_mgr.c
ipv6_route_update_soft_lockup.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
l2_tos_ttl_inherit.sh selftests/net: l2_tos_ttl_inherit.sh: Ensure environment cleanup on failure. 2023-01-10 10:13:52 +01:00
l2tp.sh selftests/net: convert l2tp.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
lib.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
link_netns.py selftests: net: Add test cases for link and peer netns 2025-02-21 15:28:03 -08:00
lwt_dst_cache_ref_loop.sh selftests: net: test for lwtunnel dst ref loops 2025-03-20 11:25:52 +01:00
msg_zerocopy.c selftests: make order checking verbose in msg_zerocopy selftest 2024-07-03 19:42:32 -07:00
msg_zerocopy.sh selftests/net: optmem_max became per netns 2023-12-15 11:01:27 +00:00
nat6to4.bpf.c selftests: net: name bpf objects consistently and simplify Makefile 2024-04-24 20:15:45 -07:00
nat6to4.sh selftests: net: add test case for NAT46 looping back dst 2025-06-11 17:02:29 -07:00
ndisc_unsolicited_na_test.sh selftests/net: convert ndisc_unsolicited_na_test.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
netdevice.sh selftests: net: Use XFAIL for operations not supported by the driver 2024-08-22 16:56:06 -07:00
netlink-dumps.c selftests: net: test extacks in netlink dumps 2024-11-24 17:00:06 -08:00
netns-name.sh selftests: net: use netdevsim in netns test 2025-04-03 15:32:09 -07:00
netns-sysctl.sh selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns 2024-06-01 16:03:21 -07:00
nettest.c selftests: net: remove unused variables 2023-10-16 09:20:08 +01:00
nl_netdev.py netdevsim: allow normal queue reset while down 2025-02-07 17:21:03 -08:00
pmtu.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
proc_net_pktgen.c selftest: net: update proc_net_pktgen (add more imix_weights test cases) 2025-03-24 12:01:38 -07:00
psock_fanout.c selftests: net/psock_fanout: unbound socket fanout 2024-10-15 09:52:36 -07:00
psock_lib.h selftests/net: replace manual array size calc with ARRAYSIZE macro. 2023-07-18 17:43:51 -07:00
psock_snd.c
psock_snd.sh
psock_tpacket.c selftests: net: Fix minor typos in MPTCP and psock tests 2025-02-19 19:02:48 -08:00
reuseaddr_conflict.c selftests: reuseaddr_conflict: add missing new line at the end of the output 2024-04-01 20:42:45 -07:00
reuseaddr_ports_exhausted.c selftests: net: fix grammar in reuseaddr_ports_exhausted.c log message 2025-02-17 16:34:36 -08:00
reuseaddr_ports_exhausted.sh
reuseport_addr_any.c selftest: net: Remove DCCP bits. 2025-04-11 18:58:10 -07:00
reuseport_addr_any.sh
reuseport_bpf.c selftests: Fix the if conditions of in test_extra_filter() 2022-09-27 11:00:02 +02:00
reuseport_bpf_cpu.c
reuseport_bpf_numa.c
reuseport_dualstack.c
route_localnet.sh selftests: net: change ifconfig with ip command 2023-10-24 13:53:39 -07:00
rps_default_mask.sh selftests: net: fix rps_default_mask with >32 CPUs 2024-01-24 13:55:19 -08:00
rtnetlink.py netlink: specs: rt_addr: pull the ifa- prefix out of the names 2025-04-04 07:36:06 -07:00
rtnetlink.sh selftests/rtnetlink.sh: add mngtempaddr test 2024-11-26 10:29:12 +01:00
run_afpackettests
run_netsocktests
rxtimestamp.c net-timestamp: add selftests for SOF_TIMESTAMPING_OPT_RX_FILTER 2024-09-10 16:55:23 -07:00
rxtimestamp.sh
sample_map_ret0.bpf.c selftests: net: declare section names for bpf_offload 2024-04-10 14:03:12 -07:00
sample_ret0.bpf.c selftests: net: declare section names for bpf_offload 2024-04-10 14:03:12 -07:00
sctp_hello.c selftests: add a selftest for sctp vrf 2022-11-18 11:42:54 +00:00
sctp_vrf.sh selftests/net: convert sctp_vrf.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
settings selftests/net: convert fcnal-test.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
setup_loopback.sh selftests: net: Remove executable bits from library scripts 2024-02-01 08:36:29 -08:00
setup_veth.sh selftests: net: bump GRO timeout for gro/setup_veth 2025-03-12 13:20:04 -07:00
sk_bind_sendto_listen.c selftests/net: Add sk_bind_sendto_listen and sk_connect_zero_addr 2022-08-24 19:30:09 -07:00
sk_connect_zero_addr.c selftests/net: Add sk_bind_sendto_listen and sk_connect_zero_addr 2022-08-24 19:30:09 -07:00
sk_so_peek_off.c selftests: add selftest for UDP SO_PEEK_OFF support 2024-09-04 13:10:43 +01:00
skf_net_off.c selftests/net: test sk_filter support for SKF_NET_OFF on frags 2025-04-09 20:02:51 -07:00
skf_net_off.sh selftests/net: test sk_filter support for SKF_NET_OFF on frags 2025-04-09 20:02:51 -07:00
so_incoming_cpu.c selftest: Don't reuse port for SO_INCOMING_CPU test. 2024-01-23 10:48:07 +01:00
so_netns_cookie.c
so_rcv_listener.c selftests: net: add support for testing SO_RCVMARK and SO_RCVPRIORITY 2025-02-17 16:45:19 -08:00
so_txtime.c selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW 2024-02-06 10:19:06 +01:00
so_txtime.sh selftests: net: cope with slow env in so_txtime.sh test 2024-02-13 10:10:44 -08:00
socket.c
srv6_end_dt4_l3vpn_test.sh selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration 2025-05-12 18:10:55 -07:00
srv6_end_dt6_l3vpn_test.sh selftests/net: convert srv6_end_dt6_l3vpn_test.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
srv6_end_dt46_l3vpn_test.sh selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration 2025-05-12 18:10:55 -07:00
srv6_end_dx4_netfilter_test.sh selftests: add selftest for the SRv6 End.DX4 behavior with netfilter 2024-06-19 18:42:10 +02:00
srv6_end_dx6_netfilter_test.sh selftests: add selftest for the SRv6 End.DX6 behavior with netfilter 2024-06-19 18:42:10 +02:00
srv6_end_flavors_test.sh selftests: net: Fix spellings 2025-05-20 18:14:08 -07:00
srv6_end_next_csid_l3vpn_test.sh selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration 2025-05-12 18:10:55 -07:00
srv6_end_x_next_csid_l3vpn_test.sh selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration 2025-05-12 18:10:55 -07:00
srv6_hencap_red_l3vpn_test.sh selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration 2025-05-12 18:10:55 -07:00
srv6_hl2encap_red_l2vpn_test.sh selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration 2025-05-12 18:10:55 -07:00
stress_reuseport_listen.c
stress_reuseport_listen.sh selftests/net: convert stress_reuseport_listen.sh to run it in unique namespace 2023-12-23 00:26:32 +00:00
tap.c selftests: add few test cases for tap driver 2022-08-05 08:59:15 +01:00
tcp_fastopen_backup_key.c
tcp_fastopen_backup_key.sh
tcp_inq.c
tcp_mmap.c selftests/net: report rcv_mss in tcp_mmap 2023-08-02 11:40:49 +01:00
test_bpf.sh
test_bridge_backup_port.sh selftests: net: Fix bridge backup port test flakiness 2024-02-09 11:29:52 -08:00
test_bridge_neigh_suppress.sh selftests: test_bridge_neigh_suppress: Test unicast ARP/NS with suppression 2025-04-09 19:13:43 -07:00
test_ingress_egress_chaining.sh selftests: add selftest for chaining of tc ingress handling to egress 2022-10-19 14:04:36 +01:00
test_so_rcv.sh selftests: net: add support for testing SO_RCVMARK and SO_RCVPRIORITY 2025-02-17 16:45:19 -08:00
test_vxlan_fdb_changelink.sh selftests: test_vxlan_fdb_changelink: Add a test for MC remote change 2025-02-18 13:06:44 +01:00
test_vxlan_mdb.sh selftests: vxlan_mdb: Fix failures with old libnet 2024-03-26 12:29:25 +01:00
test_vxlan_nolocalbypass.sh selftests/net: convert test_vxlan_nolocalbypass.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
test_vxlan_under_vrf.sh selftests/net: convert test_vxlan_under_vrf.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
test_vxlan_vnifiltering.sh selftests/net: convert test_vxlan_vnifiltering.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
tfo.c selftests: net: add passive TFO test binary 2025-06-18 18:30:51 -07:00
tfo_passive.sh selftests: net: add test for passive TFO socket NAPI ID 2025-06-18 18:30:51 -07:00
timestamping.c
tls.c selftests: tls: check that disconnect does nothing 2025-04-08 11:38:49 +02:00
toeplitz.c selftests/net: toeplitz: fix race on tpacket_v3 block close 2023-01-19 09:27:15 -08:00
toeplitz.sh selftests/net: use unique netns name for setup_loopback.sh setup_veth.sh 2023-12-23 00:26:32 +00:00
toeplitz_client.sh
traceroute.sh selftests/net: convert traceroute.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
tun.c
txring_overwrite.c
txtimestamp.c selftests: txtimestamp: add SCM_TS_OPT_ID test 2024-10-04 11:52:20 -07:00
txtimestamp.sh selftests: txtimestamp: add SCM_TS_OPT_ID test 2024-10-04 11:52:20 -07:00
udpgro.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
udpgro_bench.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
udpgro_frglist.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
udpgro_fwd.sh selftests: net: move wait_local_port_listen to lib.sh 2025-05-27 17:31:42 -07:00
udpgso.c udp: gso: do not drop small packets when PMTU reduces 2025-02-03 10:13:27 +00:00
udpgso.sh selftests/net: Add test coverage for UDP GSO software fallback 2024-06-28 18:13:00 -07:00
udpgso_bench.sh selftests/net: call sendmmsg via udpgso_bench.sh 2024-12-04 19:22:20 -08:00
udpgso_bench_rx.c selftests: net: cut more slack for gro fwd tests. 2024-02-02 21:10:36 -08:00
udpgso_bench_tx.c selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking 2023-02-02 13:29:51 +01:00
unicast_extensions.sh selftests: net: add helper for checking if nettest is available 2024-08-22 12:55:47 +02:00
veth.sh selftests: net: use the dummy bpf from net/lib 2025-03-31 16:44:25 -07:00
vlan_bridge_binding.sh selftests: net: Add a VLAN bridge binding selftest 2024-12-20 13:14:17 -08:00
vlan_hw_filter.sh selftests: add vlan hw filter tests 2023-12-19 13:13:56 +01:00
vrf-xfrm-tests.sh selftests/net: convert vrf-xfrm-tests.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
vrf_route_leaking.sh selftests: net: add helper for checking if nettest is available 2024-08-22 12:55:47 +02:00
vrf_strict_mode_test.sh selftests/net: convert vrf_strict_mode_test.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
xfrm_policy.sh selftests/net: reduce xfrm_policy test time 2024-05-16 19:30:12 -07:00
xfrm_policy_add_speed.sh selftests: add xfrm policy insertion speed test script 2024-08-24 09:55:01 +02:00
ynl.mk selftests: net: suppress ReST file generation when building selftests 2025-02-05 17:49:40 -08:00