1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

cp,tail: fix warnings in tests on Android

This commit is contained in:
Daniel Hofstetter 2023-11-05 13:56:39 +01:00
parent 44d105d015
commit 91b19b7c56
2 changed files with 4 additions and 2 deletions

View file

@ -2120,7 +2120,7 @@ fn test_cp_reflink_insufficient_permission() {
.stderr_only("cp: 'unreadable' -> 'existing_file.txt': Permission denied (os error 13)\n"); .stderr_only("cp: 'unreadable' -> 'existing_file.txt': Permission denied (os error 13)\n");
} }
#[cfg(target_os = "linux")] #[cfg(any(target_os = "linux", target_os = "android"))]
#[test] #[test]
fn test_closes_file_descriptors() { fn test_closes_file_descriptors() {
use procfs::process::Process; use procfs::process::Process;
@ -3436,7 +3436,7 @@ fn test_cp_debug_sparse_auto() {
} }
#[test] #[test]
#[cfg(any(target_os = "linux", target_os = "android", target_os = "macos"))] #[cfg(any(target_os = "linux", target_os = "macos"))]
fn test_cp_debug_reflink_auto() { fn test_cp_debug_reflink_auto() {
let ts = TestScenario::new(util_name!()); let ts = TestScenario::new(util_name!());
let at = &ts.fixtures; let at = &ts.fixtures;

View file

@ -23,6 +23,7 @@ use std::io::Write;
use std::io::{Seek, SeekFrom}; use std::io::{Seek, SeekFrom};
#[cfg(all( #[cfg(all(
not(target_vendor = "apple"), not(target_vendor = "apple"),
not(target_os = "android"),
not(target_os = "windows"), not(target_os = "windows"),
not(target_os = "freebsd") not(target_os = "freebsd")
))] ))]
@ -31,6 +32,7 @@ use std::process::Stdio;
use tail::chunks::BUFFER_SIZE as CHUNK_BUFFER_SIZE; use tail::chunks::BUFFER_SIZE as CHUNK_BUFFER_SIZE;
#[cfg(all( #[cfg(all(
not(target_vendor = "apple"), not(target_vendor = "apple"),
not(target_os = "android"),
not(target_os = "windows"), not(target_os = "windows"),
not(target_os = "freebsd") not(target_os = "freebsd")
))] ))]