Skip to content

Commit bdcbc6f

Browse files
committed
Fix test warnings.
1 parent 77644e2 commit bdcbc6f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/cap-basics.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,11 @@ fn symlink_loop_from_rename() {
217217
check!(tmpdir.open("link"));
218218
}
219219

220-
#[cfg(linux)]
220+
#[cfg(target_os = "linux")]
221221
#[test]
222222
fn proc_self_fd() {
223-
let fd = check!(File::open("/proc/self/fd"));
223+
let fd = check!(std::fs::File::open("/proc/self/fd"));
224224
let dir = cap_std::fs::Dir::from_std_file(fd);
225-
error!(dir.open("0"), "No such file");
225+
// This should fail with "too many levels of symbolic links".
226+
dir.open("0").unwrap_err();
226227
}

0 commit comments

Comments
 (0)