Merge pull request #5496 from cakebaker/cp_tail_fix_warnings_in_tests

cp,tail: fix warnings in tests on Android
This commit is contained in:
Sylvestre Ledru 2023-11-06 07:51:32 +01:00 committed by GitHub
commit 1818632d7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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");
}
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "android"))]
#[test]
fn test_closes_file_descriptors() {
use procfs::process::Process;
@ -3436,7 +3436,7 @@ fn test_cp_debug_sparse_auto() {
}
#[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() {
let ts = TestScenario::new(util_name!());
let at = &ts.fixtures;

View file

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