From 2de3357ddc369b1a2892a428dae2b5a5eee676c6 Mon Sep 17 00:00:00 2001 From: Ulrich Hornung Date: Wed, 13 Mar 2024 19:02:54 +0100 Subject: [PATCH] revert freebsd related stuff --- tests/by-util/test_ls.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index e2f84e7eb45..2a081c7fb53 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -107,7 +107,7 @@ fn test_ls_allocation_size() { // fill empty file with zeros scene .ccmd("dd") - .arg("if=/dev/random") + .arg("if=/dev/zero") .arg("of=some-dir1/zero-file") .arg("bs=1024") .arg("count=4096") @@ -115,7 +115,7 @@ fn test_ls_allocation_size() { scene .ccmd("dd") - .arg("if=/dev/random") + .arg("if=/dev/zero") .arg("of=irregular-file") .arg("bs=1") .arg("count=777") @@ -138,6 +138,7 @@ fn test_ls_allocation_size() { let zero_file_size_4k_filler = " ".repeat(zero_file_size_4k.to_string().len() - 1); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .arg("-s1") @@ -154,6 +155,7 @@ fn test_ls_allocation_size() { // block size is 0 whereas size/len is 4194304 .stdout_contains("4194304"); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .arg("-s1") @@ -187,6 +189,7 @@ fn test_ls_allocation_size() { assert_eq!(empty_file_len, file_with_holes_len); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .env("LS_BLOCK_SIZE", "8K") @@ -199,6 +202,7 @@ fn test_ls_allocation_size() { .stdout_contains("0 file-with-holes") .stdout_contains("512 zero-file"); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .env("BLOCK_SIZE", "4K") @@ -210,6 +214,7 @@ fn test_ls_allocation_size() { .stdout_contains("0 file-with-holes") .stdout_contains(format!("{zero_file_size_1k} zero-file")); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .env("BLOCK_SIZE", "4K") @@ -222,6 +227,7 @@ fn test_ls_allocation_size() { .stdout_contains("0 file-with-holes") .stdout_contains("4.2M zero-file"); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .env("BLOCK_SIZE", "4096") @@ -233,6 +239,7 @@ fn test_ls_allocation_size() { .stdout_contains("0 file-with-holes") .stdout_contains(format!("{zero_file_size_1k} zero-file")); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .env("POSIXLY_CORRECT", "true") @@ -245,6 +252,7 @@ fn test_ls_allocation_size() { .stdout_contains(format!("{zero_file_size_8k} zero-file")); // -k should make 'ls' ignore the env var + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .env("BLOCK_SIZE", "4K") @@ -257,6 +265,7 @@ fn test_ls_allocation_size() { .stdout_contains(format!("{zero_file_size_4k} zero-file")); // but manually specified blocksize overrides -k + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .arg("-s1k") @@ -268,6 +277,7 @@ fn test_ls_allocation_size() { .stdout_contains("0 file-with-holes") .stdout_contains(format!("{zero_file_size_1k} zero-file")); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .arg("-s1") @@ -280,6 +290,7 @@ fn test_ls_allocation_size() { .stdout_contains(format!("{zero_file_size_1k} zero-file")); // si option should always trump the human-readable option + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .arg("-s1h") @@ -291,6 +302,7 @@ fn test_ls_allocation_size() { .stdout_contains("0 file-with-holes") .stdout_contains("4.2M zero-file"); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .arg("-s1") @@ -302,6 +314,7 @@ fn test_ls_allocation_size() { .stdout_contains("0 file-with-holes") .stdout_contains(format!("{zero_file_size_4m} zero-file")); + #[cfg(not(target_os = "freebsd"))] scene .ucmd() .arg("-s1") @@ -4070,7 +4083,7 @@ fn test_ls_block_size_override() { scene .ccmd("dd") - .arg("if=/dev/random") + .arg("if=/dev/zero") .arg("of=file") .arg("bs=1024") .arg("count=1")