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

test: skip test_utun_ifname if unprivileged #2371

Conversation

SteveLauC
Copy link
Member

@SteveLauC SteveLauC commented Apr 13, 2024

What does this PR do

From this post, the utun interface requires privilege, and this is exactly what happens on my mac:

$ cargo t --all-features test_utun_ifname -q

running 1 test
F
failures:

---- sys::test_sockopt::test_utun_ifname stdout ----
thread 'sys::test_sockopt::test_utun_ifname' panicked at test/sys/test_sockopt.rs:854:36:
called `Result::unwrap()` on an `Err` value: EPERM

This PR skips the test if the process is not privileged.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@SteveLauC SteveLauC force-pushed the test/skip_test_utun_ifname_if_unpriviledged branch from 3e312b8 to f90e612 Compare April 13, 2024 12:34
@SteveLauC SteveLauC force-pushed the test/skip_test_utun_ifname_if_unpriviledged branch from f90e612 to 7996d31 Compare April 13, 2024 12:43
@SteveLauC SteveLauC added this pull request to the merge queue Apr 13, 2024
Merged via the queue into nix-rust:master with commit b6c55ad Apr 13, 2024
38 checks passed
@SteveLauC SteveLauC deleted the test/skip_test_utun_ifname_if_unpriviledged branch April 13, 2024 13:21
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.

1 participant