335891 |
03-Jul-2018 |
robak |
MFC r327317:
humanize_number(3): fix math edge case in rounding large numbers
Fix for remainder overflow, when in rare cases adding remainder to divider exceeded 1 and turned the total to 1000 in final formatting, taking up the space for the unit character.
The fix continues the division of the original number if the above case happens -- added the appropriate check to the for loop performing the division. This lowers the value shown, to make it fit into the buffer space provided (1.0M for 4+1 character buffer, as used by ls).
Add test case for the reported bug and extend test program to support providing buffer length (ls -lh uses 5, tests hard-coded 4).
PR: 224498 |
319252 |
30-May-2017 |
asomers |
MFC r315032-r315036, r315039, r315041
r315032: Increase WARNS for iconv tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933
r315033: Increase WARNS for nss tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933
r315034: Document that the msun tests require WARNS=0
ATF tests have a default WARNS of 0, unlike other usermode programs. This change is technically a noop, but it documents that the msun tests don't work with any warnings enabled, at least not on all architectures.
Reviewed by: ngie Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933
r315035: Increase WARNS for libcrypt tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933
r315036: Increase WARNS for libmp tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933
r315039: Increase WARNS for libutil tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933
r315041: Increase WARNS for pw tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 |