diff options
author | Steven Engler <opara@cs.georgetown.edu> | 2022-11-07 18:25:27 -0500 |
---|---|---|
committer | Steven Engler <opara@cs.georgetown.edu> | 2022-11-21 12:03:11 -0500 |
commit | 49bab984ee75391f37816eb722bbad9b7ae92b1c (patch) | |
tree | 9f1a3e005ca5bd3956f54192aa38b095d0a37b75 /test/sys/test_socket.rs | |
parent | 8884ea38ec80d838138070e941c080b0b573575a (diff) | |
download | nix-49bab984ee75391f37816eb722bbad9b7ae92b1c.zip |
fixup! Added better support for unnamed unix socket addrs
Make Linux-only
Diffstat (limited to 'test/sys/test_socket.rs')
-rw-r--r-- | test/sys/test_socket.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs index 26ba9b2d..07ca4d34 100644 --- a/test/sys/test_socket.rs +++ b/test/sys/test_socket.rs @@ -223,7 +223,7 @@ pub fn test_addr_equality_abstract() { } // Test getting/setting abstract addresses (without unix socket creation) -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] #[test] pub fn test_abstract_uds_addr() { let empty = String::new(); @@ -245,6 +245,7 @@ pub fn test_abstract_uds_addr() { } // Test getting an unnamed address (without unix socket creation) +#[cfg(any(target_os = "android", target_os = "linux"))] #[test] pub fn test_unnamed_uds_addr() { use crate::nix::sys::socket::SockaddrLike; @@ -256,7 +257,6 @@ pub fn test_unnamed_uds_addr() { assert!(addr.path().is_none()); assert_eq!(addr.path_len(), 0); - #[cfg(target_os = "linux")] assert!(addr.as_abstract().is_none()); } @@ -1544,6 +1544,7 @@ pub fn test_named_unixdomain() { } // Test using unnamed unix domain addresses +#[cfg(any(target_os = "android", target_os = "linux"))] #[test] pub fn test_unnamed_unixdomain() { use nix::sys::socket::{getsockname, socketpair}; |