Skip to content

df: fix rounding issue in test#5532

Merged
sylvestre merged 1 commit intouutils:mainfrom
cakebaker:df_fix_5531
Dec 25, 2023
Merged

df: fix rounding issue in test#5532
sylvestre merged 1 commit intouutils:mainfrom
cakebaker:df_fix_5531

Conversation

@cakebaker
Copy link
Copy Markdown
Contributor

This PR fixes a rounding issue in test_use_percentage. Because the test used the default block size of 1024, the returned values for the columns Used and Avail were rounded. However, the test used them to calculate the percentage values to compare them with the values returned in the Use% column. In some cases, the rounding led to a mismatch between those values and that caused the test to fail. By setting the block size to 1, the returned values for Used and Avail are no longer rounded.

Fixes #5531

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tail/inotify-dir-recreate. tests/tail/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

Set block size to 1 so the returned values are the same values as
used for the calculation of the percentage values
@sylvestre sylvestre merged commit 6ce9d84 into uutils:main Dec 25, 2023
@cakebaker cakebaker deleted the df_fix_5531 branch December 25, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Naive df's test_use_percentage can fail on some machines

2 participants