Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/hostname: disable failing test_hostname::test_hostname_ip on OpenBSD #5639

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

lcheylus
Copy link
Contributor

On OpenBSD, test_hostname::test_hostname_ip fails with "failed to lookup address information: Name does not resolve" error

…enBSD

  - On OpenBSD, test_hostname::test_hostname_ip fails with "failed to lookup address information:
    Name does not resolve" error

Signed-off-by: Laurent Cheylus <foxy@free.fr>
@sylvestre
Copy link
Sponsor Contributor

do you know why it is doing that ?

@lcheylus
Copy link
Contributor Author

lcheylus commented Dec 11, 2023

Because implementation for hostname -i (--ip-address) is not portable on BSD (FreeBSD, MacOS, OpenBSD) using hostname + ":1" address. I didn't look for the exact reason of this error.

There is a note in src/uu/hostname/src/hostname.rs :

if matches.get_flag(OPT_IP_ADDRESS) {
// XXX: to_socket_addrs needs hostname:port so append a dummy port and remove it later.
// This was originally supposed to use std::net::lookup_host, but that seems to be
// deprecated.  Perhaps we should use the dns-lookup crate?

Maybe this reverse DNS resolution for IP addr should be implemented otherwise on all OS.

@sylvestre sylvestre merged commit 57cd69b into uutils:main Dec 16, 2023
54 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants