Skip to content

Commit 8ba98c5

Browse files
committed
test: isolate descriptor sanitization coverage
remove the in-process close-range test because descriptor sanitization intentionally invalidates Rust test harness file descriptors. cover it through a launcher child-process integration test instead. Signed-off-by: Aaqa Ishtyaq <aaqaishtyaq@gmail.com>
1 parent 8dadc68 commit 8ba98c5

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

src/linux/process.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,19 +119,3 @@ fn close_inherited_fds() -> Result<()> {
119119
}
120120
Ok(())
121121
}
122-
123-
#[cfg(test)]
124-
mod tests {
125-
use std::fs::File;
126-
use std::os::unix::io::AsRawFd;
127-
128-
use super::close_inherited_fds;
129-
130-
#[test]
131-
fn closes_non_standard_inherited_descriptors() {
132-
let file = File::open("/dev/null").unwrap();
133-
let fd = file.as_raw_fd();
134-
close_inherited_fds().unwrap();
135-
assert_eq!(unsafe { libc::fcntl(fd, libc::F_GETFD) }, -1);
136-
}
137-
}

0 commit comments

Comments
 (0)