cleanup some test cfg
This commit is contained in:
parent
40e340e9fb
commit
9b0cdf9a6e
@ -87,7 +87,7 @@ fn test_posix_realpath_errors() {
|
||||
assert_eq!(e.kind(), ErrorKind::NotFound);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_posix_fadvise() {
|
||||
use std::convert::TryInto;
|
||||
use std::io::Write;
|
||||
@ -115,7 +115,7 @@ fn test_posix_fadvise() {
|
||||
assert_eq!(result, 0);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_sync_file_range() {
|
||||
use std::io::Write;
|
||||
|
||||
@ -181,7 +181,7 @@ fn test_thread_local_errno() {
|
||||
}
|
||||
|
||||
/// Tests whether clock support exists at all
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_clocks() {
|
||||
let mut tp = std::mem::MaybeUninit::<libc::timespec>::uninit();
|
||||
let is_error = unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, tp.as_mut_ptr()) };
|
||||
@ -283,9 +283,6 @@ fn test_posix_mkstemp() {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
test_posix_fadvise();
|
||||
|
||||
test_posix_gettimeofday();
|
||||
test_posix_mkstemp();
|
||||
|
||||
@ -293,13 +290,14 @@ fn main() {
|
||||
test_posix_realpath_noalloc();
|
||||
test_posix_realpath_errors();
|
||||
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
test_sync_file_range();
|
||||
|
||||
test_thread_local_errno();
|
||||
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
test_clocks();
|
||||
|
||||
test_isatty();
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
test_posix_fadvise();
|
||||
test_sync_file_range();
|
||||
test_clocks();
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ fn main() {
|
||||
test_rwlock_libc_static_initializer();
|
||||
test_named_thread_truncation();
|
||||
|
||||
#[cfg(any(target_os = "linux"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
test_mutex_libc_static_initializer_recursive();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user