History log of /openbsd-src/regress/lib/libutil/fmt_scaled/fmt_test.c (Results 1 – 19 of 19)
Revision Date Author Comments
# d7259957 04-Dec-2022 cheloha <cheloha@openbsd.org>

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument. We can
handle this case with the "default" failure case with no loss of
legibility. Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@. With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

show more ...


# 39af7dcc 11-Mar-2022 dtucker <dtucker@openbsd.org>

Check for underflow as well as overflow when scaling negative numbers.
ok millert@


# 29ce5829 20-Jun-2021 tb <tb@openbsd.org>

Add a test case for fmt_scaled.c r1.20


# d167610c 14-Feb-2020 schwarze <schwarze@openbsd.org>

no need to declare "extern optarg" and "extern optind"
when <unistd.h> is included;
patch from Jan Stary <hans at stare dot cz>;
OK millert


# 69175851 16-Mar-2017 dtucker <dtucker@openbsd.org>

Enable tests for +/-LLONG_MAX and add tests for other boundary conditions.
ok millert@


# 6c947a19 15-Mar-2017 dtucker <dtucker@openbsd.org>

Add tests for scaled overflow and underflow and the exact overflow and
underflow boundaries for 64bit platforms. Tests for exactly under the
boundaries disabled pending fixes. ok millert@ djm@ (pre

Add tests for scaled overflow and underflow and the exact overflow and
underflow boundaries for 64bit platforms. Tests for exactly under the
boundaries disabled pending fixes. ok millert@ djm@ (previous version).

show more ...


# cd187117 15-Mar-2017 dtucker <dtucker@openbsd.org>

Clean up errno handling in fmt_scaled test:
- always clear before calling function under test.
- save immediately after function under test.
- always use saved value for validation and reporting.

Clean up errno handling in fmt_scaled test:
- always clear before calling function under test.
- save immediately after function under test.
- always use saved value for validation and reporting.
- remove "fraction too big" testcase that never atually worked (but looked
like it did because the previous test's errno was never cleared).
- delete unecessary "extern int errno".

show more ...


# 9ae1fb7f 25-Feb-2017 jsg <jsg@openbsd.org>

Add missing includes to avoid implicit function declarations.


# 4c8432e8 14-Aug-2016 guenther <guenther@openbsd.org>

Convert quad_t to long long


# 2ff576de 12-Nov-2012 halex <halex@openbsd.org>

require scan_scaled to set errno to EINVAL rather than ERANGE if it
encounters an invalid multiplier, like the man page says it should

"looks sensible" deraadt@, ok ian@


# 5c4c8ca9 20-Jun-2009 ian <ian@openbsd.org>

Repair comment ID & typo, no binary change


# 8caa0019 21-Oct-2005 deraadt <deraadt@openbsd.org>

bullshit test; pointed out by david


# 0ccfa65f 09-Mar-2005 otto <otto@openbsd.org>

Now that rounding is done properly for fractionless numbers, fix the
regression cases and add a few too.


# 15fe0d73 08-Mar-2005 otto <otto@openbsd.org>

Some more real-life regression cases.


# df8f77ad 16-Sep-2004 otto <otto@openbsd.org>

new regression found in the wild: 1099512676352 -> 2.0T; fixed a minute ago.


# 9602cc96 16-Jul-2004 david <david@openbsd.org>

errno -> err in a structure. OK deraadt@


# 46b408a8 28-Dec-2003 otto <otto@openbsd.org>

Add a few test cases.

ok ian@


# db3296cf 31-Jul-2003 deraadt <deraadt@openbsd.org>

various cleanups; david says results are same


# f02338f6 15-May-2003 ian <ian@openbsd.org>

Regression for fmt_scaled() and scan_scaled().