Skip to content

Commit 6b4c8c6

Browse files
committed
Ignore some uds tests
1 parent f874e10 commit 6b4c8c6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

library/std/src/os/unix/net/addr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ impl SocketAddr {
240240

241241
// macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses
242242
if len == 0
243-
|| (cfg!(not(any(target_os = "linux", target_os = "android")))
243+
|| (cfg!(not(any(target_os = "linux", target_os = "android", target_os = "cygwin")))
244244
&& self.addr.sun_path[0] == 0)
245245
{
246246
AddressKind::Unnamed

library/std/src/os/unix/net/tests.rs

+4
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ fn test_unix_datagram() {
289289

290290
#[test]
291291
#[cfg_attr(target_os = "android", ignore)] // Android SELinux rules prevent creating Unix sockets
292+
#[cfg_attr(target_os = "cygwin", ignore)] // Cygwin autobinds an address
292293
fn test_unnamed_unix_datagram() {
293294
let dir = tmpdir();
294295
let path1 = dir.path().join("sock1");
@@ -301,12 +302,14 @@ fn test_unnamed_unix_datagram() {
301302
let mut buf = [0; 11];
302303
let (usize, addr) = or_panic!(sock1.recv_from(&mut buf));
303304
assert_eq!(usize, 11);
305+
println!("{:?}", addr);
304306
assert!(addr.is_unnamed());
305307
assert_eq!(msg, &buf[..]);
306308
}
307309

308310
#[test]
309311
#[cfg_attr(target_os = "android", ignore)] // Android SELinux rules prevent creating Unix sockets
312+
#[cfg_attr(target_os = "cygwin", ignore)] // Cygwin fails to determine the addr type from recvfrom
310313
fn test_unix_datagram_connect_to_recv_addr() {
311314
let dir = tmpdir();
312315
let path1 = dir.path().join("sock1");
@@ -332,6 +335,7 @@ fn test_unix_datagram_connect_to_recv_addr() {
332335

333336
#[test]
334337
#[cfg_attr(target_os = "android", ignore)] // Android SELinux rules prevent creating Unix sockets
338+
#[cfg_attr(target_os = "cygwin", ignore)] // Cygwin autobinds an address
335339
fn test_connect_unix_datagram() {
336340
let dir = tmpdir();
337341
let path1 = dir.path().join("sock1");

0 commit comments

Comments
 (0)