uutils / uutils/coreutils

tests assume 4KiB filesystem allocation granularity

Open
#13,716 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

Several tests appear to assume a 4 KiB filesystem allocation granularity.
The commands themselves appear to behave correctly.

I encountered 11 test failures while running the test suite on AArch64 (Kernel: 6.19.14-400.asahi.fc42.aarch64+16k) with 16 KiB base pages.

The failing tests are:

failures:
    test_cp::test_cp_debug_default_with_hole
    test_cp::test_cp_debug_reflink_never_file_with_hole
    test_cp::test_cp_debug_reflink_never_sparse_always_with_hole
    test_cp::test_cp_debug_reflink_never_with_hole
    test_cp::test_cp_debug_sparse_never_file_with_hole
    test_du::test_du_symlink_multiple_fail
    test_ls::test_ls_block_size_override
    test_ls::test_ls_invalid_block_size_in_env_var
    test_ls::test_ls_long_total_size
    test_ls::test_posixly_correct_and_block_size_env_vars
    test_ls::test_posixly_correct_and_block_size_env_vars_with_k

The five cp tests for instance expect SEEK_HOLE sparse detection, but the fixture in this case is hardcoded to 10_000 bytes. When appending data it can create a visible hole on a 4 KiB filesystem but on a 16 KiB filesystem that offset is still within the first allocation unit. The other failing tests might be related as well.

Linux on AArch64 may use 4/16/64 KiB base pages. Filesystem allocation granularity can also differ independently of the CPU architecture.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the listed test names, especially the five test_cp cases and their hardcoded 10_000-byte fixture, then run the affected tests on a 16 KiB filesystem. Check the related test_ls and test_du assumptions about allocation or block size; done means the tests pass without relying on 4 KiB filesystem granularity.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.