BUG: Naive df
's test_use_percentage
can fail on some machines
#5531
Labels
df
's test_use_percentage
can fail on some machines
#5531
tests/by-util/test_df.rs
uses a very naive way of calculatingcomputed_percentage
, essentially adding thereported_used
toreported_avail
to get the total memory to calculate the percentage used.This leads to this particular test failing on some machines depending on their settings / disk space usage, like:
We can plainly see that this would give us ~64.75%, not 67%.
As explained in Coreutils FAQ, the tool is not intended to work this way (thanks to @cakebaker for pointing this out!):
We will need to rewrite this test to account for the
minfree
behavior. I should be able to do that either today or tomorrow.The text was updated successfully, but these errors were encountered: