diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/sys/test_ioctl.rs | 8 | ||||
-rw-r--r-- | test/sys/test_stat.rs | 2 | ||||
-rw-r--r-- | test/test_mount.rs | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/test/sys/test_ioctl.rs b/test/sys/test_ioctl.rs index 7a603c5b..40f60cfd 100644 --- a/test/sys/test_ioctl.rs +++ b/test/sys/test_ioctl.rs @@ -30,6 +30,8 @@ ioctl_readwrite_buf!(readwritebuf_test, 0, 0, u32); #[cfg(any(target_os = "linux", target_os = "android"))] mod linux { + // The cast is not unnecessary on all platforms. + #[allow(clippy::unnecessary_cast)] #[test] fn test_op_none() { if cfg!(any( @@ -46,6 +48,8 @@ mod linux { } } + // The cast is not unnecessary on all platforms. + #[allow(clippy::unnecessary_cast)] #[test] fn test_op_write() { if cfg!(any( @@ -78,6 +82,8 @@ mod linux { } } + // The cast is not unnecessary on all platforms. + #[allow(clippy::unnecessary_cast)] #[test] fn test_op_read() { if cfg!(any( @@ -110,6 +116,8 @@ mod linux { } } + // The cast is not unnecessary on all platforms. + #[allow(clippy::unnecessary_cast)] #[test] fn test_op_read_write() { assert_eq!(request_code_readwrite!(b'z', 10, 1) as u32, 0xC001_7A0A); diff --git a/test/sys/test_stat.rs b/test/sys/test_stat.rs index 2f26e789..426b4b65 100644 --- a/test/sys/test_stat.rs +++ b/test/sys/test_stat.rs @@ -1,3 +1,5 @@ +// The conversion is not useless on all platforms. +#[allow(clippy::useless_conversion)] #[cfg(target_os = "freebsd")] #[test] fn test_chflags() { diff --git a/test/test_mount.rs b/test/test_mount.rs index febcadfb..2fd612e3 100644 --- a/test/test_mount.rs +++ b/test/test_mount.rs @@ -108,7 +108,7 @@ exit 23"; // EROFS: Read-only file system assert_eq!( - EROFS as i32, + EROFS, File::create(tempdir.path().join("test")) .unwrap_err() .raw_os_error() @@ -156,7 +156,7 @@ exit 23"; // EACCES: Permission denied assert_eq!( - EACCES as i32, + EACCES, Command::new(&test_path) .status() .unwrap_err() |