Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ls: test_ls_allocation_size fails on filesystem f2fs (android) #6075

Closed
cre4ture opened this issue Mar 14, 2024 · 0 comments · Fixed by #6076
Closed

ls: test_ls_allocation_size fails on filesystem f2fs (android) #6075

cre4ture opened this issue Mar 14, 2024 · 0 comments · Fixed by #6076
Labels

Comments

@cre4ture
Copy link
Contributor

Extracted new issue from topic in PR #5821:

When running the uutils test-suite on my real android device (also confirmed by @samueltardieu in #5821),
then this test (apart from others) fails:

---- test_ls::test_ls_allocation_size stdout ----
mkdir: /data/data/com.termux/files/usr/tmp/.tmpzzgyw7/some-dir1
touch: /data/data/com.termux/files/usr/tmp/.tmpzzgyw7/some-dir1/empty-file
run: /data/data/com.termux/files/home/rust/coreutils/target/debug/coreutils truncate -s 4M some-dir1/file-with-holes
run: /data/data/com.termux/files/home/rust/coreutils/target/debug/coreutils dd if=/dev/zero of=some-dir1/zero-file bs=1024 count=4096
run: /data/data/com.termux/files/home/rust/coreutils/target/debug/coreutils dd if=/dev/zero of=irregular-file bs=1 count=777
run: /data/data/com.termux/files/home/rust/coreutils/target/debug/coreutils ls -l --block-size=512 irregular-file
run: /data/data/com.termux/files/home/rust/coreutils/target/debug/coreutils ls -s1 some-dir1
thread 'test_ls::test_ls_allocation_size' panicked at tests/by-util/test_ls.rs:124:14:
assertion failed: `(left == right)`

Diff < left / right > :
<total 4100
>total 4096
    0 empty-file
    0 file-with-holes
<4100 zero-file
>4096 zero-file
 


note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test_ls::test_ls_allocation_size

It seems that the allocated size on "f2fs" is always slightly larger than on traditional filesystems.
After reading a bit about this filesystem type, I concluded that this probably makes sense due to the nature of this filesystem.
Thus, I adapted the test according to the underlying filesystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants