Skip to content

use subordinate terminal device for termios calls #1290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/sys/test_termios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn test_tcgetattr_pty() {
let _m = crate::PTSNAME_MTX.lock().expect("Mutex got poisoned by another test");

let pty = openpty(None, None).expect("openpty failed");
assert!(termios::tcgetattr(pty.master).is_ok());
assert!(termios::tcgetattr(pty.slave).is_ok());
close(pty.master).expect("closing the master failed");
close(pty.slave).expect("closing the slave failed");
}
Expand Down Expand Up @@ -53,7 +53,7 @@ fn test_output_flags() {
let pty = openpty(None, None).expect("openpty failed");
assert!(pty.master > 0);
assert!(pty.slave > 0);
let termios = tcgetattr(pty.master).expect("tcgetattr failed");
let termios = tcgetattr(pty.slave).expect("tcgetattr failed");
close(pty.master).unwrap();
close(pty.slave).unwrap();
termios
Expand Down Expand Up @@ -95,7 +95,7 @@ fn test_local_flags() {
let pty = openpty(None, None).unwrap();
assert!(pty.master > 0);
assert!(pty.slave > 0);
let termios = tcgetattr(pty.master).unwrap();
let termios = tcgetattr(pty.slave).unwrap();
close(pty.master).unwrap();
close(pty.slave).unwrap();
termios
Expand Down
2 changes: 1 addition & 1 deletion test/test_pty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn test_openpty_with_termios() {
let pty = openpty(None, None).unwrap();
assert!(pty.master > 0);
assert!(pty.slave > 0);
let termios = tcgetattr(pty.master).unwrap();
let termios = tcgetattr(pty.slave).unwrap();
close(pty.master).unwrap();
close(pty.slave).unwrap();
termios
Expand Down