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

df: fix rounding issue in test #5532

Merged
merged 1 commit into from
Dec 25, 2023
Merged

Conversation

cakebaker
Copy link
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

Copy link

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
54 of 56 checks passed
@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