Skip to content

Commit

Permalink
ls: fix test which fails if /tmp uses tmpfs
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Sep 22, 2023
1 parent a2691c9 commit 711f193
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3608,9 +3608,13 @@ fn test_ls_dired_complex() {
let mut cmd = scene.ucmd();
cmd.arg("--dired").arg("-l").arg("d");
let result = cmd.succeeds();
// Number of blocks

// Number of blocks. We run this test only if the default size of a newly created directory is
// 4096 bytes to prevent it from failing where this is not the case (e.g. using tmpfs for /tmp).

Check failure on line 3613 in tests/by-util/test_ls.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (tmpfs) (file:'tests/by-util/test_ls.rs', line:3613)
#[cfg(target_os = "linux")]
result.stdout_contains(" total 4");
if at.metadata("d/d").len() == 4096 {
result.stdout_contains(" total 4");
}

let output = result.stdout_str().to_string();
println!("Output:\n{}", output);
Expand Down

0 comments on commit 711f193

Please sign in to comment.