summaryrefslogtreecommitdiff
path: root/test/test_pty.rs
diff options
context:
space:
mode:
authorMartin Samuelsson <msamuelsson@storvix.eu>2023-07-21 15:39:15 +0200
committerMartin Samuelsson <msamuelsson@storvix.eu>2023-07-21 17:14:04 +0200
commit8e5d9144910efb2b2e9555c7d83270b8c3ca18d7 (patch)
treec21bb86e72b0581fd570fb2f3de2dc9fd48224cd /test/test_pty.rs
parentc375a102ac0af0d08c4942ffd81c84b6d6769d08 (diff)
downloadnix-8e5d9144910efb2b2e9555c7d83270b8c3ca18d7.zip
Disable tcsetattr() on illumos and solarisfix/disable_tcsetattr_illumos
Calling tcsetattr() as currently done by nix is documented undefined behaviour on illumos, and will always fail. For details, please see: https://github.com/nix-rust/nix/issues/2071
Diffstat (limited to 'test/test_pty.rs')
-rw-r--r--test/test_pty.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_pty.rs b/test/test_pty.rs
index 4cc6620c..7019944b 100644
--- a/test/test_pty.rs
+++ b/test/test_pty.rs
@@ -135,6 +135,7 @@ fn test_open_ptty_pair() {
}
/// Put the terminal in raw mode.
+#[cfg(not(any(target_os = "illumos", target_os = "solaris")))]
fn make_raw<Fd: AsFd>(fd: Fd) {
let mut termios = tcgetattr(&fd).unwrap();
cfmakeraw(&mut termios);
@@ -142,6 +143,7 @@ fn make_raw<Fd: AsFd>(fd: Fd) {
}
/// Test `io::Read` on the PTTY master
+#[cfg(not(any(target_os = "illumos", target_os = "solaris")))]
#[test]
fn test_read_ptty_pair() {
let (mut master, mut slave) = open_ptty_pair();
@@ -159,6 +161,7 @@ fn test_read_ptty_pair() {
}
/// Test `io::Write` on the PTTY master
+#[cfg(not(any(target_os = "illumos", target_os = "solaris")))]
#[test]
fn test_write_ptty_pair() {
let (mut master, mut slave) = open_ptty_pair();