Skip to content

Commit b7cd6c2

Browse files
cgwalterssunfishcode
authored andcommitted
tests/statfs: Don't check f_files != 0
At least as far as I can tell, the Linux btrfs code does not set `f_files`. I think likely because inode allocations are fully dynamic. Testing the block count should be sufficient.
1 parent e582f8a commit b7cd6c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/fs/statfs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ fn test_statfs_abi() {
4343
fn test_statfs() {
4444
let statfs = rustix::fs::statfs("Cargo.toml").unwrap();
4545
assert_ne!(statfs.f_blocks, 0);
46-
assert_ne!(statfs.f_files, 0);
46+
// Previously we checked f_files != 0 here, but at least btrfs doesn't set that.
4747
}

0 commit comments

Comments
 (0)