Skip to content

Commit 668384e

Browse files
committed
Remove a workaround for an old Musl bug
In older versions of Musl, ttyname_r would wrongly return ENOTTY instead of EBADF. We expected that bug in our test suite. But Rust 1.37.0 updated Musl to 1.1.22, which fixes the problem. This change reverts our workaround. https://www.openwall.com/lists/musl/2018/09/15/2 rust-lang/rust@aaf6698
1 parent d363537 commit 668384e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/test_unistd.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,13 +1064,7 @@ fn test_ttyname_not_pty() {
10641064
}
10651065

10661066
#[test]
1067-
#[cfg(all(not(target_os = "redox"), not(target_env = "musl")))]
1067+
#[cfg(all(not(target_os = "redox")))]
10681068
fn test_ttyname_invalid_fd() {
10691069
assert_eq!(ttyname(-1), Err(Error::Sys(Errno::EBADF)));
10701070
}
1071-
1072-
#[test]
1073-
#[cfg(all(not(target_os = "redox"), target_env = "musl"))]
1074-
fn test_ttyname_invalid_fd() {
1075-
assert_eq!(ttyname(-1), Err(Error::Sys(Errno::ENOTTY)));
1076-
}

0 commit comments

Comments
 (0)