[Pkg-rust-maintainers] Bug#1150108: rust-service-binding: test service::tests::parse_tcp_localhost fails on IPv4-only machines

Nadzeya Hutsko nadzeya at debian.org
Mon Oct 5 20:21:16 BST 2026


Source: rust-service-binding
Version: 3.0.0-2
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear Maintainer,

The `service::tests::parse_tcp_localhost` test assumes that "localhost" resolves to both `127.0.0.1` and `::1`

On the machines where localhost only resolves to 127.0.0.1, the test fails:
```
  ---- service::tests::parse_tcp_localhost stdout ----
  thread 'service::tests::parse_tcp_localhost' panicked at src/service.rs:475:9:
  assertion `left == right` failed
    left: [127.0.0.1:8081]
   right: [127.0.0.1:8081, [::1]:8081]
  test result: FAILED. 20 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
```

I'd suggest updating the test so it doesn't depend on the host's IPv6 localhost setup. For example, only require that `127.0.0.1:8081` is in the result, or build the expected list from `"localhost:8081".to_socket_addrs()`. Any IPv4-only test environment will hit this error.

The bug has been forwarded upstream: https://github.com/wiktor-k/service-binding/issues/44

Nadzeya

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEuVOE/FJ0HcdfWSw//lAdKwFeZPsFAmrD+KgACgkQ/lAdKwFe
ZPtzfA//dDcsxfjY7jpLHSfq9XOlgcCGFnWcQY6uxGMwQxJ7ONhB5dFnEEVYYrWT
zIlZHv+dz8exB8JoiDZpAwTzui4g4zVCn3IMcD/QCVKUPWmRkB7N9G6M6ukxKDX1
WDM9n9Qwv3vVuEqvx28TAr/yQ/PQjeKkAME0qpy30TljH8+q+4D/fjZ3Tvq1ebvW
ZC/DNxGNCUTpx/bVUQPH3GltuihA0Vu22YVBma/rbyRrsZw89r8HHCnpTnBMYPT0
C3Yddq/ZjcQvz7GFPTTsOGwDNFfbXR2kZtIvRdpqR7CmU8j9ACoDm0o7sgii5kN4
tZvuRo8NRtiF1oXqVgvGGHZ/3xf/uDjpfkm6mqlZ5Om2UUCELC7LNs/b1Bc6HQ8H
G8Gu96jCw3DU/DnH9Lah7PmxPHQM9FnKyppFv8j78y6BJKnksuk0j/Qzu05ZfaGp
HwO7kMpVxtY7M4x7ZWzVmqOqrAtpuMh9Fk2Kc7Ie4LCF/CfMuAq5Qq9Sg7K4AGjI
EYr5p3rbImq2goG6ig5CTAdt6SZrPlZJbViyXS4W0NTvZTUfNIvnnXRZQ4DMY4Gv
D1ccQDpFx2Rbgny1tjeAPIdVPkJ7HWJmtKzDz5Sb2bHKF4dMi/FqMWJfHNZGlYug
MTQsn5NIs8iildeHdgLqe5wESprY0idAq9qCZBb6ngzAWo30vWY=
=95Ph
-----END PGP SIGNATURE-----



More information about the Pkg-rust-maintainers mailing list