Skip to content

Commit b4e3dcd

Browse files
committed
fix: ignore failed tests on cygwin
1 parent 08b17fb commit b4e3dcd

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

test/sys/test_socket.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ pub fn test_socketpair() {
327327
}
328328

329329
#[test]
330+
#[cfg_attr(target_os = "cygwin", ignore)]
330331
pub fn test_recvmsg_sockaddr_un() {
331332
use nix::sys::socket::{
332333
self, bind, socket, AddressFamily, MsgFlags, SockFlag, SockType,
@@ -841,6 +842,7 @@ pub fn test_recvmsg_ebadf() {
841842
// 2.12.0. https://bugs.launchpad.net/qemu/+bug/1701808
842843
#[cfg_attr(qemu, ignore)]
843844
#[test]
845+
#[cfg_attr(target_os = "cygwin", ignore)]
844846
pub fn test_scm_rights() {
845847
use nix::sys::socket::{
846848
recvmsg, sendmsg, socketpair, AddressFamily, ControlMessage,
@@ -1327,6 +1329,7 @@ pub fn test_sendmsg_ipv4sendsrcaddr() {
13271329
// 2.12.0. https://bugs.launchpad.net/qemu/+bug/1701808
13281330
#[cfg_attr(qemu, ignore)]
13291331
#[test]
1332+
#[cfg_attr(target_os = "cygwin", ignore)]
13301333
fn test_scm_rights_single_cmsg_multiple_fds() {
13311334
use nix::sys::socket::{
13321335
recvmsg, sendmsg, ControlMessage, ControlMessageOwned, MsgFlags,

test/sys/test_sockopt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ fn test_so_listen_q_limit() {
159159
}
160160

161161
#[test]
162+
#[cfg_attr(target_os = "cygwin", ignore)]
162163
fn test_so_tcp_maxseg() {
163164
use nix::sys::socket::{
164165
accept, bind, connect, getsockname, listen, Backlog, SockaddrIn,

test/sys/test_stat.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ fn test_stat_fstat_lstat() {
145145
}
146146

147147
#[test]
148+
#[cfg_attr(target_os = "cygwin", ignore)]
148149
fn test_fchmod() {
149150
let tempdir = tempfile::tempdir().unwrap();
150151
let filename = tempdir.path().join("foo.txt");
@@ -168,6 +169,7 @@ fn test_fchmod() {
168169

169170
#[test]
170171
#[cfg(not(target_os = "redox"))]
172+
#[cfg_attr(target_os = "cygwin", ignore)]
171173
fn test_fchmodat() {
172174
let _dr = crate::DirRestore::new();
173175
let tempdir = tempfile::tempdir().unwrap();
@@ -331,6 +333,7 @@ fn test_mkdirat_success_path() {
331333

332334
#[test]
333335
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
336+
#[cfg_attr(target_os = "cygwin", ignore)]
334337
fn test_mkdirat_success_mode() {
335338
let expected_bits =
336339
stat::SFlag::S_IFDIR.bits() | stat::Mode::S_IRWXU.bits();
@@ -371,6 +374,7 @@ fn test_mkdirat_fail() {
371374
target_os = "redox",
372375
target_os = "solaris"
373376
)))]
377+
#[cfg_attr(target_os = "cygwin", ignore)]
374378
fn test_mknod() {
375379
use stat::{lstat, mknod, SFlag};
376380

@@ -391,6 +395,7 @@ fn test_mknod() {
391395
target_os = "haiku",
392396
target_os = "redox"
393397
)))]
398+
#[cfg_attr(target_os = "cygwin", ignore)]
394399
fn test_mknodat() {
395400
use fcntl::{AtFlags, OFlag};
396401
use nix::dir::Dir;

test/test_fcntl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ fn test_renameat2_noreplace() {
243243

244244
#[test]
245245
#[cfg(not(target_os = "redox"))]
246+
#[cfg_attr(target_os = "cygwin", ignore)]
246247
fn test_readlink() {
247248
let tempdir = tempfile::tempdir().unwrap();
248249
let src = tempdir.path().join("a");

test/test_net.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ const LOOPBACK: &[u8] = b"lo0";
1010
const LOOPBACK: &[u8] = b"loop";
1111

1212
#[test]
13+
#[cfg_attr(target_os = "cygwin", ignore)]
1314
fn test_if_nametoindex() {
1415
if_nametoindex(LOOPBACK).expect("assertion failed");
1516
}
1617

1718
#[test]
19+
#[cfg_attr(target_os = "cygwin", ignore)]
1820
fn test_if_indextoname() {
1921
let loopback_index = if_nametoindex(LOOPBACK).expect("assertion failed");
2022
assert_eq!(

test/test_unistd.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ fn test_getcwd() {
516516
}
517517

518518
#[test]
519+
#[cfg_attr(target_os = "cygwin", ignore)]
519520
fn test_chown() {
520521
// Testing for anything other than our own UID/GID is hard.
521522
let uid = Some(getuid());
@@ -550,6 +551,7 @@ fn test_fchown() {
550551

551552
#[test]
552553
#[cfg(not(target_os = "redox"))]
554+
#[cfg_attr(target_os = "cygwin", ignore)]
553555
fn test_fchownat() {
554556
use nix::fcntl::AtFlags;
555557
use nix::fcntl::AT_FDCWD;
@@ -868,6 +870,7 @@ fn test_canceling_alarm() {
868870

869871
#[test]
870872
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
873+
#[cfg_attr(target_os = "cygwin", ignore)]
871874
fn test_symlinkat() {
872875
use nix::fcntl::AT_FDCWD;
873876

@@ -1221,6 +1224,7 @@ fn test_access_file_exists() {
12211224
}
12221225

12231226
#[cfg(not(target_os = "redox"))]
1227+
#[cfg_attr(target_os = "cygwin", ignore)]
12241228
#[test]
12251229
fn test_user_into_passwd() {
12261230
// get the UID of the "nobody" user

0 commit comments

Comments
 (0)