Skip to content

Commit 7bc53a7

Browse files
authored
Fix test compilation on Redox. (#1130)
1 parent 2c926a2 commit 7bc53a7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

tests/fs/seek.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ fn test_seek_holes() {
6161

6262
#[test]
6363
fn test_seek_offsets() {
64-
use rustix::fs::{openat, seek, Mode, OFlags, SeekFrom, CWD};
64+
use rustix::fs::{open, seek, Mode, OFlags, SeekFrom};
6565

66-
let f = openat(CWD, "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap();
66+
let f = open("Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap();
6767

6868
match seek(&f, SeekFrom::Start(0)) {
6969
Ok(_) => {}

tests/termios/pgrp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ fn pgrp_notty() {
1919
}
2020

2121
// Disable on illumos where `tcgetattr` doesn't appear to support
22-
// pseudoterminals.
23-
#[cfg(not(target_os = "illumos"))]
22+
// pseudoterminals. And on Redox which lacks `NOCTTY`.
23+
#[cfg(not(any(target_os = "illumos", target_os = "redox")))]
2424
#[cfg(feature = "pty")]
2525
#[test]
2626
fn pgrp_pseudoterminal() {

tests/termios/sid.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ fn sid_notty() {
1717
assert_eq!(tcgetsid(&fd), Err(Errno::NOTTY));
1818
}
1919

20+
// Disable on Redox which lacks `getsid`.
21+
#[cfg(not(target_os = "redox"))]
2022
#[cfg(all(feature = "stdio", feature = "process"))]
2123
#[test]
2224
fn sid_match() {

0 commit comments

Comments
 (0)